Reputation: 43
How to change/override the core functionality of yii framework? for instance i need to apply encryption/decryption algorithm on core mysql generator in yii framework instead of encryption/decryption applied on php itself.
we know we can apply encryption technique on php itself, but on converting from old project to new one with same sql format with MYSQL ENC/DEC how to alter/add/change the yii default query builder instead of applying manual query format.
Thanks in advance
Upvotes: 0
Views: 66
Reputation: 43507
You can extend desired core class and than rewrite it's methods.
//example with CActiveRecord extend
class MyModel extends CActiveRecord()
{
public function delete($id)
{
$this->is_deleted = 1;
$this->update(array('is_deleted'));
}
}
class TableModel extends MyModel
{
}
Upvotes: 1