예제 #1
0
파일: Apc.php 프로젝트: kyleterry/BikesFW
 /**
  * 
  * @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;
 }
예제 #2
0
파일: App.php 프로젝트: kyleterry/BikesFW
 /**
  * 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;
 }
예제 #3
0
 /**
  * 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;
 }