Ubiquity  2.3.2
php rapid development framework
ClassUtils Class Reference

Manipulates class and namespace names Ubiquity$ClassUtils This class is part of Ubiquity. More...

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 from file path using token More...
 
static getClassNameWithNS ($defaultNS, $name)
 Returns the complete name of a class. More...
 
static getClassSimpleName ($classnameWithNamespace)
 Returns the simple class name of a class, without namespace. More...
 

Static Private Member Functions

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

Detailed Description

Manipulates class and namespace names Ubiquity$ClassUtils This class is part of Ubiquity.

Author
jcheron myadd.nosp@m.ress.nosp@m.mail@.nosp@m.gmai.nosp@m.l.com
Version
1.0.0

Definition at line 16 of file ClassUtils.php.

Member Function Documentation

◆ cleanClassname()

static cleanClassname (   $classname)
static

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

◆ getClassNameFromFile()

static getClassNameFromFile (   $filePathName)
static

get the class name from file path using token

Parameters
$filePathName
Returns
mixed

Definition at line 133 of file ClassUtils.php.

◆ getClassNameFromPhpCode()

static getClassNameFromPhpCode (   $phpCode)
staticprivate

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

◆ getClassNamespaceFromPhpCode()

static getClassNamespaceFromPhpCode (   $phpCode)
staticprivate

Definition at line 18 of file ClassUtils.php.

◆ getClassNameWithNS()

static getClassNameWithNS (   $defaultNS,
  $name 
)
static

Returns the complete name of a class.

Parameters
string$defaultNS
string$name
Returns
string

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

◆ getClassSimpleName()

static getClassSimpleName (   $classnameWithNamespace)
static

Returns the simple class name of a class, without namespace.

Parameters
string$classnameWithNamespace
Returns
string

Definition at line 158 of file ClassUtils.php.

◆ getNamespaceFromParts()

static getNamespaceFromParts (   $parts)
static

Returns a cleanly namespace.

Parameters
array | string$parts
Returns
string

Definition at line 89 of file ClassUtils.php.


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