PHP Class Hostnet\Component\Webpack\Asset\TwigParser

Author: Harold Iedema ([email protected])
Show file Open project: hostnet/webpack-bundle Class Usage Examples

Public Methods

Method Description
__construct ( Tracker $tracker, Twig_Environment $twig, $cache_dir )
findSplitPoints ( string $template_file ) : array Returns an array of split points from the given template file.
hashInlineFileName ( $template_file, $block_index ) : string Consistently calculate file name hashes.

Private Methods

Method Description
expect ( $filename, Twig_Token $token, $type, $value = null )
getAssetFromStream ( $filename, Twig_TokenStream $stream )
resolveAssetPath ( string $asset, string $template_file, Twig_Token $token )
stripScript ( $str )

Method Details

__construct() public method

public __construct ( Tracker $tracker, Twig_Environment $twig, $cache_dir )
$tracker Tracker
$twig Twig_Environment

findSplitPoints() public method

Returns an array of split points from the given template file.
public findSplitPoints ( string $template_file ) : array
$template_file string
return array

hashInlineFileName() public static method

Consistently calculate file name hashes.
public static hashInlineFileName ( $template_file, $block_index ) : string
$template_file
$block_index
return string