コード例 #1
0
ファイル: query.php プロジェクト: mvonballmo/earthli-webcore
 /**
  * Return the requested object; might be cached.
  * @param integer $id
  * @return UNIQUE_OBJECT
  */
 public function object_at_id($id)
 {
     $this->assert(!empty($id), 'ID cannot be empty (in ' . strtoupper(get_class($this->query)) . ')', 'object_at_id', 'QUERY_BASED_CACHE');
     if (isset($this->_cache[$id])) {
         return $this->_cache[$id];
     }
     $Result = $this->query->object_at_id($id);
     $this->add_object($Result);
     return $Result;
 }