Overview

Namespaces

  • Autarky
    • Config
      • Loaders
    • Console
    • Container
      • Exception
      • Factory
      • Proxy
    • Database
    • Errors
    • Events
    • Files
    • Http
    • Logging
    • Providers
    • Routing
      • Events
    • Testing
    • TwigTemplating
      • Extensions
    • Utils

Classes

  • ConfigProvider
  • FileStore
  • LoaderFactory

Interfaces

  • ConfigInterface
  • LoaderInterface

Exceptions

  • LoadException
  • Overview
  • Namespace
  • Class

Class FileStore

File-based config implementation.

Reads files from one or multiple directories, with the possibility of cascading for different environments and overriding of namespaces.

Autarky\Config\FileStore implements Autarky\Config\ConfigInterface
Namespace: Autarky\Config
Located at Config/FileStore.php
Methods summary
public
# __construct( Autarky\Files\PathResolver $pathResolver, Autarky\Config\LoaderFactory $loaderFactory, string|null $environment = null )

Constructor.

Constructor.

Parameters

$pathResolver
$loaderFactory
$environment
public Autarky\Config\LoaderFactory
# getLoaderFactory( )

Get the loader factory instance.

Get the loader factory instance.

Returns

Autarky\Config\LoaderFactory
public
# mount( string $location, string $path )

Mount a path to a specific location in the config tree.

Mount a path to a specific location in the config tree.

Parameters

$location
$path

Implementation of

Autarky\Config\ConfigInterface::mount()
public
# setEnvironment( string $environment )

Set the environment.

Set the environment.

Parameters

$environment

Implementation of

Autarky\Config\ConfigInterface::setEnvironment()
public boolean
# has( string $key )

Determine if a key exists in the store.

Determine if a key exists in the store.

Parameters

$key

Returns

boolean

Implementation of

Autarky\Config\ConfigInterface::has()
public mixed
# get( string $key, mixed $default = null )

Get an item from the store.

Get an item from the store.

Parameters

$key
$default
If the value is not found, return this instead.

Returns

mixed

Implementation of

Autarky\Config\ConfigInterface::get()
public
# set( string $key, mixed $value )

Set an item in the store temporarily - more specifically, the lifetime of the store object.

Set an item in the store temporarily - more specifically, the lifetime of the store object.

Parameters

$key
$value

Implementation of

Autarky\Config\ConfigInterface::set()
protected
# loadData( $key )
protected
# getBasename( $key )
protected
# getPaths( $basename )
protected
# getDataFromFile( $path )
Properties summary
protected Autarky\Files\PathResolver $pathResolver

The path resolver instance.

The path resolver instance.

#
protected Autarky\Config\LoaderFactory $loaderFactory

The loader factory instance.

The loader factory instance.

#
protected string $environment

The current environment.

The current environment.

#
protected array $data

The loaded config data.

The loaded config data.

# []
Autarky Framework API documentation generated by ApiGen