当前位置: 首页>>代码示例>>PHP>>正文


PHP XoopsPersistableObjectHandler::get方法代码示例

本文整理汇总了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;
 }
开发者ID:trabisdementia,项目名称:publisher,代码行数:17,代码来源:category.php

示例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;
 }
开发者ID:RanLee,项目名称:Xoops_demo,代码行数:15,代码来源:item.php

示例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;
 }
开发者ID:RanLee,项目名称:XoopsCore,代码行数:14,代码来源:page_content.php

示例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;
 }
开发者ID:BackupTheBerlios,项目名称:haxoo-svn,代码行数:15,代码来源:profile.php

示例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;
 }
开发者ID:ggoffy,项目名称:wgteams,代码行数:13,代码来源:relations.php

示例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;
 }
开发者ID:geekwright,项目名称:XoopsCore25,代码行数:22,代码来源:profile.php

示例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;
 }
开发者ID:trabisdementia,项目名称:xuups,代码行数:18,代码来源:topic.php


注:本文中的XoopsPersistableObjectHandler::get方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。