Class \Scrivo\ListItem

A Scrivo list item is a simple data structure for list item data.

List items contain a fixed set of properties and a variable set of properties as definded in its list item property definition.

Instances of this class are created through objects of the \Scrivo\ItemList class. Either by retrieving them as items that were previously added to the list or by using the \Scrivo\ItemList::newItem(\Scrivo\String $type) method.

Defined in: ListItem.php.


Constructor summary

Attr. Name / Description
public

ListItem($rd, $properties)

Create an and initalize a list item object.

Properties

Attr. Type Name Description
read-only DateTime $dateCreated The date/time that this list item was created.
read-only DateTime $dateModified The last date/time that this list item was modified.
DateTime $dateOffline The date/time this list item need to go offline.
DateTime $dateOnline The date/time this list item need to go online.
read-only int $definitionId The id of the defintion of the list item.
read-only int $id The list item's id (DB key).
read-only int $linkedPageId An optional id of a linked page.
read-only int $listId The id of the list where this list item belongs to.
read-only int $pageId The id of the page where this list item belongs to.
int $parentId The id of the parent list item.
\..\String $title The list item title.

Member summary

Attr. Type Name Description
protected DateTime $dateCreated The date/time that this list item was created.
protected DateTime $dateModified The last date/time that this list item was modified.
protected DateTime $dateOffline The date/time this list item need to go offline.
protected DateTime $dateOnline The date/time this list item need to go online.
private int $definitionId The id of the defintion of the list item.
private int $id The list items id (DB key).
private int $linkedPageId An optional id of a linked page.
private int $listId The id of the list where this list item belongs to.
private int $pageId The id of the page where this list item belongs to.
private int $parentId The id of the parent list item.
protected object $properties The list item properties
protected \..\String $title The list item title.
private int $version The current version of the page: -1: scratch version, 0 live version, 1 and up versions.

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

setDateOffline($dateOffline)

Set The date/time this page need to go offline.

public

setDateOnline($dateOnline)

Set The date/time this page need to go online.

public

setParentId($parentId)

Set The id of the parent list item.

public

setTitle($title)

Set The page title (<title>).

 


Constructor

public ListItem(array $rd, \Scrivo\PropertySet $properties)

Create an and initalize a list item object.

Parameters:

Type Name Def. Description
array $rd

An array containing the field data using the database field names as keys.

\Scrivo\PropertySet $properties

An array containing the list item properties.


Members


				
protected \DateTime $dateCreated

The date/time that this list item was created.

Inital value: null


				
protected \DateTime $dateModified

The last date/time that this list item was modified.

Inital value: null


				
protected \DateTime $dateOffline

The date/time this list item need to go offline.

Inital value: null


				
protected \DateTime $dateOnline

The date/time this list item need to go online.

Inital value: null


				
private int $definitionId

The id of the defintion of the list item.

Inital value: 0


				
private int $id

The list items id (DB key).

Inital value: 0


				
private int $linkedPageId

An optional id of a linked page.

Inital value: 0


				
private int $listId

The id of the list where this list item belongs to.

Inital value: 0


				
private int $pageId

The id of the page where this list item belongs to.

Inital value: 0


				
private int $parentId

The id of the parent list item.

Inital value: 0


				
protected object $properties

The list item properties

Inital value: null


				
protected \Scrivo\String $title

The list item title.

Inital value: null


				
private int $version

The current version of the page: -1: scratch version, 0 live version, 1 and up versions.

Inital value: 0


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 setDateOffline(\DateTime $dateOffline=null)

Set The date/time this page need to go offline.

Parameters:

Type Name Def. Description
\DateTime $dateOffline null

The date/time this page need to go offline.

public setDateOnline(\DateTime $dateOnline)

Set The date/time this page need to go online.

Parameters:

Type Name Def. Description
\DateTime $dateOnline

The date/time this page need to go online.

public setParentId(int $parentId)

Set The id of the parent list item.

Parameters:

Type Name Def. Description
int $parentId

The id of the parent list item.

public setTitle(\Scrivo\String $title)

Set The page title (<title>).

Parameters:

Type Name Def. Description
\Scrivo\String $title

The page title (<title>).


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