PHP Class Gc\Mvc\Resolver\AssetAliasPathStack

Inheritance: implements AssetManager\Resolver\ResolverInterface, implements AssetManager\Resolver\MimeResolverAwareInterface
Mostrar archivo Open project: gotcms/gotcms Class Usage Examples

Protected Properties

Property Type Description
$aliases Array Aliases
$lfiProtectionOn boolean Flag indicating whether or not LFI protection for rendering view scripts is enabled
$mimeResolver AssetManager\Service\MimeResolver The mime resolver.
$serviceLocator Zend\ServiceManager\ServiceManager The service manager.

Public Methods

Method Description
__construct ( Zend\ServiceManager\ServiceManager $serviceManager = null ) Constructor
addAlias ( string $alias, string $path ) : void Add a single alias to the stack
getMimeResolver ( ) : AssetManager\Service\MimeResolver Get the mime resolver
isLfiProtectionOn ( ) : boolean Return status of LFI protection flag
resolve ( string $name ) : null | Assetic\Asset\FileAsset Resolve an Asset
setLfiProtection ( boolean $flag ) : self Set LFI protection flag
setMimeResolver ( AssetManager\Service\MimeResolver $resolver ) : void Set the mime resolver

Protected Methods

Method Description
loadDatatypesAliases ( ) : void Load Datatypes aliases
loadModulesAliases ( ) : void Load module aliases
normalizePath ( string $path ) : string Normalize a path for insertion in the stack

Method Details

__construct() public method

Populate the array stack with a list of aliases and their corresponding paths
public __construct ( Zend\ServiceManager\ServiceManager $serviceManager = null )
$serviceManager Zend\ServiceManager\ServiceManager Service Manager

addAlias() public method

Add a single alias to the stack
public addAlias ( string $alias, string $path ) : void
$alias string Alias
$path string Path
return void

getMimeResolver() public method

Get the mime resolver
public getMimeResolver ( ) : AssetManager\Service\MimeResolver
return AssetManager\Service\MimeResolver

isLfiProtectionOn() public method

Return status of LFI protection flag
public isLfiProtectionOn ( ) : boolean
return boolean

loadDatatypesAliases() protected method

Load Datatypes aliases
protected loadDatatypesAliases ( ) : void
return void

loadModulesAliases() protected method

Load module aliases
protected loadModulesAliases ( ) : void
return void

normalizePath() protected method

Normalize a path for insertion in the stack
protected normalizePath ( string $path ) : string
$path string Path to normalize
return string

resolve() public method

Resolve an Asset
public resolve ( string $name ) : null | Assetic\Asset\FileAsset
$name string The path to resolve.
return null | Assetic\Asset\FileAsset Asset instance when found, null when not.

setLfiProtection() public method

Set LFI protection flag
public setLfiProtection ( boolean $flag ) : self
$flag boolean Define if lfi protection is active
return self

setMimeResolver() public method

Set the mime resolver
public setMimeResolver ( AssetManager\Service\MimeResolver $resolver ) : void
$resolver AssetManager\Service\MimeResolver Resolver
return void

Property Details

$aliases protected_oe property

Aliases
protected Array $aliases
return Array

$lfiProtectionOn protected_oe property

Flag indicating whether or not LFI protection for rendering view scripts is enabled
protected bool $lfiProtectionOn
return boolean

$mimeResolver protected_oe property

The mime resolver.
protected MimeResolver,AssetManager\Service $mimeResolver
return AssetManager\Service\MimeResolver

$serviceLocator protected_oe property

The service manager.
protected ServiceManager,Zend\ServiceManager $serviceLocator
return Zend\ServiceManager\ServiceManager