# Class Exporter

LightnCandy major static class

Namespace: LightnCandy
Located at Exporter.php

Methods summary
`protected static string` | # `closure( array<string,array|string|integer> $context, object $closure )` Get PHP code string from a closure of function as string Get PHP code string from a closure of function as string #### Parameters $context current compile context $closure Closure object #### Returns string #### Expect 'function($a) {return;}' when input array('flags' => array('standalone' => 0)), function ($a) {return;} 'function($a) {return;}' when input array('flags' => array('standalone' => 0)), function ($a) {return;}
`public static string` | # `helpers( array<string,array|string|integer> $context )` Export required custom helper functions Export required custom helper functions #### Parameters $context current compile context #### Returns string
`protected static string` | # `replaceSafeString( array<string,array|string|integer> $context, string $str )` Replace SafeString class with alias class name Replace SafeString class with alias class name #### Parameters $context current compile context $str the PHP code to be replaced #### Returns string
`public static array` | # `getClassMethods( array<string,array|string|integer> $context, ReflectionClass $class )` Get methods from ReflectionClass Get methods from ReflectionClass #### Parameters $context current compile context $class instance of the ReflectionClass #### Returns array
`public static string` | # `getClassStatics( ReflectionClass $class )` Get statics code from ReflectionClass Get statics code from ReflectionClass #### Parameters $class instance of the ReflectionClass #### Returns string
`public static array` | # `getMeta( object $refobj )` Get metadata from ReflectionObject Get metadata from ReflectionObject #### Parameters $refobj instance of the ReflectionObject #### Returns array
`public static string` | # `safestring( array<string,array|string|integer> $context )` Export SafeString class as string Export SafeString class as string #### Parameters $context current compile context #### Returns string
`public static string` | # `stringobject( array<string,array|string|integer> $context )` Export StringObject class as string Export StringObject class as string #### Parameters $context current compile context #### Returns string
`public static string` | # `runtime( array<string,array|string|integer> $context )` Export required standalone Runtime methods Export required standalone Runtime methods #### Parameters $context current compile context #### Returns string
`public static string` | # `constants( array<string,array|string|integer> $context )` Export Runtime constants Export Runtime constants #### Parameters $context current compile context #### Returns string
`protected static array<string|array>` | # `scanDependency( array<string,array|string|integer> $context, string $code, string $ocode )` Scan for required standalone functions Scan for required standalone functions #### Parameters $context current compile context $code patched PHP code string of the method $ocode original PHP code string of the method #### Returns array<string|array> list of converted code and children array