<usesrole> (Previous) (Next) <phprelease>、<extbinrelease>、<extsrcrelease>、<bundle>

View this page in Last updated: Sun, 20 Jul 2008
English | Dutch | French | German | Hungarian | Japanese | Polish | Russian | Spanish | Plain HTML

<usestask>

<usestask> -- <contents> で使用する独自のタスクを記述する

独自のファイルタスクを記述する

PEAR がデフォルトで提供する標準のファイルタスクは この場所 に記述されています。

サードパーティが提供するタスクをパッケージで使用したい場合は、 <file> タグの中に以下のようにそのタスクを指定するだけです。

<file role="php">
 <tasks:foo/>
</file>

しかし、独自のタスク "foo" を提供するパッケージを ユーザがインストールしていない場合は、インストール時に "unknown task 'foo'" というエラーが出てしまいます。 これはあまり親切とはいえません。

<usestask> タグを使用すると、インストーラはその代わりに "this package uses the custom task 'foo', install package pear.example.com/Foo to use" というメッセージを表示するようになります。

<usestask>
 <task>foo</task>
 <package>Foo</package>
 <channel>pear.example.com</channel>
</usestask>

静的 URI のパッケージ (チャネルを使用しないパッケージ) も サポートされていることに注意しましょう。

<usestask>
 <task>foo</task>
 <uri>http://pear.example.com/Foo-1.2.0</uri>
</usesrole>

<usesrole> (Previous) (Next) <phprelease>、<extbinrelease>、<extsrcrelease>、<bundle>

Download Documentation Last updated: Sun, 20 Jul 2008
Do you think that something on this page is wrong? Please file a bug report or add a note.
User Notes:
There are no user contributed notes for this page.