eZ Publish  [4.2]
eZMatrix Class Reference

The class eZMatrix does. More...

List of all members.

Public Member Functions

 addColumn ($columnDefinition)
 addColumnToCells ($columnDefinition)
 addColumnToMatrix ($columnDefinition)
 addRow ($beforeIndex=false, $addCount=1)
 adjustColumnIndex ($columnIndex, $newColumnIndex)
 adjustColumnName ($columnIndex, $newColumnName)
 adjustColumnsToDefinition ($classColumnsDefinition)
 attribute ($name)
 attributes ()
 buildReorderRuleForColumn ($columns, $pos)
 buildReorderRules ()
 column ($colIdx)
 copyDataBetweenColumns ($firstColIdx, $secondColIdx)
 decodeXML ($xmlString)
 domString ($domDocument)
 eZMatrix ($name, $numRows=false, $matrixColumnDefinition=false)
 getColumnsToRemove ($matrixColumnsDefinition)
 hasAttribute ($name)
 hasRuleForColumn ($rules, $pos)
 name ()
 removeColumn ($columnDefinition)
 removeRow ($rowNum)
 removeUselessColumns ($matrixColumnDefinition)
 reorderColumns ()
 setColumn ($colIdx, $column)
 setColumnIndex ($columnIndex, $newColumnIndex)
 setColumnName ($columnIndex, $newColumnName)
 setName ($name)
 xmlString ()

Public Attributes

 $Cells
 $Matrix
 Contains the Matrix array.
 $Name
 Contains the Matrix name.
 $NumColumns
 Contains the number of columns.
 $NumRows
 Contains the number of rows.

Protected Member Functions

 columnCellsData ($colIdx)
 columnDefinition ($colIdx)
 columnExists ($columnToFind, $matrixColumnsDefinition)
 columnIndex ($columnIdent)
 copyCellsDataBetweenColumns ($firstColIdx, $secondColIdx)
 copyDefinitionBetweenColumns ($col1, $col2)
 removeColumnFromCells ($columnDefinition)
 removeColumnFromMatrix ($columnDefinition)
 setColumnCellData ($colIdx, $cellData)
 setColumnDefinition ($colIdx, $columnDefinition)
 updateColumns ($matrixColumnDefinition)

Detailed Description

The class eZMatrix does.

Definition at line 41 of file ezmatrix.php.


Member Function Documentation

eZMatrix::addColumn ( columnDefinition)

Adds column $columnDefinition to eZMatrix object.

Definition at line 146 of file ezmatrix.php.

Referenced by updateColumns().

eZMatrix::addColumnToCells ( columnDefinition)

Adds column $columnDefinition to 'cells' member of eZMatrix.

Definition at line 168 of file ezmatrix.php.

Referenced by addColumn().

eZMatrix::addColumnToMatrix ( columnDefinition)

Adds column $columnDefinition to 'matrix' member of eZMatrix.

Definition at line 156 of file ezmatrix.php.

Referenced by addColumn().

eZMatrix::addRow ( beforeIndex = false,
addCount = 1 
)

Definition at line 665 of file ezmatrix.php.

eZMatrix::adjustColumnIndex ( columnIndex,
newColumnIndex 
)

Check if column index differs, and so, set new index.

Parameters:
columnIndexinternal column index
newColumnIndexnew column index
Returns:
true if index differs

Definition at line 93 of file ezmatrix.php.

Referenced by updateColumns().

eZMatrix::adjustColumnName ( columnIndex,
newColumnName 
)

Check if new column name differs from existing column name, and sets new name.

Parameters:
columnIndexinternal column index
newColumnNamecolumn name
Returns:
true if name differs

Definition at line 192 of file ezmatrix.php.

Referenced by updateColumns().

eZMatrix::adjustColumnsToDefinition ( classColumnsDefinition)

Checks current eZMatrix object against definition. If columns ids are wrong or there are additional/redundant columns in definition/eZMatrix object then current eZMatix object will be adjusted according to $matrixColumnDefinition. Note: if id of some column was changed form "old_id" to "new_id" then a column with "old_id" will be removed(all data of this column will be lost) and an empty column with "new_id" will be created. Returns true if adjustment(matrix modification) was performed. Otherwise - false.

Definition at line 222 of file ezmatrix.php.

eZMatrix::attributes ( )

Definition at line 609 of file ezmatrix.php.

Referenced by hasAttribute().

eZMatrix::buildReorderRuleForColumn ( columns,
pos 
)

Create reorder column reference array.

Definition at line 247 of file ezmatrix.php.

Referenced by buildReorderRules().

eZMatrix::buildReorderRules ( )

Build column reorder rules.

Definition at line 266 of file ezmatrix.php.

Referenced by reorderColumns().

eZMatrix::column ( colIdx)

Get column data and definition

Parameters:
colIdxcolumn index
Returns:
column data and definition

Definition at line 356 of file ezmatrix.php.

Referenced by reorderColumns().

eZMatrix::columnCellsData ( colIdx) [protected]

Get column data

Parameters:
colIdxcolumn index
Returns:
column data

Definition at line 413 of file ezmatrix.php.

Referenced by column().

eZMatrix::columnDefinition ( colIdx) [protected]

Get column definition.

Parameters:
colIdxcolumn index
Returns:
column definition

Definition at line 380 of file ezmatrix.php.

Referenced by column().

eZMatrix::columnExists ( columnToFind,
matrixColumnsDefinition 
) [protected]

Searches column $columnToFind in $matrixColumnDefinition. Returns true if found, false - otherwise.

Definition at line 529 of file ezmatrix.php.

Referenced by getColumnsToRemove().

eZMatrix::columnIndex ( columnIdent) [protected]

Get internal column index by column indentifier

Parameters:
columnIdentcolumn identifier
Returns:
column index.

Definition at line 509 of file ezmatrix.php.

Referenced by updateColumns().

eZMatrix::copyCellsDataBetweenColumns ( firstColIdx,
secondColIdx 
) [protected]

Definition at line 443 of file ezmatrix.php.

Referenced by copyDataBetweenColumns().

eZMatrix::copyDataBetweenColumns ( firstColIdx,
secondColIdx 
)

Definition at line 432 of file ezmatrix.php.

Referenced by reorderColumns().

eZMatrix::copyDefinitionBetweenColumns ( col1,
col2 
) [protected]

Definition at line 438 of file ezmatrix.php.

Referenced by copyDataBetweenColumns().

eZMatrix::decodeXML ( xmlString)

Will decode an xml string and initialize the eZ matrix object

Definition at line 714 of file ezmatrix.php.

Referenced by adjustColumnsToDefinition(), and eZMatrix().

eZMatrix::domString ( domDocument)
Returns:
the XML structure in $domDocument as text. It will take of care of the necessary charset conversions for content storage.

Definition at line 824 of file ezmatrix.php.

Referenced by xmlString().

eZMatrix::eZMatrix ( name,
numRows = false,
matrixColumnDefinition = false 
)

Constructor

Definition at line 46 of file ezmatrix.php.

eZMatrix::getColumnsToRemove ( matrixColumnsDefinition)

Searches columns that are in matrix but not in $matrixColumnDefinition.

Definition at line 485 of file ezmatrix.php.

Referenced by removeUselessColumns().

eZMatrix::hasAttribute ( name)

Definition at line 620 of file ezmatrix.php.

eZMatrix::hasRuleForColumn ( rules,
pos 
)

static

Definition at line 322 of file ezmatrix.php.

Referenced by buildReorderRules().

eZMatrix::name ( )

Returns the name of the matrix.

Definition at line 604 of file ezmatrix.php.

eZMatrix::removeColumn ( columnDefinition)

Removess column $columnDefinition from eZMatrix object.

Definition at line 545 of file ezmatrix.php.

Referenced by removeUselessColumns().

eZMatrix::removeColumnFromCells ( columnDefinition) [protected]

Removess column $columnDefinition from 'cells' member of eZMatrix.

Definition at line 554 of file ezmatrix.php.

Referenced by removeColumn().

eZMatrix::removeColumnFromMatrix ( columnDefinition) [protected]

Removess column $columnDefinition from 'matrix' member of eZMatrix.

Definition at line 575 of file ezmatrix.php.

Referenced by removeColumn().

eZMatrix::removeRow ( rowNum)

Definition at line 701 of file ezmatrix.php.

eZMatrix::removeUselessColumns ( matrixColumnDefinition)

Removes columns that are in matrix but not in $matrixColumnDefinition

Returns:
true if matrix was modified.

Definition at line 465 of file ezmatrix.php.

Referenced by adjustColumnsToDefinition().

eZMatrix::reorderColumns ( )

Definition at line 288 of file ezmatrix.php.

Referenced by adjustColumnsToDefinition().

eZMatrix::setColumn ( colIdx,
column 
)

Set column data and definition

Parameters:
columnindex
columndata and definition

Definition at line 343 of file ezmatrix.php.

Referenced by reorderColumns().

eZMatrix::setColumnCellData ( colIdx,
cellData 
) [protected]

Set column cell data

Parameters:
colIdxcolumn index
cellDatacolumn definition

Definition at line 392 of file ezmatrix.php.

Referenced by setColumn().

eZMatrix::setColumnDefinition ( colIdx,
columnDefinition 
) [protected]

Set column definition.

Parameters:
colIdxcolumn index
columnDefinitioncolumn definition

Definition at line 368 of file ezmatrix.php.

Referenced by setColumn().

eZMatrix::setColumnIndex ( columnIndex,
newColumnIndex 
)

Sets column's index to $newColumnIndex.

Definition at line 108 of file ezmatrix.php.

Referenced by adjustColumnIndex().

eZMatrix::setColumnName ( columnIndex,
newColumnName 
)

Sets column's name to $newColumnName.

Definition at line 207 of file ezmatrix.php.

Referenced by adjustColumnName().

eZMatrix::setName ( name)

Sets the name of the matrix

Definition at line 596 of file ezmatrix.php.

Referenced by decodeXML().

eZMatrix::updateColumns ( matrixColumnDefinition) [protected]

Searches in matrix columns with identifiers that in $matrixColumnDefinition an a) if column exists and $updateColumnsAttributesAllowed is true then modification of column attributes is performed( index, name, etc.); b) if column doesn't exists and $addNewColumnsAllowed then new column will be created.

Definition at line 119 of file ezmatrix.php.

Referenced by adjustColumnsToDefinition().

eZMatrix::xmlString ( )

Will return the XML string for this matrix.

Definition at line 847 of file ezmatrix.php.

Referenced by adjustColumnsToDefinition(), and eZMatrix().


Member Data Documentation

eZMatrix::$Cells

Definition at line 913 of file ezmatrix.php.

eZMatrix::$Matrix

Contains the Matrix array.

Definition at line 905 of file ezmatrix.php.

eZMatrix::$Name

Contains the Matrix name.

Definition at line 902 of file ezmatrix.php.

eZMatrix::$NumColumns

Contains the number of columns.

Definition at line 908 of file ezmatrix.php.

eZMatrix::$NumRows

Contains the number of rows.

Definition at line 912 of file ezmatrix.php.


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