/** * * @static * @access public * @return unknown_type */ public static function getInstance() { if (!self::$instance instanceof self) { self::$instance = new self(bikes_App::getInstance()); } return self::$instance; }
/** * Returns the core Acl object. * * @access public * @return void */ public function getAcl() { if (!$this->acl instanceof bikes_Acl) { $this->acl = new bikes_Acl(bikes_App::getInstance()); } return $this->acl; }
/** * Fetches database results into a model-collection object. * * @param PDOStatement $pdo * @access public * @return bikes_Collection_Abstract */ public function fetchIntoCollection(PDOStatement $pdo) { $vo = PROJECT . '_VO_' . ucwords($this->name); $collection = PROJECT . '_Collection_' . ucwords($this->name); $collection = new $collection(bikes_App::getInstance()); $pdo->setFetchMode(PDO::FETCH_CLASS, $vo); while ($v = $pdo->fetch()) { $collection->addVo($v->id, $v); } $this->collection = $collection; return $this->collection; }