ライブラリ/共通フォルダーに独自のクラス ファイルのコレクションを作成しようとしています。
/library/common/*class files go in here*
フォルダー内には、利用可能にしたいさまざまなクラスファイルがあります
そのような
DecoratorSimple.php
コードの例を以下に示しますか?
class Common_Decorator_SimpleInput extends Zend_Form_Decorator_Abstract
{
// code goes in here
}
私が持っている質問は、Common_のプレフィックスを持つ共通フォルダーに何かを自動的にロードするようにzendアプリケーションを取得する方法です
以下をブートストラップに追加しようとしましたが、うまくいきませんでした
protected function _initTestAutoLoader(){
$autoloader = Zend_Loader_Autoloader::getInstance();
$autoloader->registerNamespace('Common_');
// try and load the class
$testVar = new Common_Decorator_SimpleInput();
var_dump($test);
}