Jump to content

get_class($this) with namespaces


Destramic

Recommended Posts

when trying to call

get_class($this)

it will return the namespace of my class Application\Models\User_Model But what im really after is just User_Model...

is there a way of actually getting the class name and not the namespace itself?

 

thought i'd ask before making a class for that...thank you

Link to comment
https://forums.phpfreaks.com/topic/290755-get_classthis-with-namespaces/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.