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: 150 All time: 8,826 This week: 285Up
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
  Performance   Level  
Name: Laudir Bispo <contact>
Classes: 6 packages by
Country: Brazil Brazil
Innovation award
Innovation award
Nominee: 1x

  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%1
Total:150
This week:0
All time:8,826
This week:285Up

For more information send a message to info at phpclasses dot org.