Repository
class Repository extends NamespacedItemResolver implements ArrayAccess (View source)
Properties
protected array | $parsed | A cache of the parsed items. | from NamespacedItemResolver |
protected LoaderInterface | $loader | The loader implementation. | |
protected string | $environment | The current environment. | |
protected array | $items | All of the configuration items. | |
protected array | $packages | All of the registered packages. | |
protected array | $afterLoad | The after load callbacks for namespaces. |
Methods
array | parseKey(string $key) Parse a key into namespace, group, and item. | from NamespacedItemResolver |
array | parseBasicSegments(array $segments) Parse an array of basic segments. | from NamespacedItemResolver |
array | parseNamespacedSegments(string $key) Parse an array of namespaced segments. | |
void | setParsedKey(string $key, array $parsed) Set the parsed value of a key. | from NamespacedItemResolver |
void | __construct(LoaderInterface $loader, string $environment) Create a new configuration repository. | |
bool | has(string $key) Determine if the given configuration value exists. | |
bool | hasGroup(string $key) Determine if a configuration group exists. | |
mixed | get(string $key, mixed $default = null) Get the specified configuration value. | |
void | set(string $key, mixed $value) Set a given configuration value. | |
void | load(string $group, string $namespace, string $collection) Load the configuration group for the key. | |
array | callAfterLoad(string $namespace, string $group, array $items) Call the after load callback for a namespace. | |
array | parsePackageSegments(string $key, string $namespace, string $item) Parse the segments of a package namespace. | |
void | package(string $package, string $hint, string $namespace = null) Register a package for cascading configuration. | |
string | getPackageNamespace(string $package, string $namespace) Get the configuration namespace for a package. | |
void | afterLoading(string $namespace, Closure $callback) Register an after load callback for a given namespace. | |
string | getCollection(string $group, string $namespace = null) Get the collection identifier. | |
void | addNamespace(string $namespace, string $hint) Add a new namespace to the loader. | |
array | getNamespaces() Returns all registered namespaces with the config loader. | |
LoaderInterface | getLoader() Get the loader implementation. | |
void | setLoader(LoaderInterface $loader) Set the loader implementation. | |
string | getEnvironment() Get the current configuration environment. | |
array | getAfterLoadCallbacks() Get the after load callback array. | |
array | getItems() Get all of the configuration items. | |
bool | offsetExists(string $key) Determine if the given configuration option exists. | |
mixed | offsetGet(string $key) Get a configuration option. | |
void | offsetSet(string $key, mixed $value) Set a configuration option. | |
void | offsetUnset(string $key) Unset a configuration option. |
Details
array parseKey(string $key)
Parse a key into namespace, group, and item.
protected array parseBasicSegments(array $segments)
Parse an array of basic segments.
protected array parseNamespacedSegments(string $key)
Parse an array of namespaced segments.
void setParsedKey(string $key, array $parsed)
Set the parsed value of a key.
void __construct(LoaderInterface $loader, string $environment)
Create a new configuration repository.
bool has(string $key)
Determine if the given configuration value exists.
bool hasGroup(string $key)
Determine if a configuration group exists.
mixed get(string $key, mixed $default = null)
Get the specified configuration value.
void set(string $key, mixed $value)
Set a given configuration value.
protected void load(string $group, string $namespace, string $collection)
Load the configuration group for the key.
protected array callAfterLoad(string $namespace, string $group, array $items)
Call the after load callback for a namespace.
protected array parsePackageSegments(string $key, string $namespace, string $item)
Parse the segments of a package namespace.
void package(string $package, string $hint, string $namespace = null)
Register a package for cascading configuration.
protected string getPackageNamespace(string $package, string $namespace)
Get the configuration namespace for a package.
void afterLoading(string $namespace, Closure $callback)
Register an after load callback for a given namespace.
protected string getCollection(string $group, string $namespace = null)
Get the collection identifier.
void addNamespace(string $namespace, string $hint)
Add a new namespace to the loader.
array getNamespaces()
Returns all registered namespaces with the config loader.
LoaderInterface getLoader()
Get the loader implementation.
void setLoader(LoaderInterface $loader)
Set the loader implementation.
string getEnvironment()
Get the current configuration environment.
array getAfterLoadCallbacks()
Get the after load callback array.
array getItems()
Get all of the configuration items.
bool offsetExists(string $key)
Determine if the given configuration option exists.
mixed offsetGet(string $key)
Get a configuration option.
void offsetSet(string $key, mixed $value)
Set a configuration option.
void offsetUnset(string $key)
Unset a configuration option.
© Taylor Otwell
Licensed under the MIT License.
Laravel is a trademark of Taylor Otwell.
https://laravel.com/api/4.2/Illuminate/Config/Repository.html