-
Docs
Backend
-
Behaviors
-
Classes
-
Controllers
-
Database
-
Seeds
-
-
Facades
-
FormWidgets
-
Helpers
-
Exception
- Backend
-
-
Models
-
ReportWidgets
-
Skins
-
Traits
-
Widgets
- ServiceProvider
-
-
Cms
-
Classes
- Asset
- AutoDatasource
- CmsCompoundObject
- CmsController
- CmsException
- CmsObject
- CmsObjectCollection
- CodeBase
- CodeParser
- ComponentBase
- ComponentHelpers
- ComponentManager
- ComponentPartial
- Content
- Controller
- Layout
- LayoutCode
- MediaLibrary
- MediaLibraryItem
- MediaViewHelper
- Meta
- ObjectMemoryCache
- Page
- PageCode
- Partial
- PartialCode
- PartialStack
- Router
- Theme
- ThemeManager
-
Components
-
Contracts
-
Controllers
-
Facades
-
FormWidgets
-
Helpers
-
Models
-
ReportWidgets
-
Traits
-
Twig
- ComponentNode
- ComponentTokenParser
- ContentNode
- ContentTokenParser
- DebugExtension
- DefaultNode
- DefaultTokenParser
- Extension
- FlashNode
- FlashTokenParser
- FrameworkNode
- FrameworkTokenParser
- Loader
- PageNode
- PageTokenParser
- PartialNode
- PartialTokenParser
- PlaceholderNode
- PlaceholderTokenParser
- PutNode
- PutTokenParser
- ScriptsNode
- ScriptsTokenParser
- StylesNode
- StylesTokenParser
-
Widgets
- ServiceProvider
-
-
System
-
Behaviors
-
Classes
-
Console
-
Controllers
-
Database
-
Helpers
-
Models
-
ReportWidgets
-
Traits
-
Twig
- ServiceProvider
-
-
Events
-
backend
-
ajax
-
filter
-
form
-
list
-
menu
-
page
-
user
-
-
cms
-
ajax
-
block
-
combiner
-
component
-
object
-
page
-
router
-
template
-
theme
-
-
halcyon
-
datasource
-
-
mailer
-
media
-
model
-
system
-
assets
-
console
-
mirror
-
theme
-
-
reportwidgets
-
settings
- extendConfigFile
-
-
translator
-
-
Library
-
Argon
-
Auth
-
Models
- AuthException
- Manager
-
-
Config
-
Cookie
-
Middleware
-
-
Database
-
Attach
-
Behaviors
-
Concerns
-
Connections
-
Connectors
-
Models
-
Relations
-
Schema
-
Traits
-
Updates
- README
- Builder
- Collection
- DatabaseServiceProvider
- DataFeed
- Dongle
- MemoryCache
- Model
- ModelBehavior
- ModelException
- NestedTreeScope
- Pivot
- QueryBuilder
- SortableScope
- TreeCollection
- Updater
-
-
Events
-
Exception
-
Extension
-
Filesystem
-
Flash
-
Foundation
-
Bootstrap
-
Console
-
Exception
-
Http
-
Middleware
- Kernel
-
-
Providers
- Application
- Maker
-
-
Halcyon
-
Datasource
-
Exception
-
Processors
-
Traits
- README
- Builder
- Collection
- HalcyonServiceProvider
- MemoryCacheManager
- MemoryRepository
- Model
-
-
Html
-
Mail
-
Network
-
Parse
-
Router
-
Scaffold
-
Support
-
Translation
-
- Documentation
- API
- Library
- Config
- Repository
October\Rain\Config\Repository
Source: ~/vendor/october/rain/src/Config/Repository.php
Implements:
- ArrayAccess
- Illuminate\Contracts\Config\Repository
October config repository class.
Protected properties
protected October\Rain\Config\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.
protected array $keyParserCache
A cache of the parsed items.
Public methods
public void __construct(October\Rain\Config\LoaderInterface $loader, string $environment)
Create a new configuration repository.
Parameters
- October\Rain\Config\LoaderInterface $loader
- string $environment
public void addNamespace(string $namespace, string $hint)
Add a new namespace to the loader.
Parameters
- string $namespace
- string $hint
public void afterLoading(string $namespace, Closure $callback)
Register an after load callback for a given namespace.
Parameters
- string $namespace
- Closure $callback
public array all()
Get all of the configuration items for the application.
public mixed get(string $key, mixed $default=NULL)
Get the specified configuration value.
Parameters
- string $key
- mixed $default
public array getAfterLoadCallbacks()
Get the after load callback array.
public string getEnvironment()
Get the current configuration environment.
public array getItems()
Get all of the configuration items.
public October\Rain\Config\LoaderInterface getLoader()
Get the loader implementation.
public array getNamespaces()
Returns all registered namespaces with the config loader.
public bool has(string $key)
Determine if the given configuration value exists.
Parameters
- string $key
public bool hasGroup(string $key)
Determine if a configuration group exists.
Parameters
- string $key
public bool offsetExists(string $key)
Determine if the given configuration option exists.
Parameters
- string $key
public mixed offsetGet(string $key)
Get a configuration option.
Parameters
- string $key
public void offsetSet(string $key, mixed $value)
Set a configuration option.
Parameters
- string $key
- mixed $value
public void offsetUnset(string $key)
Unset a configuration option.
Parameters
- string $key
public void package(string $namespace, string $hint)
Register a package for cascading configuration.
Parameters
- string $namespace
- string $hint
public array parseConfigKey(string $key)
Parse a key into namespace, group, and item.
Parameters
- string $key
public array parseKey(string $key)
Parse a key into namespace, group, and item.
Parameters
- string $key
public void prepend(string $key, mixed $value)
Prepend a value onto an array configuration value.
Parameters
- string $key
- mixed $value
public void push(string $key, mixed $value)
Push a value onto an array configuration value.
Parameters
- string $key
- mixed $value
public void set(array|string $key, mixed $value=NULL)
Set a given configuration value.
Parameters
- array|string $key
- mixed $value
public void setLoader(October\Rain\Config\LoaderInterface $loader)
Set the loader implementation.
Parameters
public void setParsedKey(string $key, array $parsed)
Set the parsed value of a key.
Parameters
- string $key
- array $parsed
Protected methods
protected array callAfterLoad(string $namespace, string $group, array $items)
Call the after load callback for a namespace.
Parameters
- string $namespace
- string $group
- array $items
protected string getCollection(string $group, string $namespace=NULL)
Get the collection identifier.
Parameters
- string $group
- string $namespace
protected array keyParserParseBasicSegments(array $segments)
Parse an array of basic segments.
Parameters
- array $segments
protected array keyParserParseSegments(string $key)
Parse an array of namespaced segments.
Parameters
- string $key
protected void load(string $group, string $namespace, string $collection)
Load the configuration group for the key.
Parameters
- string $group
- string $namespace
- string $collection
protected array parseNamespacedSegments(string $key)
Parse an array of namespaced segments.
Parameters
- string $key
protected array parsePackageSegments(string $key, string $namespace, string $item)
Parse the segments of a package namespace.
Parameters
- string $key
- string $namespace
- string $item