Class \Scrivo\PageProperty\Image

Property to hold an image source (src) url.

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/Image.php.


Constructor summary

Attr. Name / Description
protected

Image($page, $rd)

Create an empty page property object.

Properties

Attr. Type Name Description
\..\String $src The image source (src attribute).

Member summary

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.

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

updateContent()

Update property data in the page_property_html table.

private

updateProperty()

Update property data in the page_property table.

private

validateUpdate()

Check if this page property object can be updated in the database.

 


Constructor

protected Image(\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).


Members


				
private \Scrivo\String $data

The property data.

Inherited from \Scrivo\PageProperty


				
private int $definitionId

The property defintion id.

Inherited from \Scrivo\PageProperty


				
private \Scrivo\String $extData

A derived data of the property data.

Inherited from \Scrivo\PageProperty


				
private \Scrivo\Page $page

The page where this property belongs to.

Inherited from \Scrivo\PageProperty


				
private \Scrivo\String $phpSelector

An textual identification/key for this property.

Inherited from \Scrivo\PageProperty


				
private \Scrivo\String $type

The property type: one out of the TemplateProperty::TYPE_* constants.

Inherited from \Scrivo\PageProperty


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

protected setData(\Scrivo\String $data)

Set the property data.

Inherited from \Scrivo\PageProperty

Parameters:

Type Name Def. Description
\Scrivo\String $data

The property data.

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.

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

Update property data in the page_property_html table.

Inherited from \Scrivo\PageProperty

private updateProperty()

Update property data in the page_property table.

Inherited from \Scrivo\PageProperty

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.

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