Exponential 6.0.13 Exponential Enterprise Open Source CMS - PHP Class Reference

ezmatrix.php
Go to the documentation of this file.
1 <?php
18 class eZMatrix
19 {
25 public function __construct( $name, $numRows = false, $matrixColumnDefinition = false )
26 {
27 $this->Name = $name;
28 $this->Matrix = array();
29
30 if ( $numRows !== false && $matrixColumnDefinition !== false )
31 {
32 $columns = $matrixColumnDefinition->attribute( 'columns' );
33 $numColumns = count( $columns );
34 $this->NumColumns = $numColumns;
35
36 $sequentialColumns = array();
37 foreach ( $columns as $column )
38 {
39 $sequentialColumns[] = array( 'identifier' => $column['identifier'],
40 'index' => $column['index'],
41 'name' => $column['name'] );
42
43 }
44 $this->Matrix['columns'] = array();
45 $this->Matrix['columns']['sequential'] = $sequentialColumns;
46
47 $this->NumRows = $numRows;
48 $cells = array();
49 for ( $i = 0; $i < $numColumns; ++$i )
50 {
51 for ( $j = 0; $j < $numRows; ++$j )
52 {
53 $cells[] = '';
54 }
55 }
56 $this->Cells = $cells;
57
58
59 $xmlString = $this->xmlString();
60 $this->decodeXML( $xmlString );
61 }
62 }
63
72 function adjustColumnIndex( $columnIndex, $newColumnIndex )
73 {
74 $matrix = $this->attribute( 'matrix' );
75 $columnDefinition = $matrix['columns']['sequential'][$columnIndex];
76 if ( $columnDefinition['index'] != $newColumnIndex )
77 {
78 $this->setColumnIndex( $columnIndex, $newColumnIndex );
79 return true;
80 }
81 return false;
82 }
83
87 function setColumnIndex( $columnIndex, $newColumnIndex )
88 {
89 $this->Matrix['columns']['sequential'][$columnIndex]['index'] = $newColumnIndex;
90 }
91
97 protected function updateColumns( $matrixColumnDefinition )
98 {
99 $matrixWasModified = false;
100
101 if ( $matrixColumnDefinition && $matrixColumnDefinition !== false )
102 {
103 $columns = $matrixColumnDefinition->attribute( 'columns' );
104 foreach ( $columns as $column )
105 {
106 $columnIndex = $this->columnIndex( $column['identifier'] );
107 if ( $columnIndex !== false )
108 {
109 $matrixWasModified |= $this->adjustColumnName( $columnIndex, $column['name'] );
110 $matrixWasModified |= $this->adjustColumnIndex( $columnIndex, $column['index'] );
111 }
112 else
113 {
114 $matrixWasModified |= $this->addColumn( $column );
115 }
116 }
117 }
118 return $matrixWasModified;
119 }
120
124 function addColumn( $columnDefinition )
125 {
126 $this->addColumnToMatrix( $columnDefinition );
127 $this->addColumnToCells( $columnDefinition );
128 return true;
129 }
130
134 function addColumnToMatrix( $columnDefinition )
135 {
136 $newColumn = array( 'identifier' => $columnDefinition['identifier'],
137 'index' => $columnDefinition['index'],
138 'name' => $columnDefinition['name'] );
139
140 array_splice( $this->Matrix['columns']['sequential'], $columnDefinition['index'], 0, array( $newColumn ) );
141 }
142
146 function addColumnToCells( $columnDefinition )
147 {
148 $cells = $this->attribute( 'cells' );
149 $columnCount = $this->attribute( 'columnCount' );
150 $rowCount = $this->attribute( 'rowCount' );
151 $pos = $columnDefinition['index'];
152
153 // walk through rows and add elements one by one.
154 while ( $rowCount > 0 )
155 {
156 array_splice( $this->Cells, $pos, 0, '' );
157 $pos += $columnCount;
158 --$rowCount;
159 }
160 }
161
170 function adjustColumnName( $columnIndex, $newColumnName )
171 {
172 $matrix = $this->attribute( 'matrix' );
173 $columnDefinition = $matrix['columns']['sequential'][$columnIndex];
174 if ( $columnDefinition['name'] != $newColumnName )
175 {
176 $this->setColumnName( $columnIndex, $newColumnName );
177 return true;
178 }
179 return false;
180 }
181
185 function setColumnName( $columnIndex, $newColumnName )
186 {
187 $this->Matrix['columns']['sequential'][$columnIndex]['name'] = $newColumnName;
188 }
189
200 function adjustColumnsToDefinition( $classColumnsDefinition )
201 {
202 $matrixWasModified = false;
203
204 $matrixWasModified |= $this->removeUselessColumns( $classColumnsDefinition );
205 $matrixWasModified |= $this->updateColumns( $classColumnsDefinition );
206
207 if ( $matrixWasModified )
208 {
209 $this->reorderColumns();
210
211 $columns = $classColumnsDefinition->attribute( 'columns' );
212 $numColumns = count( $columns );
213 $this->NumColumns = $numColumns;
214
215 $xmlString = $this->xmlString();
216 $this->decodeXML( $xmlString );
217 }
218
219 return $matrixWasModified;
220 }
221
225 function buildReorderRuleForColumn( $columns, $pos )
226 {
227 $rule = array( $pos );
228 $startPos = $pos;
229
230 $column = $columns[$pos];
231 while( $column['index'] != $startPos )
232 {
233 $pos = $column['index'];
234 $rule[] = $pos;
235 $column = $columns[$pos];
236 }
237
238 return $rule;
239 }
240
244 function buildReorderRules()
245 {
246 $matrix = $this->attribute( 'matrix' );
247 $columns = $matrix['columns']['sequential'];
248 $rules = array();
249 $positions = array_keys( $columns );
250
251 foreach ( $columns as $pos => $column )
252 {
253 if ( $this->hasRuleForColumn( $rules, $pos ) )
254 {
255 continue;
256 }
257
258 if ( $column['index'] != $pos )
259 {
260 $rules[] = $this->buildReorderRuleForColumn( $columns, $pos );
261 }
262 }
263 return $rules;
264 }
265
266 function reorderColumns()
267 {
268 $rules = $this->buildReorderRules();
269
270 /*
271 example rule: ( 0, 3, 2, 1 )
272 reorder way:
273 move( 1 -> buffer )
274 move( 2 -> 1 )
275 move( 3 -> 2 )
276 move( 0 -> 3 )
277 move( buffer -> 0 )
278 */
279 foreach( $rules as $rule )
280 {
281 // last column in rule
282 $pos = count( $rule ) - 1;
283
284 $column = $this->column( $rule[$pos] );
285
286 while ( $pos != 0 )
287 {
288 $this->copyDataBetweenColumns( $rule[$pos - 1], $rule[$pos]);
289 --$pos;
290 }
291
292 // first column in rule
293 $this->setColumn( $rule[0], $column );
294 }
295 }
296
300 function hasRuleForColumn( $rules, $pos )
301 {
302 foreach ( $rules as $rule )
303 {
304 foreach ( $rule as $columnPos )
305 {
306 if ( $columnPos == $pos )
307 {
308 return true;
309 }
310 }
311 }
312 return false;
313 }
314
321 function setColumn( $colIdx, $column )
322 {
323 $this->setColumnDefinition( $colIdx, $column['columnDefinition'] );
324 $this->setColumnCellData( $colIdx, $column['cellsData'] );
325 }
326
334 function column( $colIdx )
335 {
336 return array( 'columnDefinition' => $this->columnDefinition( $colIdx ),
337 'cellsData' => $this->columnCellsData ( $colIdx ) );
338 }
339
346 protected function setColumnDefinition( $colIdx, $columnDefinition )
347 {
348 $this->Matrix['columns']['sequential'][$colIdx] = $columnDefinition;
349 }
350
358 protected function columnDefinition( $colIdx )
359 {
360 $matrix = $this->attribute( 'matrix' );
361 return $matrix['columns']['sequential'][$colIdx];
362 }
363
370 protected function setColumnCellData( $colIdx, $cellData )
371 {
372 $columnCount = $this->attribute( 'columnCount' );
373 $dataCount = count( $cellData );
374 $dataOffset = 0;
375 $cellOffset = $colIdx;
376
377 for( $dataOffset = 0 ; $dataOffset < $dataCount; $dataOffset++ )
378 {
379 $this->Cells[$cellOffset] = $cellData[$dataOffset];
380 $cellOffset += $columnCount;
381 }
382 }
383
391 protected function columnCellsData( $colIdx )
392 {
393 $retArray = array();
394 $columnCount = $this->attribute( 'columnCount' );
395 $rowCount = $this->attribute( 'rowCount' );
396 $cells = $this->attribute( 'cells' );
397 $pos = $colIdx;
398
399 // walk through rows and add elements one by one.
400 while ( $rowCount > 0 )
401 {
402 $retArray[] = $cells[$pos];
403 $pos += $columnCount;
404 --$rowCount;
405 }
406
407 return $retArray;
408 }
409
410 function copyDataBetweenColumns( $firstColIdx, $secondColIdx )
411 {
412 $this->copyDefinitionBetweenColumns( $firstColIdx, $secondColIdx );
413 $this->copyCellsDataBetweenColumns ( $firstColIdx, $secondColIdx );
414 }
415
416 protected function copyDefinitionBetweenColumns( $col1, $col2 )
417 {
418 $this->Matrix['columns']['sequential'][$col2] = $this->Matrix['columns']['sequential'][$col1];
419 }
420
421 protected function copyCellsDataBetweenColumns ( $firstColIdx, $secondColIdx )
422 {
423 $columnCount = $this->attribute( 'columnCount' );
424 $rowCount = $this->attribute( 'rowCount' );
425 $firstColPos = $firstColIdx;
426 $secondColIdx= $secondColIdx;
427
428 // walk through rows and add elements one by one.
429 while ( $rowCount > 0 )
430 {
431 $this->Cells[$secondColIdx] = $this->Cells[$firstColIdx];
432 $firstColIdx += $columnCount;
433 $secondColIdx += $columnCount;
434 --$rowCount;
435 }
436 }
437
443 function removeUselessColumns( $matrixColumnDefinition )
444 {
445 $columnsToRemove = $this->getColumnsToRemove( $matrixColumnDefinition );
446
447 if ( count( $columnsToRemove ) > 0 )
448 {
449 // remove begins from last column (reverse order )
450 foreach ( array_reverse( $columnsToRemove ) as $column )
451 {
452 $this->removeColumn( $column );
453 }
454 return true;
455 }
456
457 return false;
458 }
459
463 function getColumnsToRemove( $matrixColumnsDefinition )
464 {
465 $columnsToRemove = array();
466 $matrix = $this->attribute( 'matrix' );
467 $columns = $matrix['columns']['sequential'];
468
469 foreach ( $columns as $column )
470 {
471 if ( !$this->columnExists( $column, $matrixColumnsDefinition ) )
472 {
473 $columnsToRemove[] = $column;
474 }
475 }
476
477 return $columnsToRemove;
478 }
479
487 protected function columnIndex( $columnIdent )
488 {
489 $matrix = $this->attribute( 'matrix' );
490 $columns = $matrix['columns']['sequential'];
491
492 foreach( $columns as $key => $column )
493 {
494 if ( $column['identifier'] == $columnIdent )
495 {
496 return $key;
497 }
498 }
499
500 return false;
501 }
502
507 protected function columnExists( $columnToFind, $matrixColumnsDefinition )
508 {
509 $columns = $matrixColumnsDefinition->attribute( 'columns' );
510
511 foreach ( $columns as $column )
512 {
513 if ( $column['identifier'] === $columnToFind['identifier'] )
514 return true;
515 }
516
517 return false;
518 }
519
523 function removeColumn( $columnDefinition )
524 {
525 $this->removeColumnFromCells( $columnDefinition );
526 $this->removeColumnFromMatrix( $columnDefinition );
527 }
528
532 protected function removeColumnFromCells( $columnDefinition )
533 {
534 $cells = $this->attribute( 'cells' );
535 $rowCount = $this->attribute( 'rowCount' );
536 $columnCount = $this->attribute( 'columnCount' );
537
538 // last position(index) of element to remove in $cells.
539 $pos = ( $rowCount - 1 ) * $columnCount + $columnDefinition['index'];
540
541 // walk through rows and remove elements one by one.
542 while ( $rowCount > 0 )
543 {
544 array_splice( $this->Cells, $pos, 1 );
545 $pos -= $columnCount;
546 --$rowCount;
547 }
548 }
549
553 protected function removeColumnFromMatrix( $columnDefinition )
554 {
555 $matrix = $this->attribute( 'matrix' );
556 $columns = $matrix['columns']['sequential'];
557 $pos = 0;
558
559 foreach ( $columns as $column )
560 {
561 if ( $column['identifier'] == $columnDefinition['identifier'] )
562 {
563 array_splice( $this->Matrix['columns']['sequential'], $pos, 1 );
564 return true;
565 }
566 ++$pos;
567 }
568 return false;
569 }
570
574 function setName( $name )
575 {
576 $this->Name = $name;
577 }
578
582 function name()
583 {
584 return $this->Name;
585 }
586
587 function attributes()
588 {
589 return array( 'name' ,
590 'rows',
591 'columns',
592 'matrix',
593 'cells',
594 'rowCount',
595 'columnCount' );
596 }
597
598 function hasAttribute( $name )
599 {
600 return in_array( $name, $this->attributes() );
601 }
602
603 function attribute( $name )
604 {
605 switch ( $name )
606 {
607 case "name" :
608 {
609 return $this->Name;
610 }break;
611 case "matrix" :
612 {
613 return $this->Matrix;
614 }break;
615 case "cells" :
616 {
617 return $this->Cells;
618 }break;
619 case "rows" :
620 {
621 return $this->Matrix['rows'];
622 }break;
623 case "columns" :
624 {
625 return $this->Matrix['columns'];
626 }break;
627 case "rowCount" :
628 {
629 return count( $this->Matrix['rows']['sequential'] );
630 }break;
631 case "columnCount" :
632 {
633 return count( $this->Matrix['columns']['sequential'] );
634 }break;
635 default:
636 {
637 eZDebug::writeError( "Attribute '$name' does not exist", __METHOD__ );
638 return null;
639 }break;
640 }
641 }
642
643 function addRow( $beforeIndex = false, $addCount = 1 )
644 {
645 $addCount = min( $addCount, 40 );
646
647 for ( $r = $addCount; $r > 0; $r-- )
648 {
649 $newCells = array();
650 $numColumns = $this->attribute( 'columnCount' );
651 $numRows = $this->attribute( 'rowCount' );
652 for ( $i = 0; $i < $numColumns; $i++ )
653 {
654 $newCells[] = '';
655 }
656 $newRow = array();
657 $newRow['columns'] = $newCells;
658 $this->NumRows++;
659 if ( $beforeIndex === false )
660 {
661 $this->Cells = array_merge( $this->Cells, $newCells );
662 $newRow['identifier'] = 'row_' . ( $numRows + 1 );
663 $newRow['name'] = 'Row_' . ( $numRows + 1 );
664 $this->Matrix['rows']['sequential'][] = $newRow;
665
666 }
667 else
668 {
669 $insertIndex = ( $beforeIndex + 1 ) * $numColumns - $numColumns;
670 array_splice( $this->Cells, $insertIndex, 0, $newCells );
671 $newRow['identifier'] = 'row_' . $beforeIndex;
672 $newRow['name'] = 'Row_' . ( $numRows + 1 );
673 array_splice( $this->Matrix['rows']['sequential'], $beforeIndex, 0, array( $newRow ) );
674
675 }
676 }
677 }
678
679 function removeRow( $rowNum )
680 {
681 $numColumns = $this->attribute( 'columnCount' );
682 $numRows = $this->attribute( 'rowCount' );
683
684 array_splice( $this->Cells, $rowNum * $numColumns, $numColumns );
685 array_splice( $this->Matrix['rows']['sequential'], $rowNum, 1 );
686 $this->NumRows--;
687 }
688
692 function decodeXML( $xmlString )
693 {
694 if ( $xmlString != "" )
695 {
696 $dom = new DOMDocument( '1.0', 'utf-8' );
697 $success = $dom->loadXML( $xmlString );
698 // set the name of the node
699 $nameArray = $dom->getElementsByTagName( "name" );
700 $this->setName( $nameArray->item( 0 )->textContent );
701
702 $columnsNode = $dom->getElementsByTagName( "columns" )->item( 0 );
703 $numColumns = $columnsNode->getAttribute( 'number');
704
705 $rowsNode = $dom->getElementsByTagName( "rows" )->item( 0 );
706 $numRows = $rowsNode->getAttribute( 'number' );
707
708 $namedColumns = $dom->getElementsByTagName( "column" );
709 $namedColumnList = array();
710 if ( $namedColumns->length > 0 )
711 {
712 foreach ( $namedColumns as $namedColumn )
713 {
714 $columnName = $namedColumn->textContent;
715 $columnID = $namedColumn->getAttribute( 'id' );
716 $columnNumber = $namedColumn->getAttribute( 'num' );
717 $namedColumnList[$columnNumber] = array( 'name' => $columnName,
718 'column_number' => $columnNumber,
719 'column_id' => $columnID );
720 }
721 }
722 $cellNodes = $dom->getElementsByTagName( "c" );
723 $cellList = array();
724 foreach ( $cellNodes as $cellNode )
725 {
726 $cellList[] = $cellNode->textContent;
727 }
728
729 $rows = array( 'sequential' => array() );
730 $sequentialRows = array();
731
732 for ( $i = 1; $i <= $numRows; $i++ )
733 {
734 $row = array( 'identifier' => 'row_' . $i ,
735 'name' => 'Row_' . $i );
736 $rowColumns = array();
737 for ( $j = 1; $j <= $numColumns; $j++ )
738 {
739 $rowColumns[] = $cellList[ ($i-1) * $numColumns + $j-1];
740 }
741 $row['columns'] = $rowColumns;
742 $sequentialRows[] = $row;
743 }
744 $rows['sequential'] = $sequentialRows;
745
746 $columns = array( 'sequential' => array(),
747 'id' => array() );
748 $sequentialColumns = array();
749 $idColumns = array();
750
751 for ( $i = 0; $i < $numColumns; $i++ )
752 {
753 if ( isset( $column ) )
754 unset( $column );
755 $column = array();
756 if ( isset( $namedColumnList[$i] ) && is_array( $namedColumnList[$i] ) )
757 {
758 $column = array( 'identifier' => $namedColumnList[$i]['column_id'],
759 'index' => $i,
760 'name' => $namedColumnList[$i]['name'] );
761 }
762 else
763 {
764 $column = array( 'identifier' => 'col_' . ($i + 1),
765 'index' => $i,
766 'name' => 'Col_' . ($i + 1) );
767
768 }
769
770 $columnRows = array();
771 for( $j = 0; $j < $numRows; $j++ )
772 {
773 $columnRows[] = $sequentialRows[$j]['columns'][$i];
774 }
775 $column['rows'] = $columnRows;
776 $sequentialColumns[] = $column;
777 $idColumns[$column['identifier']] = $column;
778 }
779 $columns['sequential'] = $sequentialColumns;
780 $columns['id'] = $idColumns;
781
782 $matrix = array( 'rows' => $rows,
783 'columns' => $columns,
784 'cells' => $cellList );
785
786 $this->Matrix = $matrix;
787 $this->NumRows = $numRows;
788 $this->NumColumns = $numColumns;
789 $this->Cells = $cellList;
790 }
791 else
792 {
793 $this->Cells = array();
794 $this->Matrix = array();
795 }
796 }
802 function domString( $domDocument )
803 {
804 $ini = eZINI::instance();
805 $xmlCharset = $ini->variable( 'RegionalSettings', 'ContentXMLCharset' );
806 if ( $xmlCharset == 'enabled' )
807 {
808 $charset = eZTextCodec::internalCharset();
809 }
810 else if ( $xmlCharset == 'disabled' )
811 $charset = true;
812 else
813 $charset = $xmlCharset;
814 if ( $charset !== true )
815 {
816 $charset = eZCharsetInfo::realCharsetCode( $charset );
817 }
818 $domString = $domDocument->saveXML();
819 return $domString;
820 }
821
825 function xmlString()
826 {
827 $doc = new DOMDocument( '1.0', 'utf-8' );
828 $root = $doc->createElement( "ezmatrix" );
829 $doc->appendChild( $root );
830
831 $name = $doc->createElement( "name", $this->Name );
832 $root->appendChild( $name );
833
834 $columnsNode = $doc->createElement( "columns" );
835
836 $sequentalColumns = $this->Matrix['columns']['sequential'];
837 $columnAmount = $this->NumColumns;
838 $columnsNode->setAttribute( 'number', $columnAmount );
839 $root->appendChild( $columnsNode );
840
841 if ( $sequentalColumns != null )
842 {
843 for( $i = 0; $i < $columnAmount; $i++ )
844 {
845 $column = $sequentalColumns[$i];
846 if ( $column != null && $column['identifier'] != 'col_' . ($i+1) )
847 {
848 unset( $columnNode );
849 $columnNode = $doc->createElement( 'column' );
850 $columnNode->appendChild( $doc->createTextNode( $column['name'] ) );
851 $columnNode->setAttribute( 'num', $i );
852 $columnNode->setAttribute( 'id', $column['identifier'] );
853
854 $columnsNode->appendChild( $columnNode );
855 }
856 }
857
858 }
859
860 $rowsNode = $doc->createElement( "rows" );
861 $rowAmount = $this->NumRows;
862
863 $rowsNode->setAttribute( 'number', $rowAmount );
864
865 $root->appendChild( $rowsNode );
866
867 foreach ( $this->Cells as $cell )
868 {
869 unset( $cellNode );
870 $cellNode = $doc->createElement( 'c' );
871 $cellNode->appendChild( $doc->createTextNode( $cell ) );
872
873 $root->appendChild( $cellNode );
874 }
875
876 return $this->domString( $doc );
877 }
878
880 public $Name;
881
883 public $Matrix;
884
886 public $NumColumns;
887
889
890 public $NumRows;
891 public $Cells;
892 }
893
894 ?>
eZCharsetInfo\realCharsetCode
static realCharsetCode( $charsetCode)
Definition: ezcharsetinfo.php:186
eZDebug\writeError
static writeError( $string, $label="", $backgroundClass="")
Definition: ezdebug.php:545
eZMatrix
The class eZMatrix does.
Definition: ezmatrix.php:19
eZMatrix\attributes
attributes()
Definition: ezmatrix.php:587
eZMatrix\decodeXML
decodeXML( $xmlString)
Definition: ezmatrix.php:692
eZMatrix\columnCellsData
columnCellsData( $colIdx)
Definition: ezmatrix.php:391
eZMatrix\name
name()
Definition: ezmatrix.php:582
eZMatrix\getColumnsToRemove
getColumnsToRemove( $matrixColumnsDefinition)
Definition: ezmatrix.php:463
eZMatrix\addColumnToMatrix
addColumnToMatrix( $columnDefinition)
Definition: ezmatrix.php:134
eZMatrix\columnIndex
columnIndex( $columnIdent)
Definition: ezmatrix.php:487
eZMatrix\$Name
$Name
Contains the Matrix name.
Definition: ezmatrix.php:880
eZMatrix\setName
setName( $name)
Definition: ezmatrix.php:574
eZMatrix\copyCellsDataBetweenColumns
copyCellsDataBetweenColumns( $firstColIdx, $secondColIdx)
Definition: ezmatrix.php:421
eZMatrix\setColumnName
setColumnName( $columnIndex, $newColumnName)
Definition: ezmatrix.php:185
eZMatrix\$NumRows
$NumRows
Contains the number of rows.
Definition: ezmatrix.php:890
eZMatrix\attribute
attribute( $name)
Definition: ezmatrix.php:603
eZMatrix\column
column( $colIdx)
Definition: ezmatrix.php:334
eZMatrix\updateColumns
updateColumns( $matrixColumnDefinition)
Definition: ezmatrix.php:97
eZMatrix\removeRow
removeRow( $rowNum)
Definition: ezmatrix.php:679
eZMatrix\columnExists
columnExists( $columnToFind, $matrixColumnsDefinition)
Definition: ezmatrix.php:507
eZMatrix\setColumnCellData
setColumnCellData( $colIdx, $cellData)
Definition: ezmatrix.php:370
eZMatrix\$Cells
$Cells
Definition: ezmatrix.php:891
eZMatrix\removeColumnFromCells
removeColumnFromCells( $columnDefinition)
Definition: ezmatrix.php:532
eZMatrix\adjustColumnName
adjustColumnName( $columnIndex, $newColumnName)
Definition: ezmatrix.php:170
eZMatrix\buildReorderRules
buildReorderRules()
Definition: ezmatrix.php:244
eZMatrix\addRow
addRow( $beforeIndex=false, $addCount=1)
Definition: ezmatrix.php:643
eZMatrix\xmlString
xmlString()
Definition: ezmatrix.php:825
eZMatrix\removeColumn
removeColumn( $columnDefinition)
Definition: ezmatrix.php:523
eZMatrix\removeUselessColumns
removeUselessColumns( $matrixColumnDefinition)
Definition: ezmatrix.php:443
eZMatrix\buildReorderRuleForColumn
buildReorderRuleForColumn( $columns, $pos)
Definition: ezmatrix.php:225
eZMatrix\columnDefinition
columnDefinition( $colIdx)
Definition: ezmatrix.php:358
eZMatrix\domString
domString( $domDocument)
Definition: ezmatrix.php:802
eZMatrix\hasRuleForColumn
hasRuleForColumn( $rules, $pos)
Definition: ezmatrix.php:300
eZMatrix\addColumn
addColumn( $columnDefinition)
Definition: ezmatrix.php:124
eZMatrix\removeColumnFromMatrix
removeColumnFromMatrix( $columnDefinition)
Definition: ezmatrix.php:553
eZMatrix\adjustColumnsToDefinition
adjustColumnsToDefinition( $classColumnsDefinition)
Definition: ezmatrix.php:200
eZMatrix\setColumnDefinition
setColumnDefinition( $colIdx, $columnDefinition)
Definition: ezmatrix.php:346
eZMatrix\reorderColumns
reorderColumns()
Definition: ezmatrix.php:266
eZMatrix\__construct
__construct( $name, $numRows=false, $matrixColumnDefinition=false)
Definition: ezmatrix.php:25
eZMatrix\copyDataBetweenColumns
copyDataBetweenColumns( $firstColIdx, $secondColIdx)
Definition: ezmatrix.php:410
eZMatrix\addColumnToCells
addColumnToCells( $columnDefinition)
Definition: ezmatrix.php:146
eZMatrix\adjustColumnIndex
adjustColumnIndex( $columnIndex, $newColumnIndex)
Definition: ezmatrix.php:72
eZMatrix\setColumnIndex
setColumnIndex( $columnIndex, $newColumnIndex)
Definition: ezmatrix.php:87
eZMatrix\$Matrix
$Matrix
Contains the Matrix array.
Definition: ezmatrix.php:883
eZMatrix\$NumColumns
$NumColumns
Contains the number of columns.
Definition: ezmatrix.php:886
eZMatrix\copyDefinitionBetweenColumns
copyDefinitionBetweenColumns( $col1, $col2)
Definition: ezmatrix.php:416
eZMatrix\setColumn
setColumn( $colIdx, $column)
Definition: ezmatrix.php:321
eZMatrix\hasAttribute
hasAttribute( $name)
Definition: ezmatrix.php:598
eZTextCodec\internalCharset
static internalCharset()
Definition: eztextcodec.php:546
Copyright © 1998 – 2026 7x. All rights reserved. Licensed under the GNU GPLv2+.