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');
?>