PHP Class Pipe\Environment

Inheritance: implements ArrayAccess
Afficher le fichier Open project: chh/pipe Class Usage Examples

Méthodes publiques

Свойство Type Description
$bundleProcessors
$compressors
$contentTypes # Map of file extensions to content types.
$engines # Engine Registry, stores engines per file extension.
$loadPaths # Stack of Load Paths for Assets.
$postProcessors
$preProcessors # a mime type.

Protected Properties

Свойство Type Description
$cssCompressor
$jsCompressor

Méthodes publiques

Méthode Description
__construct ( $root = null )
appendPath ( $path )
contentType ( string $extension ) : string Returns the content type for the extension, .e.g. "application/javascript" for ".js".
find ( string $logicalPath, array $options = [] ) : Asset Finds the logical path in the stack of load paths and returns the Asset.
logicalPath ( string $absolutePath ) : string Calculates the logical path for the given absolute path
offsetExists ( $offset )
offsetGet ( string $logicalPath ) : Asset Sugar for find()
offsetSet ( $offset, $value )
offsetUnset ( $offset )
prependPath ( $path )
registerBundleProcessor ( $contentType, $processor )
registerEngine ( $engine, $extension )
registerPostProcessor ( $contentType, $processor )
registerPreProcessor ( $contentType, $processor )
setCssCompressor ( string $compressor ) Set the CSS compressor
setJsCompressor ( string $compressor ) Set the JS compressor

Method Details

__construct() public méthode

public __construct ( $root = null )

appendPath() public méthode

public appendPath ( $path )

contentType() public méthode

Returns the content type for the extension, .e.g. "application/javascript" for ".js".
public contentType ( string $extension ) : string
$extension string
Résultat string

find() public méthode

Example: find('application.js', ['bundled' => true]);
public find ( string $logicalPath, array $options = [] ) : Asset
$logicalPath string Path relative to the load path.
$options array
Résultat Asset

logicalPath() public méthode

Calculates the logical path for the given absolute path
public logicalPath ( string $absolutePath ) : string
$absolutePath string
Résultat string

offsetExists() public méthode

public offsetExists ( $offset )

offsetGet() public méthode

Sugar for find()
public offsetGet ( string $logicalPath ) : Asset
$logicalPath string
Résultat Asset

offsetSet() public méthode

public offsetSet ( $offset, $value )

offsetUnset() public méthode

public offsetUnset ( $offset )

prependPath() public méthode

public prependPath ( $path )

registerBundleProcessor() public méthode

public registerBundleProcessor ( $contentType, $processor )

registerEngine() public méthode

public registerEngine ( $engine, $extension )

registerPostProcessor() public méthode

public registerPostProcessor ( $contentType, $processor )

registerPreProcessor() public méthode

public registerPreProcessor ( $contentType, $processor )

setCssCompressor() public méthode

Adds the compressor class as bundle processor for CSS files. See $compressors for all available compressors.
public setCssCompressor ( string $compressor )
$compressor string Identifier of the compressor

setJsCompressor() public méthode

Adds the compressor class as bundle processor for JavaScript files. See $compressors for all available compressors.
public setJsCompressor ( string $compressor )
$compressor string Identifier of the compressor

Property Details

$bundleProcessors public_oe property

public $bundleProcessors

$compressors public_oe property

public $compressors

$contentTypes public_oe property

# Map of file extensions to content types.
public $contentTypes

$cssCompressor protected_oe property

protected $cssCompressor

$engines public_oe property

# Engine Registry, stores engines per file extension.
public $engines

$jsCompressor protected_oe property

protected $jsCompressor

$loadPaths public_oe property

# Stack of Load Paths for Assets.
public $loadPaths

$postProcessors public_oe property

public $postProcessors

$preProcessors public_oe property

# a mime type.
public $preProcessors