PHP Class Pipe\Environment

Inheritance: implements ArrayAccess
Datei anzeigen Open project: chh/pipe Class Usage Examples

Public Properties

Property 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

Property Type Description
$cssCompressor
$jsCompressor

Public Methods

Method 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 method

public __construct ( $root = null )

appendPath() public method

public appendPath ( $path )

contentType() public method

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

find() public method

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

logicalPath() public method

Calculates the logical path for the given absolute path
public logicalPath ( string $absolutePath ) : string
$absolutePath string
return string

offsetExists() public method

public offsetExists ( $offset )

offsetGet() public method

Sugar for find()
public offsetGet ( string $logicalPath ) : Asset
$logicalPath string
return Asset

offsetSet() public method

public offsetSet ( $offset, $value )

offsetUnset() public method

public offsetUnset ( $offset )

prependPath() public method

public prependPath ( $path )

registerBundleProcessor() public method

public registerBundleProcessor ( $contentType, $processor )

registerEngine() public method

public registerEngine ( $engine, $extension )

registerPostProcessor() public method

public registerPostProcessor ( $contentType, $processor )

registerPreProcessor() public method

public registerPreProcessor ( $contentType, $processor )

setCssCompressor() public method

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 method

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