cvs: pear /Config/Config Container.php
| From: | Bertrand Mansion | Date: | Tue, 18 Feb 2003 15:19:25 +0000 |
| Subject: | cvs: pear /Config/Config Container.php | ||
| Groups: | php.pear.cvs | ||
| Request: | Send a blank email to pear-cvs+get-8941@lists.php.net to get a copy of this message | ||
mansion Tue Feb 18 10:19:25 2003 EDT
Modified files:
/pear/Config/Config Container.php
Log:
raiseError message and comments.
Index: pear/Config/Config/Container.php
diff -u pear/Config/Config/Container.php:1.12 pear/Config/Config/Container.php:1.13
--- pear/Config/Config/Container.php:1.12 Sun Feb 9 13:48:20 2003
+++ pear/Config/Config/Container.php Tue Feb 18 10:19:24 2003
@@ -15,7 +15,7 @@
// | Author: Bertrand Mansion <bmansion@mamasam.com> |
// +---------------------------------------------------------------------+
//
-// $Id: Container.php,v 1.12 2003/02/09 18:48:20 mansion Exp $
+// $Id: Container.php,v 1.13 2003/02/18 15:19:24 mansion Exp $
require_once('Config.php');
@@ -106,7 +106,7 @@
$index = -1;
break;
default:
- return PEAR::raiseError('Use only top, bottom, before or after in
Config_Container::insertItem.', null, PEAR_ERROR_RETURN);
+ return PEAR::raiseError('Use only top, bottom, before or after in
Config_Container::createItem.', null, PEAR_ERROR_RETURN);
}
if (isset($index) && $index >= 0) {
array_splice($this->children, $index, 0, 'tmp');
@@ -128,7 +128,6 @@
*/
function addItem(&$item, $where = 'bottom', $target = null)
{
-
$index = sizeof($this->children);
if (is_object($item) && is_a($item, 'config_container')) {
$this->children[$index] =& $item;
@@ -144,7 +143,7 @@
* This is a helper method that calls createItem
*
* @param string content object content
- * @return object reference to new item
+ * @return object reference to new item or Pear_Error
*/
function &createComment($content = '', $where = 'bottom', $target =
null)
{
@@ -156,7 +155,7 @@
* Adds a blank line to this item.
* This is a helper method that calls createItem
*
- * @return object reference to new item
+ * @return object reference to new item or Pear_Error
*/
function &createBlank($where = 'bottom', $target = null)
{
@@ -170,7 +169,7 @@
*
* @param string name Name of new directive
* @param string content Content of new directive
- * @return object reference to new item
+ * @return object reference to new item or Pear_Error
*/
function &createDirective($name, $content, $where = 'bottom', $target = null)
{