Exporter
in package
LightnCandy major static class
Table of Contents
- constants() : string
- Export Runtime constants
- getClassMethods() : array<string|int, mixed>
- Get methods from ReflectionClass
- getClassStatics() : string
- Get statics code from ReflectionClass
- getMeta() : array<string|int, mixed>
- Get metadata from ReflectionObject
- helpers() : string
- Export required custom helper functions
- runtime() : string
- Export required standalone Runtime methods
- safestring() : string
- Export SafeString class as string
- stringobject() : string
- Export StringObject class as string
- closure() : string
- Get PHP code string from a closure of function as string
- replaceSafeString() : string
- Replace SafeString class with alias class name
- scanDependency() : array<string|int, string|array>
- Scan for required standalone functions
Methods
constants()
Export Runtime constants
public
static constants(array<string, array|string|int> $context) : string
Parameters
- $context : array<string, array|string|int>
-
current compile context
Return values
string —getClassMethods()
Get methods from ReflectionClass
public
static getClassMethods(array<string, array|string|int> $context, ReflectionClass $class) : array<string|int, mixed>
Parameters
- $context : array<string, array|string|int>
-
current compile context
- $class : ReflectionClass
-
instance of the ReflectionClass
Return values
array<string|int, mixed> —getClassStatics()
Get statics code from ReflectionClass
public
static getClassStatics(ReflectionClass $class) : string
Parameters
- $class : ReflectionClass
-
instance of the ReflectionClass
Return values
string —getMeta()
Get metadata from ReflectionObject
public
static getMeta(object $refobj) : array<string|int, mixed>
Parameters
- $refobj : object
-
instance of the ReflectionObject
Return values
array<string|int, mixed> —helpers()
Export required custom helper functions
public
static helpers(array<string, array|string|int> $context) : string
Parameters
- $context : array<string, array|string|int>
-
current compile context
Return values
string —runtime()
Export required standalone Runtime methods
public
static runtime(array<string, array|string|int> $context) : string
Parameters
- $context : array<string, array|string|int>
-
current compile context
Return values
string —safestring()
Export SafeString class as string
public
static safestring(array<string, array|string|int> $context) : string
Parameters
- $context : array<string, array|string|int>
-
current compile context
Return values
string —stringobject()
Export StringObject class as string
public
static stringobject(array<string, array|string|int> $context) : string
Parameters
- $context : array<string, array|string|int>
-
current compile context
Return values
string —closure()
Get PHP code string from a closure of function as string
protected
static closure(array<string, array|string|int> $context, object $closure) : string
Parameters
- $context : array<string, array|string|int>
-
current compile context
- $closure : object
-
Closure object
Tags
Return values
string —replaceSafeString()
Replace SafeString class with alias class name
protected
static replaceSafeString(array<string, array|string|int> $context, string $str) : string
Parameters
- $context : array<string, array|string|int>
-
current compile context
- $str : string
-
the PHP code to be replaced
Return values
string —scanDependency()
Scan for required standalone functions
protected
static scanDependency(array<string, array|string|int> $context, string $code, string $ocode) : array<string|int, string|array>
Parameters
- $context : array<string, array|string|int>
-
current compile context
- $code : string
-
patched PHP code string of the method
- $ocode : string
-
original PHP code string of the method
Return values
array<string|int, string|array> —list of converted code and children array