/**
  * Create service
  *
  * @param ServiceLocatorInterface $serviceLocator
  * @return mixed
  */
 public function createService(ServiceLocatorInterface $serviceLocator)
 {
     $cfg = $serviceLocator->get('Configuration');
     $options = new CleengApiOptions($cfg['cleeng_api']);
     $api = new Cleeng_Api($options->toArray());
     return $api;
 }
Esempio n. 2
0
 public function testSetFromArrayThrowsInvalidArgumentException()
 {
     $this->setExpectedException('InvalidArgumentException');
     $options = new CleengApiOptions();
     $options->setFromArray('asd');
 }