PHP 클래스 Scalr\Model\Collections\SettingsCollection

저자: N.V.
상속: extends Scalr\Util\ObjectAccess
파일 보기 프로젝트 열기: scalr/scalr 1 사용 예제들

공개 메소드들

메소드 설명
__clone ( ) Reset referenced fields
__construct ( string $entityClass, array $criteria, array $defaultProperties = [], array $settings = [] ) SettingsCollection
getArrayCopy ( ) : array Get array copy
getEntity ( string $name ) : Scalr\Model\Entity\Setting Gets setting entity
getIterator ( )
getSettingsClass ( ) : string Gets settings class name
load ( ) Loads settings from DB, if some settings already changed - keeps new values
offsetExists ( $offset )
offsetGet ( string $name ) : string | null Gets setting value
offsetSet ( string $name, mixed $setting ) Sets setting value, creates internal entity
save ( ) Saves settings entities to DB
saveSettings ( array $settings ) Saves multiply settings
setCriteria ( array $criteria ) Sets search criteria
setDefaultProperties ( array $defaultProperties ) Sets default values for new entities

메소드 상세

__clone() 공개 메소드

Reset referenced fields
public __clone ( )

__construct() 공개 메소드

SettingsCollection
public __construct ( string $entityClass, array $criteria, array $defaultProperties = [], array $settings = [] )
$entityClass string Entity class name with namespace
$criteria array Search criteria
$defaultProperties array optional Default values for new entities
$settings array optional Initial settings

getArrayCopy() 공개 메소드

Get array copy
public getArrayCopy ( ) : array
리턴 array A copy of the array, or array of public properties if ArrayIterator refers to an object.

getEntity() 공개 메소드

Gets setting entity
public getEntity ( string $name ) : Scalr\Model\Entity\Setting
$name string Setting name
리턴 Scalr\Model\Entity\Setting

getIterator() 공개 메소드

또한 보기: ObjectAccess::getIterator()
public getIterator ( )

getSettingsClass() 공개 메소드

Gets settings class name
public getSettingsClass ( ) : string
리턴 string Returns the name of settings class

load() 공개 메소드

Loads settings from DB, if some settings already changed - keeps new values
public load ( )

offsetExists() 공개 메소드

public offsetExists ( $offset )

offsetGet() 공개 메소드

Gets setting value
또한 보기: ObjectAccess::offsetGet()
public offsetGet ( string $name ) : string | null
$name string Setting name
리턴 string | null

offsetSet() 공개 메소드

Sets setting value, creates internal entity
또한 보기: ObjectAccess::offsetSet()
public offsetSet ( string $name, mixed $setting )
$name string Setting name
$setting mixed If $setting is array or object - interprets its fields as entity properties, otherwise - as value

save() 공개 메소드

Saves settings entities to DB
public save ( )

saveSettings() 공개 메소드

Saves multiply settings
public saveSettings ( array $settings )
$settings array Name-value settings array

setCriteria() 공개 메소드

Sets search criteria
public setCriteria ( array $criteria )
$criteria array Search criteria

setDefaultProperties() 공개 메소드

Sets default values for new entities
public setDefaultProperties ( array $defaultProperties )
$defaultProperties array Default values for new entities