function &create($isNew = true) { $obj =& parent::create($isNew); if ($isNew) { // override default values $obj->set('name', ''); $obj->set('url', ''); $obj->set('user_avatar', 'blank.gif'); $obj->set('user_icq', ''); $obj->set('user_from', ''); $obj->set('user_sig', ''); $obj->set('actkey', ''); $obj->set('user_aim', ''); $obj->set('user_yim', ''); $obj->set('user_msnm', ''); $obj->set('pass', ''); $obj->set('posts', 0); $obj->set('level', 1); $obj->set('theme', ''); $obj->set('umode', ''); $obj->set('uorder', 0); $obj->set('user_occ', ''); $obj->set('bio', ''); $obj->set('user_mailok', 0); } return $obj; }
/** * create a new object * * @access public * @param bool isNew mark the new object as 'new'? * @return object XooNIpsOrmUsers reference to the new object */ function &create($isNew = true) { $obj = parent::create($isNew); if ($obj === false) { return $obj; } if ($isNew) { // set default private index/item/storage limit $xconfig_handler =& xoonips_getormhandler('xoonips', 'config'); $keys = array('private_index_number_limit' => 'private_index_number_limit', 'private_item_number_limit' => 'private_item_number_limit', 'private_item_storage_limit' => 'private_item_storage_limit'); foreach ($keys as $key => $field) { $value = $xconfig_handler->getValue($key); $obj->set($field, $value); unset($xcobj); } } return $obj; }
/** * create a new object * * @access public * @param bool isNew mark the new object as 'new'? * @return object XooNIpsOrmEventLog reference to the new object */ function &create($isNew = true) { $obj = parent::create($isNew); if ($obj === false) { return $obj; } if ($isNew) { $obj->set('remote_host', $this->getRemoteHost()); $obj->set('timestamp', time()); } return $obj; }
/** * create object * * @access public * @param bool $isNew true if create new object * @return object */ function &create($isNew = true) { $obj =& parent::create($isNew); if ($isNew) { $xconfig_handler =& xoonips_getormhandler('xoonips', 'config'); $obj->set('group_item_number_limit', $xconfig_handler->getValue('group_item_number_limit')); $obj->set('group_index_number_limit', $xconfig_handler->getValue('group_index_number_limit')); $obj->set('group_item_storage_limit', $xconfig_handler->getValue('group_item_storage_limit')); } return $obj; }