Ubiquity  2.0.2
php rapid development framework
ClassUtils Class Reference

Static Public Member Functions

static getClassFullNameFromFile ($filePathName)
 get the full name (name \ namespace) of a class from its file path result example: (string) "I\Am\The\Namespace\Of\This\Class" More...
 
static cleanClassname ($classname)
 
static getNamespaceFromParts ($parts)
 Returns a cleanly namespace. More...
 
static getClassObjectFromFile ($filePathName)
 build and return an object of a class from its file path More...
 
static getClassNamespaceFromFile ($filePathName)
 get the class namespace form file path using token More...
 
static getClassNameFromFile ($filePathName)
 get the class name form file path using token More...
 
static getClassNameWithNS ($defaultNS, $name)
 
static getClassSimpleName ($classnameWithNamespace)
 

Static Private Member Functions

static getClassNamespaceFromPhpCode ($phpCode)
 
static getClassNameFromPhpCode ($phpCode)
 

Detailed Description

Definition at line 5 of file ClassUtils.php.

Member Function Documentation

◆ cleanClassname()

static cleanClassname (   $classname)
static

Definition at line 20 of file ClassUtils.php.

◆ getClassFullNameFromFile()

static getClassFullNameFromFile (   $filePathName)
static

get the full name (name \ namespace) of a class from its file path result example: (string) "I\Am\The\Namespace\Of\This\Class"

Parameters
$filePathName
Returns
string

Definition at line 15 of file ClassUtils.php.

◆ getClassNameFromFile()

static getClassNameFromFile (   $filePathName)
static

get the class name form file path using token

Parameters
$filePathName
Returns
mixed

Definition at line 102 of file ClassUtils.php.

◆ getClassNameFromPhpCode()

static getClassNameFromPhpCode (   $phpCode)
staticprivate

Definition at line 107 of file ClassUtils.php.

◆ getClassNamespaceFromFile()

static getClassNamespaceFromFile (   $filePathName)
static

get the class namespace form file path using token

Parameters
$filePathName
Returns
null|string

Definition at line 61 of file ClassUtils.php.

◆ getClassNamespaceFromPhpCode()

static getClassNamespaceFromPhpCode (   $phpCode)
staticprivate

Definition at line 66 of file ClassUtils.php.

◆ getClassNameWithNS()

static getClassNameWithNS (   $defaultNS,
  $name 
)
static

Definition at line 122 of file ClassUtils.php.

◆ getClassObjectFromFile()

static getClassObjectFromFile (   $filePathName)
static

build and return an object of a class from its file path

Parameters
$filePathName
Returns
mixed

Definition at line 48 of file ClassUtils.php.

◆ getClassSimpleName()

static getClassSimpleName (   $classnameWithNamespace)
static

Definition at line 129 of file ClassUtils.php.

◆ getNamespaceFromParts()

static getNamespaceFromParts (   $parts)
static

Returns a cleanly namespace.

Parameters
array | string$parts
Returns
string

Definition at line 29 of file ClassUtils.php.


The documentation for this class was generated from the following file: