示例#1
0
 /**
  * Prueft, ob die Pflichtfelder in der Config gesetzt sind
  *
  * @param array $config
  */
 protected function checkRequiredOptions(array $config = array())
 {
     parent::checkRequiredOptions($config);
     // Application mit der der Screenshot erstellt wird muss angegeben sein
     if (array_key_exists(self::CONFIG_SELECTION, $config)) {
         $igwConfig = $config[self::CONFIG_SELECTION];
         if (!\array_key_exists(self::CONFIG_OPTION_APPLICATION, $igwConfig)) {
             throw new Screenshot\InvalidConfigException('Configuration must have a key for "' . self::CONFIG_OPTION_APPLICATION . '" that defined the application to shoot the screenshot');
         }
         $this->application = $igwConfig[self::CONFIG_OPTION_APPLICATION];
     }
 }
示例#2
0
 /**
  * Prueft, ob die Pflichtfelder in der Config gesetzt sind
  *
  * @param array $config
  */
 protected function checkRequiredOptions(array $config = array())
 {
     parent::checkRequiredOptions($config);
     // Application mit der der Screenshot erstellt wird muss angegeben sein
     if (array_key_exists(self::CONFIG_SELECTION, $config)) {
         $scwConfig = $config[self::CONFIG_SELECTION];
         // Kommando muss gesetzt werden
         if (!\array_key_exists(self::CONFIG_OPTION_COMMAND, $scwConfig)) {
             throw new Screenshot\InvalidConfigException('Configuration must have a key for "' . self::CONFIG_OPTION_COMMAND . '" that defined the application to shoot the screenshot');
         }
     }
 }
示例#3
0
 /**
  * @param array $config
  */
 protected function checkRequiredOptions(array $config = array())
 {
     parent::checkRequiredOptions($config);
     if (array_key_exists(self::CONFIG_SELECTION, $config)) {
         $externalServiceConfig = $config[self::CONFIG_SELECTION];
         if (!\array_key_exists('hosts', $externalServiceConfig)) {
             throw new SBScreenshot\InvalidConfigException('Configuration must have keys for "hosts" that defined the available rukzuk screenshot service hosts');
         }
         if (!\array_key_exists('endpoint', $externalServiceConfig)) {
             throw new SBScreenshot\InvalidConfigException('Configuration must have key "endpoint" that defined the url for the service enpoints');
         }
         if (!\array_key_exists('status', $externalServiceConfig['endpoint'])) {
             throw new SBScreenshot\InvalidConfigException('Configuration must have key "endpoint.status" that defined the status-service request');
         }
         if (!\array_key_exists('url', $externalServiceConfig['endpoint']['status'])) {
             throw new SBScreenshot\InvalidConfigException('Configuration must have key "endpoint.status.url" that defined the url for the status-service enpoints');
         }
         if (!\array_key_exists('trigger', $externalServiceConfig['endpoint'])) {
             throw new SBScreenshot\InvalidConfigException('Configuration must have key "endpoint.trigger" that defined the trigger-service request');
         }
         if (!\array_key_exists('url', $externalServiceConfig['endpoint']['trigger'])) {
             throw new SBScreenshot\InvalidConfigException('Configuration must have key "endpoint.trigger.url" that defined the url for the trigger-service enpoints');
         }
     }
 }
示例#4
0
文件: Base.php 项目: rukzuk/rukzuk
 protected function createDirectory()
 {
     $this->countCreatedDirectories++;
     parent::createDirectory();
 }
示例#5
0
 /**
  * @param array $config
  *
  * @throws Screenshot\InvalidConfigException
  */
 protected function checkRequiredOptions(array $config = array())
 {
     parent::checkRequiredOptions($config);
     if (!array_key_exists(self::CONFIG_SELECTION, $config)) {
         throw new Screenshot\InvalidConfigException(sprintf('Configuration section for "%s" missing', self::CONFIG_SELECTION));
     }
     $phantomJsConfig = $config[self::CONFIG_SELECTION];
     if (!array_key_exists(self::CONFIG_OPTION_COMMAND, $phantomJsConfig)) {
         throw new Screenshot\InvalidConfigException(sprintf('Configuration must have keys for "%s"', self::CONFIG_OPTION_COMMAND));
     }
 }