cvs: pear /Structures_DataGrid/DataGrid Renderer.php
| From: | Andrew Nagy | Date: | Thu, 18 Mar 2004 23:13:26 +0000 |
| Subject: | cvs: pear /Structures_DataGrid/DataGrid Renderer.php | ||
| Groups: | php.pear.cvs | ||
| Request: | Send a blank email to pear-cvs+get-17525@lists.php.net to get a copy of this message | ||
asnagy Thu Mar 18 18:13:26 2004 EDT
Modified files:
/pear/Structures_DataGrid/DataGrid Renderer.php
Log:
Removed reference in function call due to call-time reference deprecation
Added commenting on set and get renderer methods
http://cvs.php.net/diff.php/pear/Structures_DataGrid/DataGrid/Renderer.php?r1=1.2&r2=1.3&ty=u
Index: pear/Structures_DataGrid/DataGrid/Renderer.php
diff -u pear/Structures_DataGrid/DataGrid/Renderer.php:1.2
pear/Structures_DataGrid/DataGrid/Renderer.php:1.3
--- pear/Structures_DataGrid/DataGrid/Renderer.php:1.2 Thu Mar 18 10:56:23 2004
+++ pear/Structures_DataGrid/DataGrid/Renderer.php Thu Mar 18 18:13:25 2004
@@ -16,7 +16,7 @@
// | Author: Andrew Nagy <asnagy@webitecture.org> |
// +----------------------------------------------------------------------+
//
-// $Id: Renderer.php,v 1.2 2004/03/18 15:56:23 asnagy Exp $
+// $Id: Renderer.php,v 1.3 2004/03/18 23:13:25 asnagy Exp $
require_once 'DataGrid/Core.php';
@@ -26,7 +26,7 @@
* This class handles mangeing the output for the DataGrid.
* By default, the output is handled by the HTML Table renderer.
*
- * @version $Revision: 1.2 $
+ * @version $Revision: 1.3 $
* @author Andrew S. Nagy <asnagy@webitecture.org>
* @access public
* @package Structures_DataGrid
@@ -48,7 +48,7 @@
function Structures_DataGrid_Renderer($renderer = DATAGRID_RENDER_TABLE)
{
if (PEAR::isError($this->setRenderer($renderer))) {
- $this->setRenderer(DATAGRID_RENDER_TABLE);
+ $this->setRenderer(DATAGRID_RENDER_TABLE);
}
}
@@ -67,14 +67,29 @@
$this->_setDefaultHeaders();
// Render out the data
- $this->renderer->render(&$this);
+ $this->renderer->render($this);
}
+ /**
+ * Get Renderer
+ *
+ * Retrieves the renderer object as a reference
+ *
+ * @access public
+ */
function &getRenderer()
{
return $this->renderer;
}
+ /**
+ * Set Renderer
+ *
+ * Defines which renderer to be used by the DataGrid
+ *
+ * @param string $renderer The defined renderer string
+ * @access public
+ */
function setRenderer($renderer)
{
$class = 'Structures_DataGrid_Renderer_' . $renderer;