Exemple #1
0
 public function __construct()
 {
     if (!$this->tableName) {
         $this->tableName = strtolower(str_replace(array(\Kalibri::app()->getNamespace() . '\\App\\Model\\', 'Kalibri\\Model\\'), '', get_class($this)));
     }
     $this->keyField = $this->keyField ?: $this->tableName . '_id';
     $this->_cache = \Kalibri::cache();
     // Register model
     \Kalibri::model($this->tableName, $this);
 }