PHP 클래스 Voodoo\Core\Config

파일 보기 프로젝트 열기: voodoophp/voodoo 1 사용 예제들

공개 메소드들

메소드 설명
__callStatic ( type $name, type $args ) : Config Statically load any INI file. IE \Core\INI::Settings()->toArray()
__construct ( string $namespace ) Constructor
arrayToINI ( array $iniArray, integer $indent ) : String. To convert an array into a properly formatted INI file
get ( type $dotNotation = "", type $emptyValue = null ) : Mix Access value of an array with dot notation
getNamespace ( ) : Array Return the namespace data
loadFile ( type $file, type $keyname = "" ) To load an .ini file
namespaceExists ( ) : boolean Check if a namespace exists
save ( type $fileName = "" ) Save the ini file.
set ( array $data, type $keyName = "" ) Set data in the loaded
toArray ( ) : Array Return the INI array

메소드 상세

__callStatic() 공개 정적인 메소드

Statically load any INI file. IE \Core\INI::Settings()->toArray()
public static __callStatic ( type $name, type $args ) : Config
$name type
$args type
리턴 Config

__construct() 공개 메소드

Constructor
public __construct ( string $namespace )
$namespace string - A unique name that will hold data for each set of config

arrayToINI() 공개 정적인 메소드

To convert an array into a properly formatted INI file
public static arrayToINI ( array $iniArray, integer $indent ) : String.
$iniArray array
$indent integer
리턴 String.

get() 공개 메소드

Access value of an array with dot notation
public get ( type $dotNotation = "", type $emptyValue = null ) : Mix
$dotNotation type - the key. ie: Key.Field1
$emptyValue type - Use this value if empty
리턴 Mix ie self::get("QA.UpVoteQuestion"); Will return the value of [QA][UpVoteQuestion]

getNamespace() 공개 메소드

Return the namespace data
public getNamespace ( ) : Array
리턴 Array

loadFile() 공개 메소드

To load an .ini file
public loadFile ( type $file, type $keyname = "" )
$file type
$keyname type

namespaceExists() 공개 메소드

Check if a namespace exists
public namespaceExists ( ) : boolean
리턴 boolean

save() 공개 메소드

ATTENTION: It will remove all comments added. At this time, it's limited to 2 depth
public save ( type $fileName = "" )
$fileName type - The filename without the extension

set() 공개 메소드

Set data in the loaded
public set ( array $data, type $keyName = "" )
$data array
$keyName type

toArray() 공개 메소드

Return the INI array
public toArray ( ) : Array
리턴 Array