本文整理匯總了PHP中XoopsPersistableObjectHandler::get方法的典型用法代碼示例。如果您正苦於以下問題:PHP XoopsPersistableObjectHandler::get方法的具體用法?PHP XoopsPersistableObjectHandler::get怎麽用?PHP XoopsPersistableObjectHandler::get使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類XoopsPersistableObjectHandler
的用法示例。
在下文中一共展示了XoopsPersistableObjectHandler::get方法的7個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1:
/**
* retrieve an item
*
* @param int $id itemid of the user
*
* @return mixed reference to the {@link PublisherCategory} object, FALSE if failed
*/
public function &get($id)
{
static $cats;
if (isset($cats[$id])) {
return $cats[$id];
}
$obj =& parent::get($id);
$cats[$id] =& $obj;
return $obj;
}
示例2:
/**
* retrieve an item
*
* @param int $id itemid of the user
*
* @return mixed reference to the {@link PublisherItem} object, FALSE if failed
*/
public function &get($id)
{
$obj = parent::get($id);
if (is_object($obj)) {
$obj->assignOtherProperties();
}
return $obj;
}
示例3: getClone
public function getClone($content_id)
{
$values = parent::get($content_id)->toArray();
$values['content_id'] = 0;
$values['content_title'] = PageLocale::CONTENT_COPY . $values['content_title'];
$values['content_weight'] = 0;
$values['content_hits'] = 0;
$values['content_votes'] = 0;
$values['content_rating'] = 0;
$values['content_create'] = time();
$obj = parent::create();
$obj->setVars($values);
return $obj;
}
示例4:
/**
* Get a {@link ProfileProfile}
*
* @param boolean $createOnFailure create a new {@link ProfileProfile} if none is feteched
*
* @return object {@link ProfileProfile}
*/
function &get($uid, $createOnFailure = true)
{
$obj = parent::get($uid);
if (!is_object($obj) && $createOnFailure) {
$obj = $this->create();
}
return $obj;
}
示例5: get
/**
* retrieve a field
*
* @param int $i field id
* @param null $fields
* @return mixed reference to the <a href='psi_element://TDMCreateFields'>TDMCreateFields</a> object
* object
*/
public function get($i = null, $fields = null)
{
$temp = parent::get($i, $fields);
return $temp;
}
示例6: get
/**
* Get a ProfileProfile object for a user id.
*
* We will create an empty profile if none exists. This behavior allows user objects
* created outside of profile to be edited correctly in the profile module.
*
* @param integer|null $uid
* @param string[]|null $fields array of field names to fetch, null for all
*
* @return object {@link ProfileProfile}
*
* @internal This was get($uid, $createOnFailure = true). No callers found using the extra parameter.
* @internal Modified to match parent signature.
*/
public function get($uid = null, $fields = null)
{
$obj = parent::get($uid, $fields);
if (!is_object($obj)) {
$obj = $this->create();
}
return $obj;
}
示例7: array
function &get($id, $var = null)
{
$ret = null;
if (!empty($var) && is_string($var)) {
$tags = array($var);
} else {
$tags = $var;
}
if (!($topic_obj = parent::get($id, $tags))) {
return $ret;
}
if (!empty($var) && is_string($var)) {
$ret = @$topic_obj->getVar($var);
} else {
$ret =& $topic_obj;
}
return $ret;
}