/** * * 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); } }