Class \Scrivo\PageProperty\DateTime
Property to hold a date value.
Page properties are a part of the page.
Note that PageProperties can't be created nor deleted using this class. PageProperties are created when the page itself is created, using the PageDefintion rules.
This is an abstract class that implements the methods for creating (factory method "create"), listing and updating page properties.
Legacy information: Page properties (including applications) are stored in serveral Scrivo data tables (page_property_html, page_property) as their definitions (page_definition_tab, page_property_definition, application_definition). This distiction is dropped, all these are accessed though a the single page property "properties".
Extends
\Scrivo\PageProperty .
Defined in:
PageProperty/DateTime.php.
Attr. | Name / Description |
---|---|
protected |
DateTime($page, $rd) Create an empty page property object. |
Attr. | Type | Name | Description |
---|---|---|---|
DateTime | $dateTime | The date-time value. |
Attr. | Type | Name | Description |
---|---|---|---|
private | \..\String | $data | The property data. |
private | int | $definitionId | The property defintion id. |
private | \..\String | $extData | A derived data of the property data. |
private | \..\Page | $page | The page where this property belongs to. |
private | \..\String | $phpSelector | An textual identification/key for this property. |
private | \..\String | $type | The property type: one out of the TemplateProperty::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 | \..\Image |
create($page, $rd) Factory method to create page properties. |
protected |
setData($data) Set the property data. |
|
protected |
setExtData($extData) Set the property extended data. |
|
public |
update() Update page property object data in the database. |
|
private |
Update property data in the page_property_html table. |
|
private |
Update property data in the page_property table. |
|
private |
Check if this page property object can be updated in the database. |
Constructor
- protected DateTime(\Scrivo\Page $page, array $rd)
-
Create an empty page property object.
Inherited from \Scrivo\PageProperty
Parameters:
Type Name Def. Description \Scrivo\Page $page This poperty's page.
array $rd An array containing the initial data (result set row).
View source: PageProperty.php line 99.
Members
- private \Scrivo\String $data
-
The property data.
Inherited from \Scrivo\PageProperty
View source: PageProperty.php line 73.
- private int $definitionId
-
The property defintion id.
Inherited from \Scrivo\PageProperty
View source: PageProperty.php line 85.
- private \Scrivo\String $extData
-
A derived data of the property data.
Inherited from \Scrivo\PageProperty
View source: PageProperty.php line 79.
- private \Scrivo\Page $page
-
The page where this property belongs to.
Inherited from \Scrivo\PageProperty
View source: PageProperty.php line 91.
- private \Scrivo\String $phpSelector
-
An textual identification/key for this property.
Inherited from \Scrivo\PageProperty
View source: PageProperty.php line 67.
- private \Scrivo\String $type
-
The property type: one out of the TemplateProperty::TYPE_* constants.
Inherited from \Scrivo\PageProperty
View source: PageProperty.php line 61.
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: PageProperty/DateTime.php line 53.
- 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: PageProperty/DateTime.php line 69.
- public static \Scrivo\PageProperty\Image create(\Scrivo\Page $page, array $rd)
-
Factory method to create page properties.
The method will nog return a base PageProperty object but a sepacialized descendant based upon the given data.
Inherited from \Scrivo\PageProperty
Parameters:
Type Name Def. Description \Scrivo\Page $page The page for which to create the page property.
array $rd Array (result set row data) with the page property data.
Returns:
\Scrivo\PageProperty\Image Factory method to create page properties.
View source: PageProperty.php line 126.
- protected setData(\Scrivo\String $data)
-
Set the property data.
Inherited from \Scrivo\PageProperty
Parameters:
Type Name Def. Description \Scrivo\String $data The property data.
View source: PageProperty.php line 215.
- protected setExtData(\Scrivo\String $extData)
-
Set the property extended data.
Inherited from \Scrivo\PageProperty
Parameters:
Type Name Def. Description \Scrivo\String $extData A derived data of the property data.
View source: PageProperty.php line 224.
- public update()
-
Update page property object data in the database.
First it is checked if the data of this page property object can be updated in the database, then the data is updated in the database.
Inherited from \Scrivo\PageProperty
Throws:
Exception Type Description \Scrivo\ApplicationException If the data is not accessible or one or more of the fields contain invalid data. View source: PageProperty.php line 248.
- private updateContent()
-
Update property data in the page_property_html table.
Inherited from \Scrivo\PageProperty
View source: PageProperty.php line 311.
- private updateProperty()
-
Update property data in the page_property table.
Inherited from \Scrivo\PageProperty
View source: PageProperty.php line 276.
- private validateUpdate()
-
Check if this page property object can be updated in the database.
Inherited from \Scrivo\PageProperty
Throws:
Exception Type Description \Scrivo\ApplicationException If the data is not accessible or one or more of the fields contain invalid data. View source: PageProperty.php line 234.
Documentation generated by phpDocumentor 2.0.0a12 and ScrivoDocumentor on August 29, 2013