Property | Type | Description | |
---|---|---|---|
$parser | PhpParser\Parser | The parser. | |
$printer | The printer. | ||
$traverser | ClassPreloader\Parser\NodeTraverser | The traverser. |
Method | Description | |
---|---|---|
__construct ( |
Create a new class preloader instance. | |
getCode ( string $file, $comments = true ) : string | Get a pretty printed string of code from a file while applying visitors. | |
prepareOutput ( string $output, boolean $strict = false ) : resource | Prepare the output file and directory. |
Method | Description | |
---|---|---|
getCodeWrappedIntoNamespace ( array $parsed, string $pretty ) : string | Wrap the code into a namespace. | |
parsedCodeHasNamespaces ( array $parsed ) : boolean | Check parsed code for having namespaces. |
public __construct ( |
||
$printer | ||
$parser | PhpParser\Parser | |
$traverser | ClassPreloader\Parser\NodeTraverser | |
return | void |
protected parsedCodeHasNamespaces ( array $parsed ) : boolean | ||
$parsed | array | |
return | boolean |
public prepareOutput ( string $output, boolean $strict = false ) : resource | ||
$output | string | |
$strict | boolean | |
return | resource |
protected Standard,PhpParser\PrettyPrinter $printer | ||
return |