Skip to content

Instantly share code, notes, and snippets.

@jonathanmaron
Created July 10, 2012 06:02
Show Gist options
  • Save jonathanmaron/3081455 to your computer and use it in GitHub Desktop.
Save jonathanmaron/3081455 to your computer and use it in GitHub Desktop.
// this works
'service_manager' => array(
'factories' => array(
'navigation' => function() {
$navigation = new \Application\Navigation\Navigation(
include __DIR__ . '/../navigation/navigation.php');
return $navigation;
}
),
),
// this seems not to work
'view_helpers' => array(
'factories' => array(
'navigation' => function($sm) {
return new \Zend\View\Helper\Navigation($sm->get('navigation'));
}
),
),
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment