PHPマニュアル/PEARマニュアル | ユーザフォーラムで議論/質問 | マニュアル検索 | ハイライト | ハイライトオフ | ポータル | php spot

Telling Pyrus how to load your plugin: <class> and <autoloadpath> | JavaScript入門&応用&リファレンスなら「JavaScriptist」


Telling Pyrus how to load your plugin: <class> and <autoloadpath>

Pyrus relies upon PHP5's autoloading capabilities to automatically load a plugin class. All plugins should include the <autoloadpath> element to specify a path relative to the php_dir location for the plugin registry. For plugin classes that conform to PEAR2 standards, the autoloadpath should be an empty string:


The pyrus autoloader will automatically replace _ and the namespace separator \ with DIRECTORY_SEPARATOR and append .php to determine the class name to load. To instruct Pyrus to prepend a particular relative path, put this path in the <autoloadpath> element. As an example, the following XML will prompt Pyrus to load the file /home/user/.pear/MyPackage/customcommands/Command/Line/Obj.php if the user's plugins_dir is /home/user/.pear:


The <class> element is used by Pyrus to determine which object to instantiate. If <class> is:


Pyrus will instantiate an object of class FooBar_Willy\Dilly.


フォーラムで「Telling Pyrus how to load your plugin: <class> and <autoloadpath>」について話す
各種マニュアル: PHPマニュアル | PEARマニュアル | Smarty(英語)マニュアル | PHP-GTKマニュアル | Telling Pyrus how to load your plugin: <class> and <autoloadpath>」をGoogle検索
copyright © 1997-2024 PHP ドキュメント作成グループ(ライセンス). provided by php spot. マニュアル: