Jatin Dhoot
Jatin Dhoot

Reputation: 4364

How to write a customized database adapter in Zend Framework e.g. Mysqli_Customized?

I want to create a customized adapater like Mysqli because I want to add some functions in it.

How can I do it?

Tell me the best possible way to achieve.

The prime reason why I want to create a customized adapter is this

Many thanks iun advance.

Upvotes: 0

Views: 587

Answers (1)

Phil
Phil

Reputation: 165059

Easiest way I can think of would be to extend Zend_Db_Adapter_Mysqli

class My_Db_Adapter_Mysqli extends Zend_Db_Adapter_Mysqli
{
    // customisations
}

$db = Zend_Db::factory('My_Db_Adapter_Mysqli', $config);

Upvotes: 1

Related Questions