I would like to implement my own database dialect in Phalcon PHP. I would like to extend and override few functions that are already reserved for PDO. This is what I'm trying to do:
class DB extends \Phalcon\Db\Adapter\Pdo\Mysql{
function _construct($connection_variables=array())
{
parent::_construct($connection_variables);
}
function update($table="",$variables="")
{
parent::execute($query);
}
}
So, when I try to to call in the model:
$this->db->update('test',array('id'=>'1'));
It gives me an error stating that:
Fatal error: Declaration of Libraries\DB::update() must be compatible with Phalcon\Db\AdapterInterface::update($table, $fields, $values, $whereCondition = NULL, $dataTypes = NULL) in .....
How can I override update and insert functions? Thanks