MvcLite\Config
Registry
Data store for application level storage
- Author: Cory Collier <corycollier@corycollier.com>
Synopsis
- // constants
- const MSG_ERR_BAD_CONFIG = 'Configuration not loaded. Bad file provided';
- // Inherited constants from ObjectAbstract
- const MSG_ERR_IDENTIFY = 'Descendents must implement the identify method';
- // members
- protected array $data = ;
- // methods
- public Config init()
- public Config set()
- public Config get()
- public array getSection()
- public Config setAll()
- // Inherited methods from ObjectAbstract
- public final void __get()
- public final void __set()
- public final void __call()
- public void __toString()
- public string identify()
- // Inherited methods from Singleton
- public static Singleton getInstance()
Hierarchy
Coverage
Methods | 100% | 5 / 5 |
Lines | 100% | 24 / 24 |
Constants
Name | Value |
---|---|
MSG_ERR_BAD_CONFIG | 'Configuration not loaded. Bad file provided' |
MSG_ERR_IDENTIFY | 'Descendents must implement the identify method' |
Members
protected
- $data
—
array
Where all the config stuff goes - $instance
—
MvcLite\Traits\Singleton
Static instance variable
Methods
public
- get() — Getter for data.
- getSection() — Gets an entire section of the configuration, by name.
- init() — Init hook.
- set() — Setter for data.
- setAll() — Assigns multiple values to the config in a single method call.
Inherited from MvcLite\ObjectAbstract
public
- __call() — Overriding the __call magic method
- __get() — Overriding the __get magic method
- __set() — Overriding the __set magic method
- __toString() — returns a string representation of the object
- identify() — method used to identify the object instance
Inherited from MvcLite\Traits\Singleton
public
- getInstance() — Getter for the instance variable.
History
-
2016-01-07T15:52:01-05:00 (commit #1c337ff)
Author: Cory Collier (corycollier@corycollier.com) / Commiter: Cory Collier (corycollier@corycollier.com)
Removing the legacy Error class, removing composer requirements, Adding the Event class, updating the Config class to use sections when parsing ini files
-
2015-12-17T11:21:34-05:00 (commit #b93b112)
Author: Cory Collier (corycollier@corycollier.com) / Commiter: Cory Collier (corycollier@corycollier.com)
Adding support for section reading from the Config object. Setting default values to the view from the configuration. Adding the autoloader to the View, and using it to check for helper classes. Updating unit tests for the Request object. Implementation of Bootstrap in the default views created by the mvc script
-
2015-12-15T09:42:10-05:00 (commit #0bcf089)
Author: Cory Collier (corycollier@corycollier.com) / Commiter: Cory Collier (corycollier@corycollier.com)
A lot of code minor code cleanup. Updating some methods to split up code a bit
-
2015-12-14T07:49:04-05:00 (commit #6f81472)
Author: Cory Collier (corycollier@corycollier.com) / Commiter: Cory Collier (corycollier@corycollier.com)
Adding after_script directive for TravisCI, updating composer requiremetns, Cleaning up whitespace
-
2015-12-04T10:14:59-05:00 (commit #dc87501)
Author: Cory Collier (ccollier@redhat.com) / Commiter: Cory Collier (ccollier@redhat.com)
changing a constant in the Config class, to help with pdepend analyzers
-
2015-12-02T16:43:15-05:00 (commit #55a67b0)
Author: Cory Collier (ccollier@redhat.com) / Commiter: Cory Collier (ccollier@redhat.com)
BIG commit. Leveraging php5.4 shorthand for arrays, updating the skeleton app, Adding the Filepath trait, implementing the filepath trait, new Filters, Moved the registry to a new config class, created a new config trait, implemented new config trait, updated a TON of unit tests