當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。