PHP Class REBELinBLUE\Deployer\Scripts\Parser

Mostra file Open project: rebelinblue/deployer Class Usage Examples

Public Methods

Method Description
parseFile ( string $file, array $tokens = [] ) : string Load a file and parse the the content.
parseString ( string $script, array $tokens = [] ) : string Parse a string to replace the tokens.

Private Methods

Method Description
tidyScript ( string $script ) : string Cleans up things which are only in the script to make it easy to read but don't need to be sent to the server, i.e. comments.

Method Details

parseFile() public method

Load a file and parse the the content.
public parseFile ( string $file, array $tokens = [] ) : string
$file string
$tokens array
return string

parseString() public method

Parse a string to replace the tokens.
public parseString ( string $script, array $tokens = [] ) : string
$script string
$tokens array
return string