cvs: pear /Structures_DataGrid DataGrid.php /Structures_DataGrid/DataGrid DataSource.php Record.php Renderer.php
/Structures_DataGrid/DataGrid/DataSource Array.php CSV.php DB.php DBQuery.php DBTable.php DataObject.php MDB2.php XML.php
/Structures_DataGrid/DataGrid/Record DB.php DataObject.php

From: Date: Thu, 16 Mar 2006 12:54:02 +0000
Subject: cvs: pear /Structures_DataGrid DataGrid.php /Structures_DataGrid/DataGrid DataSource.php Record.php Renderer.php
/Structures_DataGrid/DataGrid/DataSource Array.php CSV.php DB.php DBQuery.php DBTable.php DataObject.php MDB2.php XML.php
/Structures_DataGrid/DataGrid/Record DB.php DataObject.php
Groups: php.pear.cvs 
Request: Send a blank email to pear-cvs+get-39122@lists.php.net to get a copy of this message
olivierg Thu Mar 16 12:54:02 2006 UTC Modified files: /pear/Structures_DataGrid DataGrid.php /pear/Structures_DataGrid/DataGrid DataSource.php Record.php Renderer.php /pear/Structures_DataGrid/DataGrid/DataSource Array.php CSV.php DB.php DBQuery.php DBTable.php DataObject.php MDB2.php XML.php /pear/Structures_DataGrid/DataGrid/Record DB.php DataObject.php Log: Added support for the PEAR_ERROR_PRINT error handling mode, by replacing 'new PEAR_Error()' statements with 'PEAR::raiseError()'

http://cvs.php.net/viewcvs.cgi/pear/Structures_DataGrid/DataGrid.php?r1=1.45&r2=1.46&diff_format=u Index: pear/Structures_DataGrid/DataGrid.php diff -u pear/Structures_DataGrid/DataGrid.php:1.45 pear/Structures_DataGrid/DataGrid.php:1.46 --- pear/Structures_DataGrid/DataGrid.php:1.45 Thu Mar 16 01:05:52 2006 +++ pear/Structures_DataGrid/DataGrid.php Thu Mar 16 12:54:02 2006 @@ -18,7 +18,7 @@ // | Mark Wiesemann <wiesemann@php.net> | // +----------------------------------------------------------------------+ // -// $Id: DataGrid.php,v 1.45 2006/03/16 01:05:52 olivierg Exp $ +// $Id: DataGrid.php,v 1.46 2006/03/16 12:54:02 olivierg Exp $ require_once 'PEAR.php'; @@ -75,7 +75,7 @@ * ?> * </code> * - * @version $Revision: 1.45 $ + * @version $Revision: 1.46 $ * @author Andrew S. Nagy <asnagy@webitecture.org> * @author Olivier Guilyardi <olivier@samalyse.com> * @author Mark Wiesemann <wiesemann@php.net> @@ -241,7 +241,7 @@ } else { $msg = "unable to load driver class '$className' from file '$file_name'"; } - $error = new PEAR_Error($msg); + $error = PEAR::raiseError($msg); return $error; } } @@ -290,7 +290,7 @@ if (is_null($type) && !($type = Structures_DataGrid::_detectSourceType($source, $options))) { - $error = new PEAR_Error('Unable to determine the data source type. '. + $error = PEAR::raiseError('Unable to determine the data source type. '. 'You may want to explicitly specify it.'); return $error; } @@ -369,7 +369,7 @@ $type = is_null($this->_rendererType) ? get_class($this->_renderer) : $this->_rendererType; - return new PEAR_Error("The $type driver does not support the ". + return PEAR::raiseError("The $type driver does not support the ". "render() method. Try using fill()."); } else { return $test; @@ -428,13 +428,13 @@ * Attach a rendering driver * * @param object $renderer Driver object, subclassing - * Structures_DataGrid_Renderer_Common + * Structures_DataGrid_Renderer * @return mixed Either true or a PEAR_Error object * @access public */ function attachRenderer(&$renderer) { - if (is_subclass_of($renderer, 'structures_datagrid_renderer_common')) { + if (is_subclass_of($renderer, 'structures_datagrid_renderer')) { $this->_renderer =& $renderer; if (isset ($this->_dataSource)) { $this->_renderer->setData($this->columnSet, $this->recordSet); @@ -442,7 +442,7 @@ $this->getRecordCount()); } } else { - return new PEAR_Error('Invalid renderer type, ' . + return PEAR::raiseError('Invalid renderer type, ' . 'must be a valid renderer driver class'); } @@ -466,7 +466,7 @@ if (is_null($type)) { $type = $this->_detectRendererType($container); if (is_null($type)) { - return new PEAR_Error('The rendering container type can not '. + return PEAR::raiseError('The rendering container type can not '. 'be automatically detected. Please ' . 'specify its type explicitly.'); } @@ -485,7 +485,7 @@ $test = $this->_renderer->setContainer($container); if (PEAR::isError($test)) { if ($test->getCode() == DATAGRID_ERROR_UNSUPPORTED) { - return new PEAR_Error("The $type driver does not support the " . + return PEAR::raiseError("The $type driver does not support the " . "fill() method. Try using render()."); } else { return $test; @@ -675,7 +675,7 @@ return $this->columnSet[$key]; } } - $error = new PEAR_Error("Column '$name' does not exist"); + $error = PEAR::raiseError("Column '$name' does not exist"); return $error; } @@ -709,7 +709,7 @@ */ function bindDataSource(&$source) { - if (is_subclass_of($source, 'structures_datagrid_datasource_common')) { + if (is_subclass_of($source, 'structures_datagrid_datasource')) { $this->_dataSource =& $source; if (PEAR::isError($result = $this->fetchDataSource())) { unset ($this->_dataSource); @@ -724,7 +724,7 @@ $this->getRecordCount()); } } else { - return new PEAR_Error('Invalid data source type, ' . + return PEAR::raiseError('Invalid data source type, ' . 'must be a valid data source driver class'); } @@ -764,7 +764,7 @@ return true; } } else { - return new PEAR_Error("Cannot fetch data: no datasource driver loaded."); + return PEAR::raiseError("Cannot fetch data: no datasource driver loaded."); } } @@ -784,7 +784,7 @@ array($record->getRecord())); return true; } else { - return new PEAR_Error('Not a valid DataGrid Record'); + return PEAR::raiseError('Not a valid DataGrid Record'); } } @@ -1006,7 +1006,7 @@ $this->_renderer->build(); return true; } else { - return new PEAR_Error("Cannot build the datagrid: no datasource driver loaded"); + return PEAR::raiseError("Cannot build the datagrid: no datasource driver loaded"); } } http://cvs.php.net/viewcvs.cgi/pear/Structures_DataGrid/DataGrid/DataSource.php?r1=1.14&r2=1.15&diff_format=u Index: pear/Structures_DataGrid/DataGrid/DataSource.php diff -u pear/Structures_DataGrid/DataGrid/DataSource.php:1.14 pear/Structures_DataGrid/DataGrid/DataSource.php:1.15 --- pear/Structures_DataGrid/DataGrid/DataSource.php:1.14 Thu Mar 16 12:37:20 2006 +++ pear/Structures_DataGrid/DataGrid/DataSource.php Thu Mar 16 12:54:02 2006 @@ -17,7 +17,7 @@ // | Andrew Nagy <asnagy@webitecture.org> | // +----------------------------------------------------------------------+ // -// $Id: DataSource.php,v 1.14 2006/03/16 12:37:20 olivierg Exp $ +// $Id: DataSource.php,v 1.15 2006/03/16 12:54:02 olivierg Exp $ /** @@ -240,7 +240,7 @@ * is redundant with the sort() method. */ { - return new PEAR_Error("No data source driver loaded"); + return PEAR::raiseError("No data source driver loaded"); } /** @@ -258,7 +258,7 @@ */ function count() { - return new PEAR_Error("No data source driver loaded"); + return PEAR::raiseError("No data source driver loaded"); } /** @@ -283,7 +283,7 @@ */ function sort($sortSpec, $sortDir = null) { - return new PEAR_Error("No data source driver loaded"); + return PEAR::raiseError("No data source driver loaded"); } /** @@ -301,7 +301,7 @@ */ function bind($container, $options = array()) { - return new PEAR_Error("No data source driver loaded"); + return PEAR::raiseError("No data source driver loaded"); } /**#@-*/ http://cvs.php.net/viewcvs.cgi/pear/Structures_DataGrid/DataGrid/Record.php?r1=1.4&r2=1.5&diff_format=u Index: pear/Structures_DataGrid/DataGrid/Record.php diff -u pear/Structures_DataGrid/DataGrid/Record.php:1.4 pear/Structures_DataGrid/DataGrid/Record.php:1.5 --- pear/Structures_DataGrid/DataGrid/Record.php:1.4 Thu Mar 31 18:20:34 2005 +++ pear/Structures_DataGrid/DataGrid/Record.php Thu Mar 16 12:54:02 2006 @@ -16,7 +16,7 @@ // | Author: Andrew Nagy <asnagy@webitecture.org> | // +----------------------------------------------------------------------+ // -// $Id: Record.php,v 1.4 2005/03/31 18:20:34 asnagy Exp $ +// $Id: Record.php,v 1.5 2006/03/16 12:54:02 olivierg Exp $ /** * Structures_DataGrid_Record Class @@ -26,7 +26,7 @@ * as the cell value. Other data types can be added by the extended classes, * such as a DB_Result or a DB_DataObject. * - * @version $Revision: 1.4 $ + * @version $Revision: 1.5 $ * @author Andrew S. Nagy <asnagy@webitecture.org> * @access public * @package Structures_DataGrid @@ -109,7 +109,7 @@ $this->_record = $data; return true; } else { - return new PEAR_Error('Invalid data type. Must be an array'); + return PEAR::raiseError('Invalid data type. Must be an array'); } } } http://cvs.php.net/viewcvs.cgi/pear/Structures_DataGrid/DataGrid/Renderer.php?r1=1.31&r2=1.32&diff_format=u Index: pear/Structures_DataGrid/DataGrid/Renderer.php diff -u pear/Structures_DataGrid/DataGrid/Renderer.php:1.31 pear/Structures_DataGrid/DataGrid/Renderer.php:1.32 --- pear/Structures_DataGrid/DataGrid/Renderer.php:1.31 Thu Mar 16 12:37:20 2006 +++ pear/Structures_DataGrid/DataGrid/Renderer.php Thu Mar 16 12:54:02 2006 @@ -17,7 +17,7 @@ // | Olivier Guilyardi <olivier@samalyse.com> | // +----------------------------------------------------------------------+ // -// $Id: Renderer.php,v 1.31 2006/03/16 12:37:20 olivierg Exp $ +// $Id: Renderer.php,v 1.32 2006/03/16 12:54:02 olivierg Exp $ require_once 'PHP/Compat/Function/http_build_query.php'; @@ -59,7 +59,7 @@ * - flatten() * - render() * - * Properties (read-only) : + * Properties (all read-only) : * - $_columns * - $_records * - $_columnsNum @@ -72,12 +72,12 @@ * - $_sortableFields * - $_options * - * Options that drivers should handle : + * Options that drivers may handle : * - encoding * - fillWithEmptyRows * - numberAlign * - * @version $Revision: 1.31 $ + * @version $Revision: 1.32 $ * @author Olivier Guilyardi <olivier@samalyse.com> * @access public * @package Structures_DataGrid @@ -662,9 +662,9 @@ */ function _noSupport($method) { - return new PEAR_Error("The renderer driver class \"" .get_class($this). - "\" does not support the $method() method", - DATAGRID_ERROR_UNSUPPORTED); + return PEAR::raiseError("The renderer driver class \"" .get_class($this). + "\" does not support the $method() method", + DATAGRID_ERROR_UNSUPPORTED); } /** http://cvs.php.net/viewcvs.cgi/pear/Structures_DataGrid/DataGrid/DataSource/Array.php?r1=1.19&r2=1.20&diff_format=u Index: pear/Structures_DataGrid/DataGrid/DataSource/Array.php diff -u pear/Structures_DataGrid/DataGrid/DataSource/Array.php:1.19 pear/Structures_DataGrid/DataGrid/DataSource/Array.php:1.20 --- pear/Structures_DataGrid/DataGrid/DataSource/Array.php:1.19 Thu Mar 16 12:37:20 2006 +++ pear/Structures_DataGrid/DataGrid/DataSource/Array.php Thu Mar 16 12:54:02 2006 @@ -17,7 +17,7 @@ // | Andrew Nagy <asnagy@webitecture.org> | // +----------------------------------------------------------------------+ // -// $Id: Array.php,v 1.19 2006/03/16 12:37:20 olivierg Exp $ +// $Id: Array.php,v 1.20 2006/03/16 12:54:02 olivierg Exp $ require_once 'Structures/DataGrid/DataSource.php'; @@ -26,7 +26,7 @@ * * This class is a data source driver for a 2D Array * - * @version $Revision: 1.19 $ + * @version $Revision: 1.20 $ * @author Olivier Guilyardi <olivier@samalyse.com> * @author Andrew Nagy <asnagy@webitecture.org> * @access public @@ -66,7 +66,7 @@ $this->_ar = $ar; return true; } else { - return new PEAR_Error('The provided source must be an array'); + return PEAR::raiseError('The provided source must be an array'); } } http://cvs.php.net/viewcvs.cgi/pear/Structures_DataGrid/DataGrid/DataSource/CSV.php?r1=1.7&r2=1.8&diff_format=u Index: pear/Structures_DataGrid/DataGrid/DataSource/CSV.php diff -u pear/Structures_DataGrid/DataGrid/DataSource/CSV.php:1.7 pear/Structures_DataGrid/DataGrid/DataSource/CSV.php:1.8 --- pear/Structures_DataGrid/DataGrid/DataSource/CSV.php:1.7 Wed Oct 5 00:37:40 2005 +++ pear/Structures_DataGrid/DataGrid/DataSource/CSV.php Thu Mar 16 12:54:02 2006 @@ -16,7 +16,7 @@ // | Author: Andrew Nagy <asnagy@webitecture.org> | // +----------------------------------------------------------------------+ // -// $Id: CSV.php,v 1.7 2005/10/05 00:37:40 olivierg Exp $ +// $Id: CSV.php,v 1.8 2006/03/16 12:54:02 olivierg Exp $ require_once 'Structures/DataGrid/DataSource/Array.php'; @@ -26,7 +26,7 @@ * This class is a data source driver for a CSV File. It will also support any * other delimiter. * - * @version $Revision: 1.7 $ + * @version $Revision: 1.8 $ * @author Andrew Nagy <asnagy@webitecture.org> * @access public * @package Structures_DataGrid @@ -57,7 +57,7 @@ if (@is_file($csv)) { if (!$rowList = file($csv)) { - return new PEAR_Error('Could not read file'); + return PEAR::raiseError('Could not read file'); } } else { $rowList = explode("\n", $csv); http://cvs.php.net/viewcvs.cgi/pear/Structures_DataGrid/DataGrid/DataSource/DB.php?r1=1.15&r2=1.16&diff_format=u Index: pear/Structures_DataGrid/DataGrid/DataSource/DB.php diff -u pear/Structures_DataGrid/DataGrid/DataSource/DB.php:1.15 pear/Structures_DataGrid/DataGrid/DataSource/DB.php:1.16 --- pear/Structures_DataGrid/DataGrid/DataSource/DB.php:1.15 Wed Feb 15 20:49:07 2006 +++ pear/Structures_DataGrid/DataGrid/DataSource/DB.php Thu Mar 16 12:54:02 2006 @@ -17,7 +17,7 @@ // | Olivier Guilyardi <olivier@samalyse.com> | // +----------------------------------------------------------------------+ // -// $Id: DB.php,v 1.15 2006/02/15 20:49:07 wiesemann Exp $ +// $Id: DB.php,v 1.16 2006/03/16 12:54:02 olivierg Exp $ require_once 'Structures/DataGrid/DataSource/Array.php'; @@ -26,7 +26,7 @@ * * This class is a data source driver for the PEAR::DB::DB_Result object * - * @version $Revision: 1.15 $ + * @version $Revision: 1.16 $ * @author Andrew S. Nagy <asnagy@webitecture.org> * @author Olivier Guilyardi <olivier@samalyse.com> * @access public @@ -73,7 +73,7 @@ } return true; } else { - return new PEAR_Error('The provided source must be a DB_Result'); + return PEAR::raiseError('The provided source must be a DB_Result'); } } http://cvs.php.net/viewcvs.cgi/pear/Structures_DataGrid/DataGrid/DataSource/DBQuery.php?r1=1.5&r2=1.6&diff_format=u Index: pear/Structures_DataGrid/DataGrid/DataSource/DBQuery.php diff -u pear/Structures_DataGrid/DataGrid/DataSource/DBQuery.php:1.5 pear/Structures_DataGrid/DataGrid/DataSource/DBQuery.php:1.6 --- pear/Structures_DataGrid/DataGrid/DataSource/DBQuery.php:1.5 Thu Mar 16 12:37:20 2006 +++ pear/Structures_DataGrid/DataGrid/DataSource/DBQuery.php Thu Mar 16 12:54:02 2006 @@ -17,7 +17,7 @@ // | Mark Wiesemann <wiesemann@php.net> | // +----------------------------------------------------------------------+ // -// $Id: DBQuery.php,v 1.5 2006/03/16 12:37:20 olivierg Exp $ +// $Id: DBQuery.php,v 1.6 2006/03/16 12:54:02 olivierg Exp $ require_once 'DB.php'; require_once 'Structures/DataGrid/DataSource.php'; @@ -28,7 +28,7 @@ * * This class is a data source driver for the PEAR::DB object * - * @version $Revision: 1.5 $ + * @version $Revision: 1.6 $ * @author Andrew S. Nagy <asnagy@php.net> * @author Mark Wiesemann <wiesemann@php.net> * @access public @@ -106,18 +106,18 @@ } $this->_db =& DB::connect($this->_options['dsn'], $dbOptions); if (PEAR::isError($this->_db)) { - return new PEAR_Error('Could not create connection: ' . + return PEAR::raiseError('Could not create connection: ' . $this->_db->getMessage()); } } else { - return new PEAR_Error('No DB object or dsn string specified'); + return PEAR::raiseError('No DB object or dsn string specified'); } if (is_string($query)) { $this->_query = $query; return true; } else { - return new PEAR_Error('Query parameter must be a string'); + return PEAR::raiseError('Query parameter must be a string'); } } http://cvs.php.net/viewcvs.cgi/pear/Structures_DataGrid/DataGrid/DataSource/DBTable.php?r1=1.6&r2=1.7&diff_format=u Index: pear/Structures_DataGrid/DataGrid/DataSource/DBTable.php diff -u pear/Structures_DataGrid/DataGrid/DataSource/DBTable.php:1.6 pear/Structures_DataGrid/DataGrid/DataSource/DBTable.php:1.7 --- pear/Structures_DataGrid/DataGrid/DataSource/DBTable.php:1.6 Thu Mar 16 12:37:20 2006 +++ pear/Structures_DataGrid/DataGrid/DataSource/DBTable.php Thu Mar 16 12:54:02 2006 @@ -17,7 +17,7 @@ // | Mark Wiesemann <wiesemann@php.net> | // +----------------------------------------------------------------------+ // -// $Id: DBTable.php,v 1.6 2006/03/16 12:37:20 olivierg Exp $ +// $Id: DBTable.php,v 1.7 2006/03/16 12:54:02 olivierg Exp $ require_once 'Structures/DataGrid/DataSource.php'; @@ -26,7 +26,7 @@ * * This class is a data source driver for the PEAR::DB_Table object * -* @version $Revision: 1.6 $ +* @version $Revision: 1.7 $ * @author Andrew S. Nagy <asnagy@php.net> * @author Mark Wiesemann <wiesemann@php.net> * @access public @@ -94,7 +94,7 @@ if (strtolower(get_parent_class($object)) == 'db_table') { $this->_object =& $object; } else { - return new PEAR_Error( + return PEAR::raiseError( 'The provided source must be a subclass of DB_Table'); } @@ -103,7 +103,7 @@ $this->setOptions($options); return true; } else { - return new PEAR_Error('Invalid "view" specified ' . + return PEAR::raiseError('Invalid "view" specified ' . '[must be a key in array of DB_Table subclass]'); } } http://cvs.php.net/viewcvs.cgi/pear/Structures_DataGrid/DataGrid/DataSource/DataObject.php?r1=1.27&r2=1.28&diff_format=u Index: pear/Structures_DataGrid/DataGrid/DataSource/DataObject.php diff -u pear/Structures_DataGrid/DataGrid/DataSource/DataObject.php:1.27 pear/Structures_DataGrid/DataGrid/DataSource/DataObject.php:1.28 --- pear/Structures_DataGrid/DataGrid/DataSource/DataObject.php:1.27 Thu Mar 16 12:37:20 2006 +++ pear/Structures_DataGrid/DataGrid/DataSource/DataObject.php Thu Mar 16 12:54:02 2006 @@ -17,7 +17,7 @@ // | Andrew Nagy <asnagy@webitecture.org> | // +----------------------------------------------------------------------+ // -// $Id: DataObject.php,v 1.27 2006/03/16 12:37:20 olivierg Exp $ +// $Id: DataObject.php,v 1.28 2006/03/16 12:54:02 olivierg Exp $ require_once 'Structures/DataGrid/DataSource.php'; @@ -38,7 +38,7 @@ * same kind of information as the "fields" options. If the "fields" * option is set, this one will not be used. Default : "fb_fieldsToRender". * - * @version $Revision: 1.27 $ + * @version $Revision: 1.28 $ * @author Olivier Guilyardi <olivier@samalyse.com> * @author Andrew Nagy <asnagy@webitecture.org> * @access public @@ -154,7 +154,7 @@ return true; } else { - return new PEAR_Error('The provided source must be a DB_DataObject'); + return PEAR::raiseError('The provided source must be a DB_DataObject'); } } @@ -272,7 +272,7 @@ } else { $test = $this->_dataobject->count(); if ($test === false) { - return new PEAR_Error ('Can\'t count the number of rows'); + return PEAR::raiseError ('Can\'t count the number of rows'); } $this->_rowNum = $test; } http://cvs.php.net/viewcvs.cgi/pear/Structures_DataGrid/DataGrid/DataSource/MDB2.php?r1=1.2&r2=1.3&diff_format=u Index: pear/Structures_DataGrid/DataGrid/DataSource/MDB2.php diff -u pear/Structures_DataGrid/DataGrid/DataSource/MDB2.php:1.2 pear/Structures_DataGrid/DataGrid/DataSource/MDB2.php:1.3 --- pear/Structures_DataGrid/DataGrid/DataSource/MDB2.php:1.2 Thu Mar 16 12:37:20 2006 +++ pear/Structures_DataGrid/DataGrid/DataSource/MDB2.php Thu Mar 16 12:54:02 2006 @@ -17,7 +17,7 @@ // | Mark Wiesemann <wiesemann@php.net> | // +----------------------------------------------------------------------+ // -// $Id: MDB2.php,v 1.2 2006/03/16 12:37:20 olivierg Exp $ +// $Id: MDB2.php,v 1.3 2006/03/16 12:54:02 olivierg Exp $ require_once 'MDB2.php'; require_once 'Structures/DataGrid/DataSource.php'; @@ -28,7 +28,7 @@ * * This class is a data source driver for the PEAR::MDB2 object * - * @version $Revision: 1.2 $ + * @version $Revision: 1.3 $ * @author Andrew S. Nagy <asnagy@php.net> * @author Mark Wiesemann <wiesemann@php.net> * @access public @@ -106,11 +106,11 @@ } $this->_db =& MDB2::factory($this->_options['dsn'], $dbOptions); if (PEAR::isError($this->_db)) { - return new PEAR_Error('Could not create connection: ' . + return PEAR::raiseError('Could not create connection: ' . $this->_db->getMessage()); } } else { - return new PEAR_Error('No MDB2 object or dsn string specified'); + return PEAR::raiseError('No MDB2 object or dsn string specified'); } $this->_db->loadModule('Extended'); @@ -119,7 +119,7 @@ $this->_query = $query; return true; } else { - return new PEAR_Error('Query parameter must be a string'); + return PEAR::raiseError('Query parameter must be a string'); } } http://cvs.php.net/viewcvs.cgi/pear/Structures_DataGrid/DataGrid/DataSource/XML.php?r1=1.6&r2=1.7&diff_format=u Index: pear/Structures_DataGrid/DataGrid/DataSource/XML.php diff -u pear/Structures_DataGrid/DataGrid/DataSource/XML.php:1.6 pear/Structures_DataGrid/DataGrid/DataSource/XML.php:1.7 --- pear/Structures_DataGrid/DataGrid/DataSource/XML.php:1.6 Mon May 16 19:10:59 2005 +++ pear/Structures_DataGrid/DataGrid/DataSource/XML.php Thu Mar 16 12:54:02 2006 @@ -17,7 +17,7 @@ // | Andrew Nagy <asnagy@webitecture.org> | // +----------------------------------------------------------------------+ // -// $Id: XML.php,v 1.6 2005/05/16 19:10:59 asnagy Exp $ +// $Id: XML.php,v 1.7 2006/03/16 12:54:02 olivierg Exp $ require_once 'Structures/DataGrid/DataSource/Array.php'; require_once 'XML/Unserializer.php'; @@ -95,7 +95,7 @@ foreach ($data as $index => $row) { if (!is_array($row) or !is_numeric($index)) { - return new PEAR_Error('Unable to bind the xml data. '. + return PEAR::raiseError('Unable to bind the xml data. '. 'You may want to set the \'xpath\' option.'); } http://cvs.php.net/viewcvs.cgi/pear/Structures_DataGrid/DataGrid/Record/DB.php?r1=1.8&r2=1.9&diff_format=u Index: pear/Structures_DataGrid/DataGrid/Record/DB.php diff -u pear/Structures_DataGrid/DataGrid/Record/DB.php:1.8 pear/Structures_DataGrid/DataGrid/Record/DB.php:1.9 --- pear/Structures_DataGrid/DataGrid/Record/DB.php:1.8 Mon Jan 10 15:15:49 2005 +++ pear/Structures_DataGrid/DataGrid/Record/DB.php Thu Mar 16 12:54:02 2006 @@ -16,14 +16,14 @@ // | Author: Andrew Nagy <asnagy@webitecture.org> | // +----------------------------------------------------------------------+ // -// $Id: DB.php,v 1.8 2005/01/10 15:15:49 asnagy Exp $ +// $Id: DB.php,v 1.9 2006/03/16 12:54:02 olivierg Exp $ require_once 'Structures/DataGrid/Record.php'; /** * Structures_DataGrid_Record_DB Class * - * @version $Revision: 1.8 $ + * @version $Revision: 1.9 $ * @author Andrew S. Nagy <asnagy@webitecture.org> * @access public * @package Structures_DataGrid @@ -61,7 +61,7 @@ if (strtolower(get_class($data)) == 'db_result') { parent::setRecord($data->fetchRow(DB_FETCHMODE_ASSOC)); } else { - return new PEAR_Error('Invalid data type. Data must be a DB_Result record'); + return PEAR::raiseError('Invalid data type. Data must be a DB_Result record'); } } } http://cvs.php.net/viewcvs.cgi/pear/Structures_DataGrid/DataGrid/Record/DataObject.php?r1=1.11&r2=1.12&diff_format=u Index: pear/Structures_DataGrid/DataGrid/Record/DataObject.php diff -u pear/Structures_DataGrid/DataGrid/Record/DataObject.php:1.11 pear/Structures_DataGrid/DataGrid/Record/DataObject.php:1.12 --- pear/Structures_DataGrid/DataGrid/Record/DataObject.php:1.11 Thu Mar 16 12:37:20 2006 +++ pear/Structures_DataGrid/DataGrid/Record/DataObject.php Thu Mar 16 12:54:02 2006 @@ -16,14 +16,14 @@ // | Author: Andrew Nagy <asnagy@webitecture.org> | // +----------------------------------------------------------------------+ // -// $Id: DataObject.php,v 1.11 2006/03/16 12:37:20 olivierg Exp $ +// $Id: DataObject.php,v 1.12 2006/03/16 12:54:02 olivierg Exp $ require_once 'Structures/DataGrid/Record.php'; /** * Structures_DataGrid_Record_DataObject Class * - * @version $Revision: 1.11 $ + * @version $Revision: 1.12 $ * @author Andrew S. Nagy <asnagy@webitecture.org> * @access public * @package Structures_DataGrid @@ -52,7 +52,7 @@ if (is_subclass_of($data, 'db_dataobject')) { parent::setRecord($data->toArray()); } else { - return new PEAR_Error('Invalid data type. ' . + return PEAR::raiseError('Invalid data type. ' . 'Data must be of type DB_DataObject'); } }
« previous php.pear.cvs (#39122) next »