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

javascript - How to get current YouTube IDs via iMacros? -

c# - Maintaining a program folder in program files out of date? -

emulation - Android map show my location didn't work -