Exemplo n.º 1
0
 /**
  * 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);
 }
Exemplo n.º 2
0
 /**
  * Test factory method called with non-traversable
  *
  * @expectedException   InvalidArgumentException
  */
 public function testFactoryMethodNonTraversable()
 {
     Timezone::factory(0);
 }