[Solar-talk] helper_path
Jeff Surgeson
solar at 3hex.com
Fri May 26 08:07:37 PDT 2006
> So for your Bulldog app-specific helpers, you would use ...
>
> $config['Bulldog_App_Thebooknook']['helper_class'] =
> 'Vendor_View_Helper';
>
> ... if you have helpers in Vendor/View/Helper/* that you want to use.
> > Fatal error: Uncaught exception 'Solar_Exception' class::code
> > 'Solar_Class_Stack::ERR_CLASS_NOT_FOUND' with message
> > 'ERR_CLASS_NOT_FOUND'
> > information array ( 'name' => 'Meta', 'stack' => array ( 0 =>
> > 'Bulldog_App_Thebooknook_Helper_', 1 => 'Meta_', 2 =>
> > 'Solar_View_Helper_', ), )
>
> From this, it looks like you did something like the following ...
> $config['Bulldog_App_Thebooknook']['helper_class'] = 'Meta';
That's the strange thing I did not, my first config setting was:
$config['Bulldog_App_Thebooknook']['helper_class'] = 'Bulldog_App_Helper';
and then
$config['Bulldog_App_Thebooknook']['helper_class'] = 'Bulldog_View_Helper';
So Solar is adding the Meta_ item to the stack array not my code.
Well I have set the $config correctly as you have indicated and made sure that
Bulldog_View_Helper dir exists as well as the Meta.php helper file
But still no change to the solar stack array, when Solar looks for the
Meta.php helper file which used to be in Solar_View_Helper and is now in
Bulldog_View_Helper it errors out with same error
Fatal error: Uncaught exception 'Solar_Exception' class::code
'Solar_Class_Stack::ERR_CLASS_NOT_FOUND' with message 'ERR_CLASS_NOT_FOUND'
information array ( 'name' => 'Meta', 'stack' => array ( 0 =>
'Bulldog_App_Thebooknook_Helper_', 1 => 'Meta_', 2 =>
'Solar_View_Helper_', ), ) Stack trace:
#0 /var/www/localhost/htdocs/_lib/Solar/Base.php(267):
Solar::factory('Solar_Exception', Array)
#1 /var/www/localhost/htdocs/_lib/Solar/Class/Stack.php(202):
Solar_Base->_exception('ERR_CLASS_NOT_F...', Array)
#2 /var/www/localhost/htdocs/_lib/Solar/View.php(325):
Solar_Class_Stack->load('Meta')
#3 /var/www/localhost/htdocs/_lib/Solar/View.php(305):
Solar_View->newHelper('Meta')
#4 /var/www/localhost/htdocs/_lib/Solar/View.php(238):
Solar_View->getHelper('Meta') #5 [internal function]:
Solar_View->__call('Meta', Array)
#6 /var/www/localhost/htdocs/_lib/Bulldog/App/Layouts/head.part.php(26):
Solar_View->Meta(Array)
#7 /var/www/localhost/htdocs/_lib/Bulldog/App/Layouts/threeCol.layout.php(19):
in in /var/www/localhost/htdocs/_lib/Solar.php on line 460
The relevant section of my config and my Meta.php helper file is:
// set vendor helper path
$config['Bulldog_App_Thebooknook']['helper_class'] = 'Bulldog_View_Helper';
class Bulldog_View_Helper_Meta extends Solar_View_Helper {
public function Meta($attribs)
{
settype($attribs, 'array');
return '<meta' . $this->_view->attribs($attribs) . ' />';
}
}
Unless Meta.php is in Solar_View_Helper or in Bulldog_App_Thebooknook_Helper
it errors out, the $config setting as you suggest does not appear to add
anything new to the stack except with Solar not finding the Meta.php helper
file it adds the Meta_ item to the stack.
Anything else I can try to establish the problem? or should I just stick it
back in Solar_View_Helper and avoid irratating you me and the rest of the
world :-)
--
Jeff Surgeson
More information about the solar-talk
mailing list