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
Post a Comment