For Programmers: Free Programming Magazines  


Home > Archive > PHP Pear > January 2005 > Structures_DataGrid_Renderer - doesnt' allow custom renderers outside of PEAR directo









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author Structures_DataGrid_Renderer - doesnt' allow custom renderers outside of PEAR directo
Ian P. Christian

2005-01-28, 3:59 pm

The following member function of Structures_DataGrid_Renderer resticts you
from generating your own Renderer class and using it.


function setRenderer($renderer)
{
$class = 'Structures_DataGrid_Renderer_' . $renderer;
$file = 'Structures/DataGrid/Renderer/' . $renderer . '.php';
if (@include_once($file)) {
$this->renderer = new $class($this);
} else {
return new PEAR_Error('Invalid renderer');
}

return true;
}


Perhaps I'm missing something, but it should be possible to write your own
renderer and apply it to a datagrid?

I'm trying to make it so that the first line in the table is a form used to
filter, and without putting my render file in the PEAR directory (or setting
the include path and creating a matching structure) I cannot do so.

ideas?

Kind Regards,

--
Ian P. Christian
http://pookey.co.uk
Sponsored Links







Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive

Copyright 2008 codecomments.com