nyroFwk  0.2
Public Member Functions | Static Public Member Functions
nReflection Class Reference
Inheritance diagram for nReflection:

Public Member Functions

 __construct ($elt='object')
 
 rebuild ($name)
 
 newInstanceCfg (config $cfg)
 
 isSubclassOf ($className)
 
 getPublicProperties ()
 

Static Public Member Functions

static getParentsClass ($className)
 
static callMethod ($object, $function, $args=array())
 

Detailed Description

used to create new classes dynamicly.

Definition at line 10 of file nReflection.class.php.

Constructor & Destructor Documentation

◆ __construct()

__construct (   $elt = 'object')

Overload the ReflectionClass to accept no parameter

Parameters
object | string$elt

Definition at line 17 of file nReflection.class.php.

Member Function Documentation

◆ callMethod()

static callMethod (   $object,
  $function,
  $args = array() 
)
static

Call a method from an object. Used when the function name is dynamic

Parameters
object$objectThe object where call the function
string$functionFunction name
array$argsArgumens for the call
Returns
mixed Function result
Exceptions
nExecptionIf method is not callable

Definition at line 97 of file nReflection.class.php.

◆ getParentsClass()

static getParentsClass (   $className)
static

Return all the parents. The first element is the oldest This function doesn't change the nReflection state

Parameters
string$className
Returns
array

Definition at line 84 of file nReflection.class.php.

◆ getPublicProperties()

getPublicProperties ( )

Retrieve the public properties

return array

Definition at line 64 of file nReflection.class.php.

◆ isSubclassOf()

isSubclassOf (   $className)

Test if the className is a parent fo the actual class

Parameters
string$classNameThe className to test
Returns
bool

Definition at line 55 of file nReflection.class.php.

◆ newInstanceCfg()

newInstanceCfg ( config  $cfg)

Create a new object with one argument, a config passed in parameter.

Parameters
config$cfgThe config parameter
Returns
stdclass The new instance

Definition at line 45 of file nReflection.class.php.

◆ rebuild()

rebuild (   $name)

Change the present class to be able to use reflection on it.

Parameters
string$name
Returns
bool True if success

Definition at line 30 of file nReflection.class.php.


The documentation for this class was generated from the following file:
Generated on Sun Oct 15 2017 22:25:21 for nyroFwk by doxygen 1.8.13