Question

I have written init() function in my db model class and i am using multi db zend functionality.

in my init() i am fetching my db adapters and then my default adapter gets set as a default adapter and everything works fine.

More than that i am doing some table name prefix append related stuffs in parent class's init() functions. and that too works fine.

Now what my problem is when i am writing a parameterized constructor in my model class then neither my child class's init() function is not getting called nor parent class's magic method gets called.

Can any body help me out with this?

Following is my code:

http://pastie.org/private/ndmuek6pypaijucfzlolg

Was it helpful?

Solution

You have to change your code to call the Constructor of Zend_Db_Table_Abstract:

    public function __construct(array $options = null)
    {
        if (is_array($options)) {
           $this->setOptions($options);
        }
        parent::__construct($options);
    }
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top