/**
  * Create the timezone-service
  *
  * @param \Zend\ServiceManager\ServiceLocatorInterface $serviceLocator
  * @return \Zork\I18n\Locale\Locale
  */
 public function createService(ServiceLocatorInterface $serviceLocator)
 {
     // Configure the locale
     $config = $serviceLocator->get('Configuration');
     $srvConfig = isset($config['timezone']) ? $config['timezone'] : array();
     return Timezone::factory($srvConfig);
 }
Exemple #2
0
 /**
  * Test factory method called with non-traversable
  *
  * @expectedException   InvalidArgumentException
  */
 public function testFactoryMethodNonTraversable()
 {
     Timezone::factory(0);
 }