PHP Class PPI\Framework\Config\Loader\YamlFileLoader

Author: Vítor Brandão ([email protected])
Inheritance: extends Symfony\Component\Config\Loader\FileLoader
Datei anzeigen Open project: ppi/framework

Public Methods

Method Description
load ( mixed $file, string $type = null ) : array Loads a Yaml file.
supports ( mixed $resource, string $type = null ) : boolean Returns true if this class supports the given resource.

Protected Methods

Method Description
loadFile ( string $file ) : array Loads a YAML file.
parseImports ( array $content, string $file ) : array Parses all imports. We support this to make Symfony users happy.
parseIncludes ( array $content, string $file ) : array Process the array for @include. We support this to make Zend users happy.

Method Details

load() public method

Loads a Yaml file.
public load ( mixed $file, string $type = null ) : array
$file mixed The resource
$type string The resource type
return array Array with configuration

loadFile() protected method

Loads a YAML file.
protected loadFile ( string $file ) : array
$file string
return array The file content

parseImports() protected method

Parses all imports. We support this to make Symfony users happy.
protected parseImports ( array $content, string $file ) : array
$content array
$file string
return array

parseIncludes() protected method

Process the array for @include. We support this to make Zend users happy.
See also: http://framework.zend.com/manual/2.0/en/modules/zend.config.reader.html#zend-config-reader-yaml
protected parseIncludes ( array $content, string $file ) : array
$content array
$file string
return array

supports() public method

Returns true if this class supports the given resource.
public supports ( mixed $resource, string $type = null ) : boolean
$resource mixed A resource
$type string The resource type
return boolean true if this class supports the given resource, false otherwise