PHP Class LightnCandy\Exporter

Datei anzeigen Open project: zordius/lightncandy Class Usage Examples

Public Methods

Method Description
constants ( array\arraystring | integer> $context ) : string Export Runtime constants
helpers ( array\arraystring | integer> $context ) : string Export required custom helper functions
runtime ( array\arraystring | integer> $context ) : string Export required standalone Runtime methods
safestring ( array\arraystring | integer> $context ) : string Export SafeString class as string

Protected Methods

Method Description
closure ( array\arraystring | integer> $context, object $closure ) : string Get PHP code string from a closure of function as string
replaceSafeString ( array\arraystring | integer> $context, string $str ) : string Replace SafeString class with alias class name
scanDependency ( array\arraystring | integer> $context, string $code ) : array Scan for required standalone functions

Method Details

closure() protected static method

Get PHP code string from a closure of function as string
protected static closure ( array\arraystring | integer> $context, object $closure ) : string
$context array\arraystring | integer>
$closure object Closure object
return string

constants() public static method

Export Runtime constants
public static constants ( array\arraystring | integer> $context ) : string
$context array\arraystring | integer>
return string

helpers() public static method

Export required custom helper functions
public static helpers ( array\arraystring | integer> $context ) : string
$context array\arraystring | integer>
return string

replaceSafeString() protected static method

Replace SafeString class with alias class name
protected static replaceSafeString ( array\arraystring | integer> $context, string $str ) : string
$context array\arraystring | integer>
$str string the PHP code to be replaced
return string

runtime() public static method

Export required standalone Runtime methods
public static runtime ( array\arraystring | integer> $context ) : string
$context array\arraystring | integer>
return string

safestring() public static method

Export SafeString class as string
public static safestring ( array\arraystring | integer> $context ) : string
$context array\arraystring | integer>
return string

scanDependency() protected static method

Scan for required standalone functions
protected static scanDependency ( array\arraystring | integer> $context, string $code ) : array
$context array\arraystring | integer>
$code string PHP code string of the method
return array