Minahito
minah****@users*****
2006年 11月 17日 (金) 19:38:55 JST
Index: xoops2jp/html/core/XCube_Property.class.php diff -u xoops2jp/html/core/XCube_Property.class.php:1.1.2.4 xoops2jp/html/core/XCube_Property.class.php:1.1.2.5 --- xoops2jp/html/core/XCube_Property.class.php:1.1.2.4 Sat Oct 7 18:26:15 2006 +++ xoops2jp/html/core/XCube_Property.class.php Fri Nov 17 19:38:55 2006 @@ -1,7 +1,7 @@ <?php /** * @package XCube - * @version $Id: XCube_Property.class.php,v 1.1.2.4 2006/10/07 09:26:15 minahito Exp $ + * @version $Id: XCube_Property.class.php,v 1.1.2.5 2006/11/17 10:38:55 minahito Exp $ */ if (!defined('XOOPS_ROOT_PATH')) exit(); @@ -187,6 +187,19 @@ function set($arg1, $arg2 = null) { if (is_array($arg1) && $arg2 == null) { + $this->reset(); + foreach ($arg1 as $t_key => $t_value) { + $this->_set($t_key, $t_value); + } + } + elseif ($arg1 !== null && $arg2 !== null) { + $this->_set($arg1, $arg2); + } + } + + function add($arg1, $arg2 = null) + { + if (is_array($arg1) && $arg2 == null) { foreach ($arg1 as $t_key => $t_value) { $this->_set($t_key, $t_value); } @@ -225,6 +238,12 @@ return isset($this->mProperties[$index]) ? $this->mProperties[$index]->get() : null; } + function reset() + { + unset($this->mProperties); + $this->mProperties = array(); + } + function isArray() { return true;