Method | Description | |
---|---|---|
__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 |
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 |
public getArrayCopy ( ) : array | ||
return | array | A copy of the array, or array of public properties if ArrayIterator refers to an object. |
public getSettingsClass ( ) : string | ||
return | string | Returns the name of settings class |
public load ( ) |
public saveSettings ( array $settings ) | ||
$settings | array | Name-value settings array |
public setCriteria ( array $criteria ) | ||
$criteria | array | Search criteria |
public setDefaultProperties ( array $defaultProperties ) | ||
$defaultProperties | array | Default values for new entities |