PHP Classes

Get PHP Class Name: Get the base class name and namespace of an object

Recommend this page to a friend!
  Info   View files Example   View files View files (3)   DownloadInstall with Composer Download .zip   Reputation   Support forum   Blog    
Ratings Unique User Downloads Download Rankings
Not yet rated by the usersTotal: 172 All time: 8,775 This week: 134Up
Version License PHP version Categories
classname 1.2.1MIT/X Consortium ...5PHP 5, Language
Description 

Author

This package can get the base class name and namespace of an object.

It can take as parameter a string as class name or an object to get its class.

The class splits the class name in its components and can return the full class name, the namespace, the canonical name and the short class name.

Innovation Award
PHP Programming Innovation award nominee
August 2018
Number 4
PHP provides a function named get_class that can return the class of an object.

This class extends the capabilities of the get_class function by parsing the get_class return value and splitting the class name in its components like the full class name, the namespace, the canonical name and the short class name.

Manuel Lemos
Picture of Laudir Bispo
  Performance   Level  
Name: Laudir Bispo <contact>
Classes: 7 packages by
Country: Brazil Brazil
Age: 30
All time rank: 2260154 in Brazil Brazil
Week rank: 578 Up44 in Brazil Brazil Up
Innovation award
Innovation award
Nominee: 3x

  Files folder image Files  
File Role Description
Files folder imagesrc (1 file)
Accessible without login Plain text file composer.json Data Auxiliary data
Accessible without login Plain text file README.md Example Example script

  Files folder image Files  /  src  
File Role Description
  Plain text file ClassName.php Class Class source

 Version Control Reuses Unique User Downloads Download Rankings  
 100%2
Total:172
This week:0
All time:8,775
This week:134Up