Config_Container::createComment()
Config_Container::createComment() -- アイテムにコメントを追加する
概要
require_once 'Config/Container.php'; |
objectConfig_Container::createComment ([string $content = '' [, string $where = 'bottom' [, object $target = NULL]]])
説明
現在のアイテムが"section"でなければいけません。
この関数は、
createItem()
をヘルパー関数として呼びます。
パラメータ
- string
$content
コメントの内容
- string
$where
新しいアイテムを生成する位置。('top',
'bottom',
'before', 'after')
- object
$target
$whereで、
'before'か
'after'を指定した場合のみ必要。
返り値
object -
新しいアイテムのリファレンスを返します。
注意
この関数は、スタティックにコールする
ことはできません。
例
例 31-1createComment()
を使用して新しいディレクティブを作成する
<?php
$section =& new Config_Container('section', 'conf');
$section->createComment('Database Configuration');
?>
|
|