Example #1
0
 public function merge($data)
 {
     foreach ($data as $key => $value) {
         $this->_data->{$key} = Cana_Model::toModel($value);
     }
     return $this;
 }
Example #2
0
 public function __construct($args = [])
 {
     if (!$args) {
         throw new Exception('Invalid DB config.');
     }
     if (is_array($args)) {
         $args = Cana_Model::toModel($args);
     }
     $this->db($this->connect($args));
     $this->_args = $args;
 }
Example #3
0
 public static function c($list)
 {
     $list = Cana_Model::l2a($list, ',');
     return self::o($list);
 }