Package home | Report new bug | New search | Development Roadmap Status: Open | Feedback | All | Closed Since Version 1.0.10

Request #5249 More filler classes
Submitted: 2005-08-31 00:04 UTC
From: arpad at rajeczy dot com Assigned:
Status: No Feedback Package: HTML_Table_Matrix
PHP Version: Irrelevant OS: Irrelevant
Roadmaps: (Not assigned)    
Subscription  


 [2005-08-31 00:04 UTC] arpad at rajeczy dot com
Description: ------------ I've implemented some more fillers, namely: Right to left, bottom to top Left to right, bottom to top Top to bottom, left to right Top to bottom, right to left Bottom to top, left to right Bottom to top, right to left Inwards, clockwise Inwards, counter-clockwise Outwards, clockwise Outwards, counter-clockwise I've also made some small changes in the Matrix and Filler classes to add a callback property used in the Outwards fillers and to limit the data so cells aren't overwritten. And finally, updated the test page to include the new fillers. Test script: --------------- Test page: http://rajeczy.com/htm/tme.php Diffs and new files: http://rajeczy.com/htm/htm.zip

Comments

 [2007-11-01 19:09 UTC] elecskunk (Tao Wang)
class HTML_Table_Matrix_Filler_Random extends HTML_Table_Matrix_Filler { var $_map; /** * Constructor * * @param Object $matrix Reference to the HTML_Table_Matrix instance we are * filling data for. * @param array $options Options for this Filler * @return void */ function HTML_Table_Matrix_Filler_Random(&$matrix, $options = false) { $this->setOptions($options); $this->matrix = &$matrix; $this->_initMap(); } function _initMap(){ $this->_map=range(0,$this->matrix->_rows*$this->matrix->_cols-1); srand((float)microtime() * 1000000); shuffle($this->_map); } /** * Get the next cell. * * @param int $index Where we're at in the data-set * @return array 1-dimensional array in the form of (row, col) containing the * coordinates to put the data for this loop iteration */ function next($index) { return array( (int)($this->_map[$index]/$this->matrix->_cols)+$this->matrix->_fillStartRow, $this->_map[$index]%$this->matrix->_cols+$this->matrix->_fillStartCol); } }
 [2008-10-26 15:56 UTC] cweiske (Christian Weiske)
Seems as if your page is down, or the files have been removed. Could you please attach the diff here?