Class \Scrivo\ApplicationDefinition
The ApplicationDefinition class is used to create references to applications.
Scrivo applications are (small) specialized web applications that are hosted on a tab in the user interface. These can be internal applications such as list or form, or any custom made web application.
The application definition class holds the entry point (an url to display in an iframe or a Javascript class constructor) for the application.
Defined in: ApplicationDefinition.php.
Attr. | Name / Description |
---|---|
public |
ApplicationDefinition($context) Create an empty application definition object. |
Name | Description |
---|---|
TYPE_DISTRIBUTED_LIST | Constant to denote distributed list. |
TYPE_FORM | Constant to denote a from application. |
TYPE_LIST | Constant to denote a news-like list application (manually sortable). |
TYPE_LISTVIEW | Constant to denote a column list application with sort option on headers. |
TYPE_URL | Constant to denote an external (custom) application. |
Attr. | Type | Name | Description |
---|---|---|---|
\..\String | $description | An additional description for the application. | |
read-only | int | $id | The application definition id (DB key) |
\..\String | $location | The location of the application start page. | |
\..\String | $title | A descriptive title for the application. | |
int | $type | The application type: one out of the ApplicationDefinition::TYPE_* constants. |
Attr. | Type | Name | Description |
---|---|---|---|
private | \..\Context | $context | A Scrivo context. |
private | \..\String | $description | An additional description for the application. |
private | int | $id | The application definition id (DB key) |
private | \..\String | $location | The location of the application start page. |
private | \..\String | $title | A descriptive title for the application. |
private | int | $type | The application type: one out of the ApplicationDefinition::TYPE_* constants. |
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, $id) Delete existing application definition data from the database. |
|
public static | \..\ApplicationDefinition |
fetch($context, $id) Fetch a application definition object from the database using its object id. |
public |
insert() Insert new application definition object data into the database. |
|
public static | \..\ApplicationDefinition[] |
select($context) Select application definitions from the database. |
private |
setDescription($description) Set the additional description for the application. |
|
private |
setFields($context, $rd) Convenience method to set the fields of a application definition object from an array (result set row). |
|
private |
setLocation($location) Set the location of the application start page. |
|
private |
setTitle($title) Set the descriptive title for the application. |
|
private |
setType($type) Set the application type: one out of the ApplicationDefinition::TYPE_* constants. |
|
public |
update() Update existing application definition object data in the database. |
|
private static |
validateDelete($context, $id) Check if deletion of application definition object data does not violate any business rules. |
|
private |
Check if this application definition object can be inserted into the database. |
|
private |
Check if this application definition object can be updated in the database. |
Constructor
- public ApplicationDefinition(\Scrivo\Context $context=null)
-
Create an empty application definition object.
Parameters:
Type Name Def. Description \Scrivo\Context $context null A Scrivo context.
View source: ApplicationDefinition.php line 127.
Constants
- TYPE_DISTRIBUTED_LIST
-
Constant to denote distributed list.
Value: 5
View source: ApplicationDefinition.php line 83.
- TYPE_FORM
-
Constant to denote a from application.
Value: 4
View source: ApplicationDefinition.php line 78.
- TYPE_LIST
-
Constant to denote a news-like list application (manually sortable).
Value: 2
View source: ApplicationDefinition.php line 68.
- TYPE_LISTVIEW
-
Constant to denote a column list application with sort option on headers.
Value: 3
View source: ApplicationDefinition.php line 73.
- TYPE_URL
-
Constant to denote an external (custom) application.
Value: 1
View source: ApplicationDefinition.php line 63.
Members
- private \Scrivo\Context $context
-
A Scrivo context.
Inital value: null
View source: ApplicationDefinition.php line 120.
- private \Scrivo\String $description
-
An additional description for the application.
Inital value: null
View source: ApplicationDefinition.php line 101.
- private int $id
-
The application definition id (DB key)
Inital value: 0
View source: ApplicationDefinition.php line 89.
- private \Scrivo\String $location
-
The location of the application start page.
Inital value: null
View source: ApplicationDefinition.php line 107.
- private \Scrivo\String $title
-
A descriptive title for the application.
Inital value: null
View source: ApplicationDefinition.php line 95.
- private int $type
-
The application type: one out of the ApplicationDefinition::TYPE_* constants.
Inital value: self::TYPE_URL
View source: ApplicationDefinition.php line 114.
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: ApplicationDefinition.php line 147.
- 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: ApplicationDefinition.php line 165.
- public static delete(\Scrivo\Context $context, int $id)
-
Delete existing application definition data from the database.
First it is is checked if it's possible to delete application definition data, then the application definition data including its dependencies is deleted from the database.
Parameters:
Type Name Def. Description \Scrivo\Context $context A Scrivo context.
int $id The object id of the application definition to select.
Throws:
Exception Type Description \Scrivo\ApplicationException If the data is not accessible or if it is not possible to delete the application definition data. View source: ApplicationDefinition.php line 366.
- public static \Scrivo\ApplicationDefinition fetch(\Scrivo\Context $context, int $id)
-
Fetch a application definition object from the database using its object id.
Parameters:
Type Name Def. Description \Scrivo\Context $context A Scrivo context.
int $id The object id of the application definition to select.
Returns:
\Scrivo\ApplicationDefinition Fetch a application definition object from the database using its object id.
View source: ApplicationDefinition.php line 401.
- public insert()
-
Insert new application definition object data into the database.
First it is checked if the data of this application definition 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: ApplicationDefinition.php line 261.
- public static \Scrivo\ApplicationDefinition[id] select(\Scrivo\Context $context)
-
Select application definitions from the database.
Parameters:
Type Name Def. Description \Scrivo\Context $context A Scrivo context.
Returns:
\Scrivo\ApplicationDefinition[id] Select application definitions from the database.
View source: ApplicationDefinition.php line 452.
- private setDescription(\Scrivo\String $description)
-
Set the additional description for the application.
Parameters:
Type Name Def. Description \Scrivo\String $description An additional description for the application.
View source: ApplicationDefinition.php line 209.
- private setFields(\Scrivo\Context $context, array $rd)
-
Convenience method to set the fields of a application definition 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: ApplicationDefinition.php line 183.
- private setLocation(\Scrivo\String $location)
-
Set the location of the application start page.
Parameters:
Type Name Def. Description \Scrivo\String $location The location of the application start page.
View source: ApplicationDefinition.php line 219.
- private setTitle(\Scrivo\String $title)
-
Set the descriptive title for the application.
Parameters:
Type Name Def. Description \Scrivo\String $title A descriptive title for the application.
View source: ApplicationDefinition.php line 199.
- private setType(int $type)
-
Set the application type: one out of the ApplicationDefinition::TYPE_* constants.
Parameters:
Type Name Def. Description int $type The application type: one out of the ApplicationDefinition::TYPE_* constants.
View source: ApplicationDefinition.php line 230.
- public update()
-
Update existing application definition object data in the database.
First it is checked if the data of this application definition 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: ApplicationDefinition.php line 311.
- private static validateDelete(\Scrivo\Context $context, int $id)
-
Check if deletion of application definition object data does not violate any business rules.
Parameters:
Type Name Def. Description \Scrivo\Context $context A Scrivo context.
int $id The object id of the application definition 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: ApplicationDefinition.php line 349.
- private validateInsert()
-
Check if this application definition 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: ApplicationDefinition.php line 247.
- private validateUpdate()
-
Check if this application definition 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: ApplicationDefinition.php line 298.
Documentation generated by phpDocumentor 2.0.0a12 and ScrivoDocumentor on August 29, 2013