Ejemplo n.º 1
0
 /**
  * Model constructor.
  *
  * @param array $attributesValues
  */
 public function __construct(array $attributesValues = [])
 {
     $this->db = DB::getInstance()->getConnection();
     $this->db->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);
     if (!empty($attributesValues)) {
         $this->setAttributesValues($attributesValues);
     }
 }