PHP Class ClassPreloader\ClassPreloader

This is the main point of entry for interacting with this package.
Afficher le fichier Open project: classpreloader/classpreloader Class Usage Examples

Protected Properties

Свойство Type Description
$parser PhpParser\Parser The parser.
$printer PhpParser\PrettyPrinter\Standard The printer.
$traverser ClassPreloader\Parser\NodeTraverser The traverser.

Méthodes publiques

Méthode Description
__construct ( Standard $printer, PhpParser\Parser $parser, ClassPreloader\Parser\NodeTraverser $traverser ) : void 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.

Méthodes protégées

Méthode Description
getCodeWrappedIntoNamespace ( array $parsed, string $pretty ) : string Wrap the code into a namespace.
parsedCodeHasNamespaces ( array $parsed ) : boolean Check parsed code for having namespaces.

Method Details

__construct() public méthode

Create a new class preloader instance.
public __construct ( Standard $printer, PhpParser\Parser $parser, ClassPreloader\Parser\NodeTraverser $traverser ) : void
$printer PhpParser\PrettyPrinter\Standard
$parser PhpParser\Parser
$traverser ClassPreloader\Parser\NodeTraverser
Résultat void

getCode() public méthode

Get a pretty printed string of code from a file while applying visitors.
public getCode ( string $file, $comments = true ) : string
$file string
Résultat string

getCodeWrappedIntoNamespace() protected méthode

Wrap the code into a namespace.
protected getCodeWrappedIntoNamespace ( array $parsed, string $pretty ) : string
$parsed array
$pretty string
Résultat string

parsedCodeHasNamespaces() protected méthode

Check parsed code for having namespaces.
protected parsedCodeHasNamespaces ( array $parsed ) : boolean
$parsed array
Résultat boolean

prepareOutput() public méthode

Prepare the output file and directory.
public prepareOutput ( string $output, boolean $strict = false ) : resource
$output string
$strict boolean
Résultat resource

Property Details

$parser protected_oe property

The parser.
protected Parser,PhpParser $parser
Résultat PhpParser\Parser

$printer protected_oe property

The printer.
protected Standard,PhpParser\PrettyPrinter $printer
Résultat PhpParser\PrettyPrinter\Standard

$traverser protected_oe property

The traverser.
protected NodeTraverser,ClassPreloader\Parser $traverser
Résultat ClassPreloader\Parser\NodeTraverser