[Solar-talk] Partials/Tiles/Elements/Components/Something
Paul M Jones
pmjones at ciaweb.net
Sun Nov 5 08:40:51 PST 2006
On Nov 5, 2006, at 10:12 AM, Rodrigo Moraes wrote:
> On 11/5/06, Andreas Ravnestad wrote:
>> Excellent, this is pretty much exactly what I want :) What I did
>> further
>> was to add your hack to the class Solar_View:
> [...]
>> Pretty and perfect! Any chance something like this could
>> officially be
>> added to Solar?
>
> I've hacked your hack:
>
> class Vendor_View_Helper_Component extends Solar_View_Helper {
>
> public function component($action)
> {
> $front = Solar::factory('Solar_Controller_Front');
> return $front->fetch($action);
> }
> }
>
> :-)
Rodrigo, this is exactly what I was going to suggest. Well done.
Having said that, I'm not a fan of the component idea; as others in
this thread have noted, even the Rails guys have determined that
components are not that great. But if it does what you want, then it
does what you want. :-)
--
Paul M. Jones <http://paul-m-jones.com>
Solar: Simple Object Library and Application Repository
for PHP5. <http://solarphp.com>
Join the Solar community wiki! <http://solarphp.org>
Savant: The simple, elegant, and powerful solution for
templates in PHP. <http://phpsavant.com>
More information about the solar-talk
mailing list