PHP Class Autarky\Config\FileStore

Reads files from one or multiple directories, with the possibility of cascading for different environments and overriding of namespaces.
Inheritance: implements Autarky\Config\ConfigInterface
Afficher le fichier Open project: autarky/framework

Protected Properties

Свойство Type Description
$data array The loaded config data.
$environment string The current environment.
$loaderFactory LoaderFactory The loader factory instance.
$pathResolver Autarky\Files\PathResolver The path resolver instance.

Méthodes publiques

Méthode Description
__construct ( Autarky\Files\PathResolver $pathResolver, LoaderFactory $loaderFactory, string | null $environment = null ) Constructor.
get ( $key, $default = null )
getLoaderFactory ( ) : LoaderFactory Get the loader factory instance.
has ( $key )
mount ( $location, $path )
set ( $key, $value )
setEnvironment ( $environment )

Méthodes protégées

Méthode Description
getBasename ( $key )
getDataFromFile ( $path )
getPaths ( $basename )
loadData ( $key )

Method Details

__construct() public méthode

Constructor.
public __construct ( Autarky\Files\PathResolver $pathResolver, LoaderFactory $loaderFactory, string | null $environment = null )
$pathResolver Autarky\Files\PathResolver
$loaderFactory LoaderFactory
$environment string | null

get() public méthode

public get ( $key, $default = null )

getBasename() protected méthode

protected getBasename ( $key )

getDataFromFile() protected méthode

protected getDataFromFile ( $path )

getLoaderFactory() public méthode

Get the loader factory instance.
public getLoaderFactory ( ) : LoaderFactory
Résultat LoaderFactory

getPaths() protected méthode

protected getPaths ( $basename )

has() public méthode

public has ( $key )

loadData() protected méthode

protected loadData ( $key )

mount() public méthode

public mount ( $location, $path )

set() public méthode

public set ( $key, $value )

setEnvironment() public méthode

public setEnvironment ( $environment )

Property Details

$data protected_oe property

The loaded config data.
protected array $data
Résultat array

$environment protected_oe property

The current environment.
protected string $environment
Résultat string

$loaderFactory protected_oe property

The loader factory instance.
protected LoaderFactory,Autarky\Config $loaderFactory
Résultat LoaderFactory

$pathResolver protected_oe property

The path resolver instance.
protected PathResolver,Autarky\Files $pathResolver
Résultat Autarky\Files\PathResolver