public function getCollection() { if ($this->collection) { return $this->collection; } $c = new Dase_DBO_Collection($this->db); $c->load($this->collection_id); $this->collection = $c; return $c; }
public function getCollection() { //avoids another db lookup if ($this->_collection) { return $this->_collection; } $db = $this->db; $c = new Dase_DBO_Collection($db); $c->load($this->collection_id); if ($c) { $this->_collection = $c; return $c; } else { return false; } }
function getCollection() { $coll = new Dase_DBO_Collection($this->db); $coll->load($this->getItem()->collection_id); return $coll; }
public function getCollection() { //avoids another db lookup if ($this->collection) { return $this->collection; } $c = new Dase_DBO_Collection($this->db); $c->load($this->collection_id); $this->collection = $c; return $c; }