Skip to content

Instantly share code, notes, and snippets.

@alexshelkov
Created October 29, 2012 16:00
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save alexshelkov/3974392 to your computer and use it in GitHub Desktop.
Save alexshelkov/3974392 to your computer and use it in GitHub Desktop.
'view_helpers' => array(
'factories' => array(
'SimpleHelper' => function(\Zend\View\HelperPluginManager $vh) {
$config = $vh->getServiceLocator()->get('Config');
$simpleHelper = new \SimpleHelper();
if ( isset($config['simple_helper']) ) {
$simpleHelper->setConfig(($config['simple_helper']));
}
return $simpleHelper;
}
)
),
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment