Minahito
minah****@users*****
2006年 10月 10日 (火) 15:13:00 JST
Index: xoops2jp/html/modules/base/kernel/Legacy_Module.class.php diff -u xoops2jp/html/modules/base/kernel/Legacy_Module.class.php:1.1.2.2 xoops2jp/html/modules/base/kernel/Legacy_Module.class.php:1.1.2.3 --- xoops2jp/html/modules/base/kernel/Legacy_Module.class.php:1.1.2.2 Sat Oct 7 18:52:22 2006 +++ xoops2jp/html/modules/base/kernel/Legacy_Module.class.php Tue Oct 10 15:13:00 2006 @@ -1,12 +1,18 @@ <?php /** * @package Legacy - * @version $Id: Legacy_Module.class.php,v 1.1.2.2 2006/10/07 09:52:22 minahito Exp $ + * @version $Id: Legacy_Module.class.php,v 1.1.2.3 2006/10/10 06:13:00 minahito Exp $ */ class Legacy_Module { /** + * Hash used free for this module. + * @var Array + */ + var $mAttributes = array(); + + /** * @access public * @var XoopsModule */ @@ -22,6 +28,46 @@ var $mRender = null; + function Legacy_Module() + { + } + + /** + * Sets $value with $key to attributes. Use direct access to $mAttributes + * if references are must, because PHP4 can't handle reference in the + * signature of this member function. + * + * @param string $key + * @param mixed $value + */ + function setAttribute($key, $value) + { + $this->mAttributes[$key] = $value; + } + + /** + * Gets a value indicating whether the value specified by $key exists. + * + * @param string $key + * @return mixed + */ + function hasAttribute($key) + { + return isset($this->mAttributes[$key]); + } + + /** + * Gets a value of attributes with $key. If the value specified by $key + * doesn't exist in attributes, gets null. + * + * @param string $key + * @return mixed + */ + function getAttribute($key) + { + return isset($this->mAttributes[$key]) ? $this->mAttributes[$key] : null; + } + function &getCacheInfo() { if (!is_object($this->mCacheInfo)) {