/** * 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; }
/** * 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; }
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; }
/** * 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; }
/** * 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; }
/** * 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; }
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; }