<?php
class ParserHelper extends AppHelper
{
function blah($text)
{
return $text;
}
}
?>
i put this code in app/view/helpers/parser.php
from my view, i do echo $parser->blah('test');
and also the var $helpers=array('Parser');
But this is returning
*Notice* (8) <javascript:void(0);>: Undefined variable: parser
[*APP/controllers/---.php*, line *276*]
Code <javascript:void(0);> | Context <javascript:void(0);>
$region1 = "Mobile, AL"
$region2 = null
{ //$usa_states =
array('al'=>'alabama','ak'=>'alaska'); echo
$parser->format_name('asfddDDD');
LocationsController::index() -
APP/controllers/locations_controller.php, line 276
Dispatcher::_invoke() - CORE/cake/dispatcher.php, line 268
Dispatcher::dispatch() - CORE/cake/dispatcher.php, line 240
[main] - APP/webroot/index.php, line 84
*Fatal error*: Call to a member function blah() on a non-object in*
---.php*on line
*276*
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Cake
PHP" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/cake-php?hl=en
-~----------~----~----~----~------~----~------~--~---