Class \Scrivo\UserInterfaceLanguage

The user interface languate class is a simple class to list the current implemented language sets for the Scrivo user interface.


Constructor summary

Attr. Name / Description
public

UserInterfaceLanguage($context)

Create an empty user interface language object.

Properties

Attr. Type Name Description
\..\String $description A description for the language.
\..\String $isoCode The language ISO code.

Member summary

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.

Method summary

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

validateInsert()

Check if this user interface language object can be inserted into the database.

private

validateUpdate()

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.


Members


				
private \Scrivo\Context $context

A Scrivo context.

Inital value: null


				
private \Scrivo\String $description

A description for the language.

Inital value: null


				
private \Scrivo\String $isoCode

The language ISO code.

Inital value: null


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().

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.

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.
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.

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.
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.

private setDescription(\Scrivo\String $description)

Set A description for the language.

Parameters:

Type Name Def. Description
\Scrivo\String $description

A description for the language.

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.

private setIsoCode(\Scrivo\String $isoCode)

Set The language ISO code.

Parameters:

Type Name Def. Description
\Scrivo\String $isoCode

The language ISO code.

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.
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.
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.
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.

Documentation generated by phpDocumentor 2.0.0a12 and ScrivoDocumentor on August 29, 2013