Ubiquity  2.0.3
php rapid development framework
ClassUtils Class Reference

Static Public Member Functions

static getClassFullNameFromFile ($filePathName, $backSlash=false)
 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 7 of file ClassUtils.php.

Member Function Documentation

◆ cleanClassname()

static cleanClassname (   $classname)
static

Definition at line 26 of file ClassUtils.php.

◆ getClassFullNameFromFile()

static getClassFullNameFromFile (   $filePathName,
  $backSlash = false 
)
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 17 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 108 of file ClassUtils.php.

◆ getClassNameFromPhpCode()

static getClassNameFromPhpCode (   $phpCode)
staticprivate

Definition at line 113 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 67 of file ClassUtils.php.

◆ getClassNamespaceFromPhpCode()

static getClassNamespaceFromPhpCode (   $phpCode)
staticprivate

Definition at line 72 of file ClassUtils.php.

◆ getClassNameWithNS()

static getClassNameWithNS (   $defaultNS,
  $name 
)
static

Definition at line 128 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 54 of file ClassUtils.php.

◆ getClassSimpleName()

static getClassSimpleName (   $classnameWithNamespace)
static

Definition at line 135 of file ClassUtils.php.

◆ getNamespaceFromParts()

static getNamespaceFromParts (   $parts)
static

Returns a cleanly namespace.

Parameters
array | string$parts
Returns
string

Definition at line 35 of file ClassUtils.php.


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