class SkinInstanceStore

특정 타겟에 지정된 스킨과 그 스킨의 설정 정보(config data)를 저장하는 저장소이다.

Constants

PREFIX_KEY_SELECTED

지정된 스킨정보를 조회할 때 사용하는 key

PREFIX_KEY_CONFIGS

스킨의 설정정보를 조회할 때 사용하는 key

SKIN_MODE_DESKTOP

데스크탑 버전

SKIN_MODE_MOBILE

모바일 버전

Properties

private ConfigManager $store

Methods

__construct(ConfigManager $store)

SkinInstanceStore constructor.

void
setStore(ConfigManager $store)

저장소(persistence storage)를 지정한다.

array|string
getSelectedSkin(string $key, string $mode = null)

주어진 key에 지정된 스킨을 조회한다.

void
setSelectedSkin(string $key, string $mode, string $skinId = null)

주어진 타겟에 주어진 스킨을 지정한다. 두번째 파라메터가 배열일 경우, 두가지 모드의 스킨을 동시에 저장하는 것으로 간주한다.

mixed
getConfigs(string $key, string $skinId = null)

주어진 타겟과 그 타겟에 지정된 스킨의 설정정보를 가져온다. 주어진 타겟에 한번이라도 지정된 적이 있는 스킨정보를 모두 가져온다.

void
setConfigs(string $key, string $skinId, array $config = null)

주어진 타겟에 지정된 스킨의 설정을 저장한다.

string
makeStoreKey(string $type, string $key)

주어진 키를 조합하여 저장소(persistence storage)에 조회할 키를 생성한다.

Details

at line 60
__construct(ConfigManager $store)

SkinInstanceStore constructor.

Parameters

ConfigManager $store XpressEngine Config를 저장소(persistence storage)로 사용한다.

at line 72
void setStore(ConfigManager $store)

저장소(persistence storage)를 지정한다.

Parameters

ConfigManager $store config store

Return Value

void

at line 86
array|string getSelectedSkin(string $key, string $mode = null)

주어진 key에 지정된 스킨을 조회한다.

Parameters

string $key target key
string $mode 'mobile' or 'desktop'

Return Value

array|string

at line 107
void setSelectedSkin(string $key, string $mode, string $skinId = null)

주어진 타겟에 주어진 스킨을 지정한다. 두번째 파라메터가 배열일 경우, 두가지 모드의 스킨을 동시에 저장하는 것으로 간주한다.

['mobile' => 'SKIN_ID', 'desktop' => 'SKIN_ID']

Parameters

string $key target key
string $mode 'mobile' or 'desktop'
string $skinId skin id

Return Value

void

at line 138
mixed getConfigs(string $key, string $skinId = null)

주어진 타겟과 그 타겟에 지정된 스킨의 설정정보를 가져온다. 주어진 타겟에 한번이라도 지정된 적이 있는 스킨정보를 모두 가져온다.

두번째 파라메터가 있을 경우, 주어진 스킨의 설정정보만 가져온다.

Parameters

string $key target key
string $skinId skin id

Return Value

mixed

at line 159
void setConfigs(string $key, string $skinId, array $config = null)

주어진 타겟에 지정된 스킨의 설정을 저장한다.

Parameters

string $key target key
string $skinId skin id
array $config skin config data

Return Value

void

at line 183
private string makeStoreKey(string $type, string $key)

주어진 키를 조합하여 저장소(persistence storage)에 조회할 키를 생성한다.

Parameters

string $type prefix key, PREFIX_KEY_SELECTED이나 PREFIX_KEY_CONFIGS가 전달된다.
string $key target key

Return Value

string