PHP Class Transphporm\Builder

ファイルを表示 Open project: level-2/transphporm Class Usage Examples

Public Methods

Method Description
__construct ( $template, $tss = '', $modules = null )
loadModule ( transphporm\Module $module )
output ( $data = null, $document = false )
setCache ( ArrayAccess $cache )
setRootDir ( $rootDir )
setTime ( $time ) Would be better if PHP allowed setting the script clock, but this is the simplest way of overriding it

Private Methods

Method Description
doPostProcessing ( $template ) Add a postprocessing hook. This cleans up anything transphporm has added to the markup which needs to be removed
executeTssRule ( $rule, $template, $config ) Process a TSS rule e.g. `ul li {content: "foo"; format: bar}
getRules ( $template, $config ) N.b. only files can be cached
isValidDoc ( $xml )
loadTemplate ( ) Load a template, firstly check if it's a file or a valid string
processRules ( $template, $config )

Method Details

__construct() public method

public __construct ( $template, $tss = '', $modules = null )

loadModule() public method

public loadModule ( transphporm\Module $module )
$module transphporm\Module

output() public method

public output ( $data = null, $document = false )

setCache() public method

public setCache ( ArrayAccess $cache )
$cache ArrayAccess

setRootDir() public method

public setRootDir ( $rootDir )

setTime() public method

Would be better if PHP allowed setting the script clock, but this is the simplest way of overriding it
public setTime ( $time )