PHP 클래스 Pop\Config

저자: Nick Sagona, III ([email protected])
파일 보기 프로젝트 열기: nicksagona/PopPHP 1 사용 예제들

보호된 프로퍼티들

프로퍼티 타입 설명
$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

공개 메소드들

메소드 설명
__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

보호된 메소드들

메소드 설명
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

메소드 상세

__construct() 공개 메소드

Instantiate a config object
public __construct ( array $config = [], boolean $changes = false ) : Config
$config array
$changes boolean
리턴 Config

__get() 공개 메소드

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

__isset() 공개 메소드

Return the isset value of config[$name].
public __isset ( string $name ) : boolean
$name string
리턴 boolean

__set() 공개 메소드

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

__unset() 공개 메소드

Unset config[$name].
public __unset ( string $name ) : void
$name string
리턴 void

asArray() 공개 메소드

Method to get the config values as an array
public asArray ( ) : array
리턴 array

asArrayObject() 공개 메소드

Method to get the config values as an ArrayObject
public asArrayObject ( ) : array
리턴 array

changesAllowed() 공개 메소드

Method to return if changes to the config are allowed.
public changesAllowed ( ) : boolean
리턴 boolean

factory() 공개 정적인 메소드

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
리턴 Config

get() 공개 메소드

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

getConfig() 보호된 메소드

Method to get the config values as array
protected getConfig ( ) : void
리턴 void

getConfigObject() 보호된 메소드

Method to get the config values as ArrayObject
protected getConfigObject ( ) : void
리턴 void

merge() 공개 메소드

Method to merge the values of another config object into this one
public merge ( mixed $config ) : Config
$config mixed
리턴 Config

setConfig() 보호된 메소드

Method to set the config values
protected setConfig ( array $config ) : void
$config array
리턴 void

프로퍼티 상세

$allowChanges 보호되어 있는 프로퍼티

Flag for whether or not changes are allowed after object instantiation
protected bool $allowChanges
리턴 boolean

$array 보호되어 있는 프로퍼티

Config values as an array
protected array $array
리턴 array

$config 보호되어 있는 프로퍼티

Config values as config objects
protected array $config
리턴 array