PHP Class Hostnet\Component\Webpack\Asset\TwigParser

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

Méthodes publiques

Méthode 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

Méthode 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 méthode

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

findSplitPoints() public méthode

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

hashInlineFileName() public static méthode

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