zend framework2 - Factory not getting constructed service manager class -


here service configuration:

    public function getserviceconfig()     {         return array(             'factories' => array(                 'squiddle\designpackage' => function($sm){                                       $designpkg = new designpackage($sm);                     return $designpkg;                 }             )            );     } 

it's being used within function gets triggered on dispatch event.

here it's usage:

$e->getapplication()->getservicemanager()->get('squiddle\designpackage'); 

my error designpackage being constructed null instead of service manager.

not sure whats wrong here;

it problem in designpackage constructor


Comments

Popular posts from this blog

Load Balancing in Bluemix using custom domain and DNS SRV records -

oracle - pls-00402 alias required in select list of cursor to avoid duplicate column names -

python - Consider setting $PYTHONHOME to <prefix>[:<exec_prefix>] error -