本文整理汇总了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;
}