Class \Scrivo\UserInterfaceLanguage
The user interface languate class is a simple class to list the current implemented language sets for the Scrivo user interface.
Defined in: UserInterfaceLanguage.php.
Attr. | Name / Description |
---|---|
public |
UserInterfaceLanguage($context) Create an empty user interface language object. |
Attr. | Type | Name | Description |
---|---|---|---|
\..\String | $description | A description for the language. | |
\..\String | $isoCode | The language ISO code. |
Attr. | Type | Name | Description |
---|---|---|---|
private | \..\Context | $context | A Scrivo context. |
private | \..\String | $description | A description for the language. |
private | \..\String | $isoCode | The language ISO code. |
Attr. | Type | Name / Description |
---|---|---|
public | mixed |
__get($name) Implementation of the readable properties using the PHP magic method __get(). |
public |
__set($name, $value) Implementation of the writable properties using the PHP magic method __set(). |
|
public static |
delete($context, $isoCode) Delete existing user interface language data from the database. |
|
public static | \..\UserInterfaceLanguage |
fetch($context, $isoCode) Fetch a user interface language object from the database using its object id. |
public |
insert() Insert new user interface language object data into the database. |
|
public static | \..\UserInterfaceLanguage[] |
select($context) Select user interface languages from the database. |
private |
setDescription($description) Set A description for the language. |
|
private |
setFields($context, $rd) Convenience method to set the fields of a user interface language object from an array (result set row). |
|
private |
setIsoCode($isoCode) Set The language ISO code. |
|
public |
update() Update existing user interface language object data in the database. |
|
private static |
validateDelete($context, $isoCode) Check if deletion of user interface language object data does not violate any business rules. |
|
private |
Check if this user interface language object can be inserted into the database. |
|
private |
Check if this user interface language object can be updated in the database. |
Constructor
- public UserInterfaceLanguage(\Scrivo\Context $context=null)
-
Create an empty user interface language object.
Parameters:
Type Name Def. Description \Scrivo\Context $context null A Scrivo context.
View source: UserInterfaceLanguage.php line 70.
Members
- private \Scrivo\Context $context
-
A Scrivo context.
Inital value: null
View source: UserInterfaceLanguage.php line 63.
- private \Scrivo\String $description
-
A description for the language.
Inital value: null
View source: UserInterfaceLanguage.php line 57.
- private \Scrivo\String $isoCode
-
The language ISO code.
Inital value: null
View source: UserInterfaceLanguage.php line 51.
Methods
- public mixed __get(string $name)
-
Implementation of the readable properties using the PHP magic method __get().
Parameters:
Type Name Def. Description string $name The name of the property to get.
Returns:
mixed Implementation of the readable properties using the PHP magic method __get().
View source: UserInterfaceLanguage.php line 89.
- public __set(string $name, mixed $value)
-
Implementation of the writable properties using the PHP magic method __set().
Parameters:
Type Name Def. Description string $name The name of the property to set.
mixed $value The value of the property to set.
View source: UserInterfaceLanguage.php line 104.
- public static delete(\Scrivo\Context $context, \Scrivo\String $isoCode)
-
Delete existing user interface language data from the database.
First it is is checked if it's possible to delete user interface language data, then the user interface language data including its dependecies is deleted from the database.
Parameters:
Type Name Def. Description \Scrivo\Context $context A Scrivo context.
\Scrivo\String $isoCode $isoCode The object id of the user interface language to select.
Throws:
Exception Type Description \Scrivo\ApplicationException If the data is not accessible or if it is not possible to delete the user interface language data. View source: UserInterfaceLanguage.php line 264.
- public static \Scrivo\UserInterfaceLanguage fetch(\Scrivo\Context $context, \Scrivo\String $isoCode)
-
Fetch a user interface language object from the database using its object id.
Parameters:
Type Name Def. Description \Scrivo\Context $context A Scrivo context.
\Scrivo\String $isoCode The ISO code of the language to select.
Returns:
\Scrivo\UserInterfaceLanguage Fetch a user interface language object from the database using its object id.
View source: UserInterfaceLanguage.php line 294.
- public insert()
-
Insert new user interface language object data into the database.
First it is checked if the data of this user interface language object can be inserted into the database, then the data is inserted into the database. If no id was set a new object id is generated.
Throws:
Exception Type Description \Scrivo\ApplicationException If the data is not accessible or one or more of the fields contain invalid data. View source: UserInterfaceLanguage.php line 168.
- public static \Scrivo\UserInterfaceLanguage[isoCode] select(\Scrivo\Context $context)
-
Select user interface languages from the database.
Parameters:
Type Name Def. Description \Scrivo\Context $context A Scrivo context.
Returns:
\Scrivo\UserInterfaceLanguage[isoCode] Select user interface languages from the database.
View source: UserInterfaceLanguage.php line 333.
- private setDescription(\Scrivo\String $description)
-
Set A description for the language.
Parameters:
Type Name Def. Description \Scrivo\String $description A description for the language.
View source: UserInterfaceLanguage.php line 143.
- private setFields(\Scrivo\Context $context, array $rd)
-
Convenience method to set the fields of a user interface language object from an array (result set row).
Parameters:
Type Name Def. Description \Scrivo\Context $context A Scrivo context.
array $rd An array containing the field data using the database field names as keys.
View source: UserInterfaceLanguage.php line 121.
- private setIsoCode(\Scrivo\String $isoCode)
-
Set The language ISO code.
Parameters:
Type Name Def. Description \Scrivo\String $isoCode The language ISO code.
View source: UserInterfaceLanguage.php line 134.
- public update()
-
Update existing user interface language object data in the database.
First it is checked if the data of this user interface language object can be updated in the database, then the data is updated in the database.
Throws:
Exception Type Description \Scrivo\ApplicationException If the data is not accessible or one or more of the fields contain invalid data. View source: UserInterfaceLanguage.php line 212.
- private static validateDelete(\Scrivo\Context $context, \Scrivo\String $isoCode)
-
Check if deletion of user interface language object data does not violate any business rules.
Parameters:
Type Name Def. Description \Scrivo\Context $context A Scrivo context.
\Scrivo\String $isoCode The object id of the user interface language to select.
Throws:
Exception Type Description \Scrivo\ApplicationException If the data is not accessible or if it is not possible to delete the language data. View source: UserInterfaceLanguage.php line 245.
- private validateInsert()
-
Check if this user interface language object can be inserted into the database.
Throws:
Exception Type Description \Scrivo\ApplicationException If the data is not accessible or one or more of the fields contain invalid data. View source: UserInterfaceLanguage.php line 154.
- private validateUpdate()
-
Check if this user interface language object can be updated in the database.
Throws:
Exception Type Description \Scrivo\ApplicationException If the data is not accessible or one or more of the fields contain invalid data. View source: UserInterfaceLanguage.php line 199.
Documentation generated by phpDocumentor 2.0.0a12 and ScrivoDocumentor on August 29, 2013