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

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

  

Pyrus Custom File Tasks: differences from PEAR

Overview

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="http://pear2.php.net/dtd/customtask-2.0" version="2.0">
 <name>mytask</name>
 <classprefix>vendor_PackageName</classprefix>
 <autoloadpath/>
</task>

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:

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

忘却曲線を使ってこの知識を確実に記憶に残す

フォーラムで「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. マニュアル: