cvs: pear /Structures_DataGrid/DataGrid Column.php

From: Date: Tue, 05 Apr 2005 20:58:19 +0000
Subject: cvs: pear /Structures_DataGrid/DataGrid Column.php
Groups: php.pear.cvs 
Request: Send a blank email to pear-cvs+get-30933@lists.php.net to get a copy of this message
asnagy Tue Apr 5 16:58:19 2005 EDT Modified files: /pear/Structures_DataGrid/DataGrid Column.php Log: All formatter callback get record array instead of only function calls with () (Bug #4022) http://cvs.php.net/diff.php/pear/Structures_DataGrid/DataGrid/Column.php?r1=1.13&r2=1.14&ty=u Index: pear/Structures_DataGrid/DataGrid/Column.php diff -u pear/Structures_DataGrid/DataGrid/Column.php:1.13 pear/Structures_DataGrid/DataGrid/Column.php:1.14 --- pear/Structures_DataGrid/DataGrid/Column.php:1.13 Mon Feb 7 10:48:07 2005 +++ pear/Structures_DataGrid/DataGrid/Column.php Tue Apr 5 16:58:18 2005 @@ -16,14 +16,14 @@ // | Author: Andrew Nagy <asnagy@webitecture.org> | // +----------------------------------------------------------------------+ // -// $Id: Column.php,v 1.13 2005/02/07 15:48:07 asnagy Exp $ +// $Id: Column.php,v 1.14 2005/04/05 20:58:18 asnagy Exp $ /** * Structures_DataGrid_Column Class * * This class represents a single column for the DataGrid. * - * @version $Revision: 1.13 $ + * @version $Revision: 1.14 $ * @author Andrew S. Nagy <asnagy@webitecture.org> * @access public * @package Structures_DataGrid @@ -156,7 +156,11 @@ */ function formatter($record) { - // Define any parameters + // Define the Parameter list + $paramList = array(); + $paramList['record'] = $record; + + // Determine callback and additional parameters if ($size = strpos($this->formatter, '(')) { // Retrieve the name of the function to call $formatter = substr($this->formatter, 0, $size); @@ -172,8 +176,6 @@ $parameters = ($parameters === '') ? array() : split(',', $parameters); // Process the parameters - $paramList = array(); - $paramList['record'] = $record; // Auto pass the record array in foreach($parameters as $param) { $param = str_replace('$', '', $param); if (strpos($param, '=') != false) { @@ -185,7 +187,6 @@ } } else { $formatter = $this->formatter; - $paramList = null; } // Call the formatter

« previous php.pear.cvs (#30933) next »