previousConfig_Container::createComment (Previous) (Next) Config_Container::createItemnext

View this page in Last updated: Sun, 21 Jun 2009
English | Brazilian Portuguese | Chinese | Dutch | French | German | Hungarian | Japanese | Polish | Russian | Spanish | Turkish

Config_Container::createDirective

Config_Container::createDirective() – ディレクティブをアイテムに追加する

Synopsis

require_once 'Config/Container.php';

object Config_Container::createDirective ( string $name , string $content , mixed $attributes = = null , string $where = 'bottom' , mixed $target = = null )

Description

現在のアイテムが"section"でなければなりません。 この関数は createItem() をヘルパー関数として呼びます。

Parameter

string $name

新しいディレクティブの名前。

string $content

新規ディレクティブの内容

mixed $attributes

ディレクティブ属性。

string $where

新しいアイテムを生成する位置。('top' , 'bottom' , 'before' , 'after' )

object $target

$where で、 'before''after' を指定した場合のみ必要。

Return value

object - 新しいアイテムのリファレンスを返します。

Throws

Possible PEAR_Error values
エラーコード エラー値 意味 解決策
  "    

Note

This function can not be called statically.

Example

createDirective() を使用して新しくディレクティブを作成する

<?php
$section 
=& new Config_Container('section''conf');
$section->createDirective('user''mansion');
?>
previousConfig_Container::createComment (Previous) (Next) Config_Container::createItemnext

Download Documentation Last updated: Sun, 21 Jun 2009
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.