PHP Class MiniAsset\Filter\Sprockets

Inheritance: extends MiniAsset\Filter\AssetFilter
显示文件 Open project: markstory/mini-asset

Protected Properties

Property Type Description
$_currentFile string The current file being processed, used for "" file inclusion.
$_loaded array A list of unique files already processed.
$_pattern stgin Regex pattern for finding //= require and //= require "file" style inclusions
$_scanner

Public Methods

Method Description
getDependencies ( AssetTarget $target ) {@inheritDoc}
input ( string $filename, string $content ) : string Input filter - preprocesses //=require statements

Protected Methods

Method Description
_findFile ( string $filename, string $path = null ) : string Locates sibling files, or uses AssetScanner to locate <> style dependencies.
_replace ( array $matches ) : string Performs the replacements and inlines dependencies.
_scanner ( )

Method Details

_findFile() protected method

Locates sibling files, or uses AssetScanner to locate <> style dependencies.
protected _findFile ( string $filename, string $path = null ) : string
$filename string The basename of the file needing to be found.
$path string The path for same directory includes.
return string Path to file.

_replace() protected method

Performs the replacements and inlines dependencies.
protected _replace ( array $matches ) : string
$matches array
return string content

_scanner() protected method

protected _scanner ( )

getDependencies() public method

{@inheritDoc}
public getDependencies ( AssetTarget $target )
$target MiniAsset\AssetTarget

input() public method

Input filter - preprocesses //=require statements
public input ( string $filename, string $content ) : string
$filename string
$content string
return string content

Property Details

$_currentFile protected_oe property

The current file being processed, used for "" file inclusion.
protected string $_currentFile
return string

$_loaded protected_oe property

A list of unique files already processed.
protected array $_loaded
return array

$_pattern protected_oe property

Regex pattern for finding //= require and //= require "file" style inclusions
protected stgin $_pattern
return stgin

$_scanner protected_oe property

protected $_scanner