PHP Class Xpressengine\Document\ConfigHandler

## 사용법 ### Default config 조회 php $config = $configHandler->getDefault(); ### Config 조회 php $config = $configHandler->get('instance-id'); ### Config 목록 조회 php $configs = $configHandler->gets(); ### Config 생성 * 인스턴스 생성할 때 Document Config 추가가 php $params = []; $config = $configHandler->makeEntity('instance-id', $params); $config = $configHandler->add($config); ### Config 수정 php $config = $config; $configHandler->put($config); ### Config 삭제 php $config = $config; $configHandler->remove($config);
Author: XE Team (developers) ([email protected])
Exibir arquivo Open project: xpressengine/xpressengine Class Usage Examples

Protected Properties

Property Type Description
$configManager Xpressengine\Config\ConfigManager ConfigManager instance
$default array

Public Methods

Method Description
__construct ( ConfigManager $configManager ) create instance
add ( ConfigEntity $config ) : ConfigEntity create document instance
get ( string $instanceId = null ) : ConfigEntity get config Entity $instanceId 가 없을 경우 default config 반환
getConfigManager ( ) : ConfigManager get config handler instance
getDefault ( ) : ConfigEntity get default config
getOrDefault ( string $instanceId ) : ConfigEntity Return default config when cannot found config
gets ( ) : array config entity list 반환 list of ConfigEntity
make ( string $instanceId, array $params ) : ConfigEntity 새로운 document config entity 를 만들어 반환
put ( ConfigEntity $config ) : ConfigEntity update document instance config * Cannot changed 'division', 'revision' configure.
remove ( ConfigEntity $config ) : void drop document instance

Method Details

__construct() public method

create instance
public __construct ( ConfigManager $configManager )
$configManager Xpressengine\Config\ConfigManager ConfigManager instance

add() public method

create document instance
public add ( ConfigEntity $config ) : ConfigEntity
$config Xpressengine\Config\ConfigEntity document instance config
return Xpressengine\Config\ConfigEntity

get() public method

get config Entity $instanceId 가 없을 경우 default config 반환
public get ( string $instanceId = null ) : ConfigEntity
$instanceId string instance id
return Xpressengine\Config\ConfigEntity

getConfigManager() public method

get config handler instance
public getConfigManager ( ) : ConfigManager
return Xpressengine\Config\ConfigManager

getDefault() public method

get default config
public getDefault ( ) : ConfigEntity
return Xpressengine\Config\ConfigEntity

getOrDefault() public method

Return default config when cannot found config
public getOrDefault ( string $instanceId ) : ConfigEntity
$instanceId string instance id
return Xpressengine\Config\ConfigEntity

gets() public method

config entity list 반환 list of ConfigEntity
public gets ( ) : array
return array

make() public method

새로운 document config entity 를 만들어 반환
public make ( string $instanceId, array $params ) : ConfigEntity
$instanceId string instance id
$params array parameters
return Xpressengine\Config\ConfigEntity

put() public method

update document instance config * Cannot changed 'division', 'revision' configure.
public put ( ConfigEntity $config ) : ConfigEntity
$config Xpressengine\Config\ConfigEntity document instance config
return Xpressengine\Config\ConfigEntity

remove() public method

drop document instance
public remove ( ConfigEntity $config ) : void
$config Xpressengine\Config\ConfigEntity config
return void

Property Details

$configManager protected_oe property

ConfigManager instance
protected ConfigManager,Xpressengine\Config $configManager
return Xpressengine\Config\ConfigManager

$default protected_oe property

protected array $default
return array