예제 #1
0
파일: model.php 프로젝트: nephie/Moya
 /**
  * 
  * Constructor. This will figure out which datastore the model uses (from config or default).
  *
  */
 public function __construct()
 {
     $datastore = config::get($this, 'datastore');
     if ($datastore != '') {
         $this->datastore = $datastore;
     }
     $map = config::get($this, 'mapDbToObject');
     if (is_array($map)) {
         $this->mapDbToObject = $map;
     }
     if ($this->table == '') {
         $this->table = inflector::getSpecificfromcontext($this);
     }
 }