KWeb  6.4
KWebAttribute_Table Class Reference

Table of attributes. More...

Inheritance diagram for KWebAttribute_Table:
KWebAttribute_Table_Class KWebAttribute_Table_Group KWebAttribute_Table_Form KWebAttribute_Table_Horizontal KWebAttribute_Table_Section

Public Member Functions

 isReadOnly ()
 makeReadOnly ()
 isEmpty ()
 count ()
 getAttributes ()
 getAllAttributes ()
 Returns an array or iterator giving access to all attributes in this table.
 getClone ($cloneAttributes=false)
 Clones this table.
 get ($nameOrPos)
 add (KWebAttribute_Interface $attribute, $pos=false, $insertAfter=false)
 Adds attribute.
 remove ($attributeOrPos, $recursive=true)
 Removes attribute.
 move ($attributeOrPos, $pos=false, $insertAfter=false)
 Moves specified attribute to new position.
 sort ($onField= 'title', $ascending=true)
 sortCompare ($a, $b, $onField, $ascending)
 convertData ($data, $format, $conversion, $includeUnknown=false)
 Converts all specified data using elements from this table.
 getObjectData (KWebObject_Attributable $object, $lang=false, $includeMainTranslation=false)
 Returns object data as flat array ($name => $value) for specified, or active language.
 current ()
 key ()
 next ()
 rewind ()
 valid ()
 offsetExists ($offset)
 offsetGet ($offset)
 offsetSet ($offset, $value)
 offsetUnset ($offset)
 getCache ($rebuild=false)
 Returns cached information for this table.
 collectSourceData (KWebObject_Attributable $object, &$data, $source, $lang, $format=KWeb::FORMAT_SQL, $unsetNotTranslated=false)

Data Fields

 $objectUID = false

Protected Attributes

 $readOnly = false
 $attributes = array()
 $cache = null

Static Protected Attributes

static $unnamedId = 0

Detailed Description

Table of attributes.

Table is flat and can contain only KWebAttribute objects

It implements ArrayAccess and Iterator for quick access and traversal of attributes


Member Function Documentation

KWebAttribute_Table::add ( KWebAttribute_Interface attribute,
pos = false,
insertAfter = false 
)

Adds attribute.

Returns THIS item for fluent interface.

Returns:
KWebAttribute_Table

Reimplemented in KWebAttribute_Table_Group.

KWebAttribute_Table::collectSourceData ( KWebObject_Attributable object,
&$  data,
source,
lang,
format = KWeb::FORMAT_SQL,
unsetNotTranslated = false 
)
Parameters:
$unsetNotTranslatedif TRUE, will unset not translated data, otherwise it will set it to null (default)
KWebAttribute_Table::convertData ( data,
format,
conversion,
includeUnknown = false 
)

Converts all specified data using elements from this table.

KWebAttribute_Table::count ( )
KWebAttribute_Table::current ( )

Reimplemented in KWebAttribute_Table_Group.

KWebAttribute_Table::get ( nameOrPos)
Returns:
KWebAttribute

Reimplemented in KWebAttribute_Table_Group.

KWebAttribute_Table::getAllAttributes ( )

Returns an array or iterator giving access to all attributes in this table.

Reimplemented in KWebAttribute_Table_Group.

KWebAttribute_Table::getAttributes ( )
KWebAttribute_Table::getCache ( rebuild = false)

Returns cached information for this table.

Returns:
KWebAttribute_Table_Cache
KWebAttribute_Table::getClone ( cloneAttributes = false)

Clones this table.

Cloned table will be writeable

Parameters:
$cloneAttributes
Returns:
KWebAttribute_Table

Reimplemented in KWebAttribute_Table_Class.

KWebAttribute_Table::getObjectData ( KWebObject_Attributable object,
lang = false,
includeMainTranslation = false 
)

Returns object data as flat array ($name => $value) for specified, or active language.

KWebAttribute_Table::isEmpty ( )
KWebAttribute_Table::isReadOnly ( )
KWebAttribute_Table::key ( )

Reimplemented in KWebAttribute_Table_Group.

KWebAttribute_Table::makeReadOnly ( )
KWebAttribute_Table::move ( attributeOrPos,
pos = false,
insertAfter = false 
)

Moves specified attribute to new position.

Returns:
KWebAttribute_Table
KWebAttribute_Table::next ( )

Reimplemented in KWebAttribute_Table_Group.

KWebAttribute_Table::offsetExists ( offset)

Reimplemented in KWebAttribute_Table_Group.

KWebAttribute_Table::offsetGet ( offset)
KWebAttribute_Table::offsetSet ( offset,
value 
)
KWebAttribute_Table::offsetUnset ( offset)
KWebAttribute_Table::remove ( attributeOrPos,
recursive = true 
)

Removes attribute.

Returns:
KWebAttribute returns removed attribute

Reimplemented in KWebAttribute_Table_Group.

KWebAttribute_Table::rewind ( )

Reimplemented in KWebAttribute_Table_Group.

KWebAttribute_Table::sort ( onField = 'title',
ascending = true 
)
KWebAttribute_Table::sortCompare ( a,
b,
onField,
ascending 
)
KWebAttribute_Table::valid ( )

Reimplemented in KWebAttribute_Table_Group.


Field Documentation

KWebAttribute_Table::$attributes = array() [protected]
KWebAttribute_Table::$cache = null [protected]
KWebAttribute_Table::$objectUID = false
KWebAttribute_Table::$readOnly = false [protected]
KWebAttribute_Table::$unnamedId = 0 [static, protected]

The documentation for this class was generated from the following file: