eZ Publish  [trunk]
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 18 of file ezmatrix.php.


Member Function Documentation

eZMatrix::addColumn ( columnDefinition)

Adds column $columnDefinition to eZMatrix object.

Definition at line 122 of file ezmatrix.php.

Referenced by updateColumns().

eZMatrix::addColumnToCells ( columnDefinition)

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

Definition at line 144 of file ezmatrix.php.

Referenced by addColumn().

eZMatrix::addColumnToMatrix ( columnDefinition)

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

Definition at line 132 of file ezmatrix.php.

Referenced by addColumn().

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

Definition at line 641 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 70 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 168 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 198 of file ezmatrix.php.

Definition at line 585 of file ezmatrix.php.

Referenced by hasAttribute().

eZMatrix::buildReorderRuleForColumn ( columns,
pos 
)

Create reorder column reference array.

Definition at line 223 of file ezmatrix.php.

Referenced by buildReorderRules().

Build column reorder rules.

Definition at line 242 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 332 of file ezmatrix.php.

Referenced by reorderColumns().

eZMatrix::columnCellsData ( colIdx) [protected]

Get column data

Parameters:
colIdxcolumn index
Returns:
column data

Definition at line 389 of file ezmatrix.php.

Referenced by column().

eZMatrix::columnDefinition ( colIdx) [protected]

Get column definition.

Parameters:
colIdxcolumn index
Returns:
column definition

Definition at line 356 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 505 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 485 of file ezmatrix.php.

Referenced by updateColumns().

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

Definition at line 419 of file ezmatrix.php.

Referenced by copyDataBetweenColumns().

eZMatrix::copyDataBetweenColumns ( firstColIdx,
secondColIdx 
)

Definition at line 408 of file ezmatrix.php.

Referenced by reorderColumns().

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

Definition at line 414 of file ezmatrix.php.

Referenced by copyDataBetweenColumns().

eZMatrix::decodeXML ( xmlString)

Will decode an xml string and initialize the eZ matrix object

Definition at line 690 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 800 of file ezmatrix.php.

Referenced by xmlString().

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

Constructor

Definition at line 23 of file ezmatrix.php.

eZMatrix::getColumnsToRemove ( matrixColumnsDefinition)

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

Definition at line 461 of file ezmatrix.php.

Referenced by removeUselessColumns().

Definition at line 596 of file ezmatrix.php.

eZMatrix::hasRuleForColumn ( rules,
pos 
)

static

Definition at line 298 of file ezmatrix.php.

Referenced by buildReorderRules().

Returns the name of the matrix.

Definition at line 580 of file ezmatrix.php.

eZMatrix::removeColumn ( columnDefinition)

Removess column $columnDefinition from eZMatrix object.

Definition at line 521 of file ezmatrix.php.

Referenced by removeUselessColumns().

eZMatrix::removeColumnFromCells ( columnDefinition) [protected]

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

Definition at line 530 of file ezmatrix.php.

Referenced by removeColumn().

eZMatrix::removeColumnFromMatrix ( columnDefinition) [protected]

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

Definition at line 551 of file ezmatrix.php.

Referenced by removeColumn().

eZMatrix::removeRow ( rowNum)

Definition at line 677 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 441 of file ezmatrix.php.

Referenced by adjustColumnsToDefinition().

Definition at line 264 of file ezmatrix.php.

Referenced by adjustColumnsToDefinition().

eZMatrix::setColumn ( colIdx,
column 
)

Set column data and definition

Parameters:
columnindex
columndata and definition

Definition at line 319 of file ezmatrix.php.

Referenced by reorderColumns().

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

Set column cell data

Parameters:
colIdxcolumn index
cellDatacolumn definition

Definition at line 368 of file ezmatrix.php.

Referenced by setColumn().

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

Set column definition.

Parameters:
colIdxcolumn index
columnDefinitioncolumn definition

Definition at line 344 of file ezmatrix.php.

Referenced by setColumn().

eZMatrix::setColumnIndex ( columnIndex,
newColumnIndex 
)

Sets column's index to $newColumnIndex.

Definition at line 85 of file ezmatrix.php.

Referenced by adjustColumnIndex().

eZMatrix::setColumnName ( columnIndex,
newColumnName 
)

Sets column's name to $newColumnName.

Definition at line 183 of file ezmatrix.php.

Referenced by adjustColumnName().

eZMatrix::setName ( name)

Sets the name of the matrix

Definition at line 572 of file ezmatrix.php.

Referenced by decodeXML().

eZMatrix::updateColumns ( matrixColumnDefinition) [protected]

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

Definition at line 95 of file ezmatrix.php.

Referenced by adjustColumnsToDefinition().

Will return the XML string for this matrix.

Definition at line 823 of file ezmatrix.php.

Referenced by adjustColumnsToDefinition(), and eZMatrix().


Member Data Documentation

eZMatrix::$Cells

Definition at line 889 of file ezmatrix.php.

eZMatrix::$Matrix

Contains the Matrix array.

Definition at line 881 of file ezmatrix.php.

eZMatrix::$Name

Contains the Matrix name.

Definition at line 878 of file ezmatrix.php.

eZMatrix::$NumColumns

Contains the number of columns.

Definition at line 884 of file ezmatrix.php.

eZMatrix::$NumRows

Contains the number of rows.

Definition at line 888 of file ezmatrix.php.


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