Created
October 26, 2012 07:43
-
-
Save robertbasic/3957469 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| namespace HexCommon\View\Helper; | |
| use Zend\View\Helper\AbstractHelper; | |
| use Zend\ServiceManager\ServiceLocatorAwareInterface; | |
| use Zend\ServiceManager\ServiceLocatorInterface; | |
| /** | |
| * An abstract view helper, to be implemented by view helpers | |
| * that need to be ServiceLocatorAware | |
| */ | |
| abstract class ServiceLocatorAwareHelper extends AbstractHelper implements ServiceLocatorAwareInterface | |
| { | |
| /** | |
| * Set the service locator. | |
| * | |
| * @param ServiceLocatorInterface $serviceLocator | |
| * @return AbstractHelper | |
| */ | |
| public function setServiceLocator(ServiceLocatorInterface $serviceLocator) | |
| { | |
| $this->serviceLocator = $serviceLocator; | |
| return $this; | |
| } | |
| /** | |
| * Get the service locator. | |
| * | |
| * @return \Zend\ServiceManager\ServiceLocatorInterface | |
| */ | |
| public function getServiceLocator() | |
| { | |
| return $this->serviceLocator; | |
| } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment