Ubiquity 2.5.2
php rapid development framework
Loading...
Searching...
No Matches
ClassUtils Class Reference

Manipulates class and namespace names Ubiquity\cache$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"
 
static cleanClassname ($classname)
 
static getNamespaceFromParts ($parts)
 Returns a cleanly namespace.
 
static getNamespaceFromCompleteClassname ($completeClassname)
 Returns the namespace from a complete classname.
 
static getClassObjectFromFile ($filePathName)
 build and return an object of a class from its file path
 
static getClassNamespaceFromFile ($filePathName)
 get the class namespace form file path using token
 
static getClassNameFromFile ($filePathName)
 get the class name from file path using token
 
static getClassNameWithNS ($defaultNS, $name)
 Returns the complete name of a class.
 
static getClassSimpleName ($classnameWithNamespace)
 Returns the simple class name of a class, without namespace.
 

Static Private Member Functions

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

Detailed Description

Manipulates class and namespace names Ubiquity\cache$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.1

Definition at line 16 of file ClassUtils.php.

Member Function Documentation

◆ cleanClassname()

static cleanClassname (   $classname)
static

Definition at line 83 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 148 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 136 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 160 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 123 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 173 of file ClassUtils.php.

◆ getNamespaceFromCompleteClassname()

static getNamespaceFromCompleteClassname (   $completeClassname)
static

Returns the namespace from a complete classname.

Parameters
string$completeClassname
Returns
string

Definition at line 111 of file ClassUtils.php.

◆ getNamespaceFromParts()

static getNamespaceFromParts (   $parts)
static

Returns a cleanly namespace.

Parameters
array | string$parts
Returns
string

Definition at line 93 of file ClassUtils.php.


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