Zend_Layout オプションで helperClass を使用しようとしています。クラスを作成します:
class Helper_Testi extends Zend_Controller_Action_Helper_Abstract{
public function init(){
echo "111111111";
$this->fff = 'hello from Helper';
}
public function getMessage(){
echo "==============";
return "message";
}
}
そして Bootstrap.php で Zend_Layout に追加してみてください:
$options = array('layout' => 'layout','helperClass'=>'../application/controllers/helper/Testi');
$layout = new Zend_Layout();
$layout->startMvc($options);
しかし、ブラウザをリロードすると、例外が表示されます:
Fatal error: Uncaught exception 'Zend_Exception' with message 'File "../application/controllers/helper/Testi.php" does not exist or class "../application/controllers/helper/Testi" was not found in the file'
私は何を間違っていますか?お願い助けて。