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

Pyrus Custom File Tasks: differences from PEAR | JavaScript入門&応用&リファレンスなら「JavaScriptist」


Pyrus Custom File Tasks: differences from PEAR


Custom file tasks (documented here) have changed substantially in Pyrus. Fortunately, the XML format of tasks used in package.xml remains the same, and Pyrus's expectation of custom task implementation does not conflict or overlap with PEAR's at all, so custom task packages can easily be designed to work with both PEAR and Pyrus.

The biggest difference between how a custom task is implemented in Pyrus has to do with the new plugin system (documented here). Before reading any further, it may be a good idea to familiarize yourself with the way that plugins work in Pyrus by reading the documentation on plugins, then return back to finish reading about custom tasks.

In PEAR, custom tasks are detected simply by scanning the PEAR/Tasks directory, and no differentiation is made between tasks built into PEAR, and external custom tasks.

Pyrus custom tasks are detected through the use a new XML metadata format. The format is simple, and looks like this:

<?xml version="1.0" encoding="UTF-8"?>
<task xmlns="" version="2.0">

The details of what <classprefix> and <autoloadpath> mean are revealed in the full documentation of custom tasks here.

This XML metadata file is identified by Pyrus through the use of the file role customtask, which is used in the custom task's package.xml. Here is an example from the <contents> of a package.xml:

   <dir name="data">
    <file name="mytask.xml" role="customtask"/>
    <file name="someotherdata.csv" role="data"/>


フォーラムで「Pyrus Custom File Tasks: differences from PEAR」について話す
各種マニュアル: PHPマニュアル | PEARマニュアル | Smarty(英語)マニュアル | PHP-GTKマニュアル | Pyrus Custom File Tasks: differences from PEAR」をGoogle検索
copyright © 1997-2024 PHP ドキュメント作成グループ(ライセンス). provided by php spot. マニュアル: