PHP Class Pop\Config

Author: Nick Sagona, III ([email protected])
Afficher le fichier Open project: nicksagona/PopPHP Class Usage Examples

Protected Properties

Свойство Type Description
$allowChanges boolean Flag for whether or not changes are allowed after object instantiation
$array array Config values as an array
$config array Config values as config objects

Méthodes publiques

Méthode Description
__construct ( array $config = [], boolean $changes = false ) : Config Constructor
__get ( string $name ) : mixed Magic get method to return the value of config[$name].
__isset ( string $name ) : boolean Return the isset value of config[$name].
__set ( string $name, mixed $value ) : void Set method to set the property to the value of config[$name].
__unset ( string $name ) : void Unset config[$name].
asArray ( ) : array Method to get the config values as an array
asArrayObject ( ) : array Method to get the config values as an ArrayObject
changesAllowed ( ) : boolean Method to return if changes to the config are allowed.
factory ( array $config = [], boolean $changes = false ) : Config Static method to instantiate the config object and return itself to facilitate chaining methods together.
get ( string $name ) : mixed Get method to return the value of config[$name].
merge ( mixed $config ) : Config Method to merge the values of another config object into this one

Méthodes protégées

Méthode Description
getConfig ( ) : void Method to get the config values as array
getConfigObject ( ) : void Method to get the config values as ArrayObject
setConfig ( array $config ) : void Method to set the config values

Method Details

__construct() public méthode

Instantiate a config object
public __construct ( array $config = [], boolean $changes = false ) : Config
$config array
$changes boolean
Résultat Config

__get() public méthode

Magic get method to return the value of config[$name].
public __get ( string $name ) : mixed
$name string
Résultat mixed

__isset() public méthode

Return the isset value of config[$name].
public __isset ( string $name ) : boolean
$name string
Résultat boolean

__set() public méthode

Set method to set the property to the value of config[$name].
public __set ( string $name, mixed $value ) : void
$name string
$value mixed
Résultat void

__unset() public méthode

Unset config[$name].
public __unset ( string $name ) : void
$name string
Résultat void

asArray() public méthode

Method to get the config values as an array
public asArray ( ) : array
Résultat array

asArrayObject() public méthode

Method to get the config values as an ArrayObject
public asArrayObject ( ) : array
Résultat array

changesAllowed() public méthode

Method to return if changes to the config are allowed.
public changesAllowed ( ) : boolean
Résultat boolean

factory() public static méthode

Static method to instantiate the config object and return itself to facilitate chaining methods together.
public static factory ( array $config = [], boolean $changes = false ) : Config
$config array
$changes boolean
Résultat Config

get() public méthode

Get method to return the value of config[$name].
public get ( string $name ) : mixed
$name string
Résultat mixed

getConfig() protected méthode

Method to get the config values as array
protected getConfig ( ) : void
Résultat void

getConfigObject() protected méthode

Method to get the config values as ArrayObject
protected getConfigObject ( ) : void
Résultat void

merge() public méthode

Method to merge the values of another config object into this one
public merge ( mixed $config ) : Config
$config mixed
Résultat Config

setConfig() protected méthode

Method to set the config values
protected setConfig ( array $config ) : void
$config array
Résultat void

Property Details

$allowChanges protected_oe property

Flag for whether or not changes are allowed after object instantiation
protected bool $allowChanges
Résultat boolean

$array protected_oe property

Config values as an array
protected array $array
Résultat array

$config protected_oe property

Config values as config objects
protected array $config
Résultat array