Esempio n. 1
0
 public function __construct(array $data)
 {
     parent::__construct($data);
     if ($this->method == 'release') {
         $this->deployTo = $this->path . '/' . $this->releaseDir;
         $this->currentRelease = $this->path . '/' . $this->symlink;
     } else {
         $this->deployTo = $this->path;
         $this->currentRelease = $this->path;
     }
 }
Esempio n. 2
0
 public function __construct(array $server)
 {
     parent::__construct($server);
     $this->strategy = explode(',', $server['strategy']);
 }
Esempio n. 3
0
 /**
  * @param array $data
  * @param array $data2
  * @param array $path
  * @throws ConfigurationConflictException
  * @return array
  */
 private static function rmerge(array $data, array $data2, array $path = null)
 {
     foreach ($data2 as $key => $value) {
         $newPath = $path;
         if ($newPath !== null) {
             $newPath[] = $key;
         }
         if (is_numeric($key)) {
             $data[] = $value;
             continue;
         }
         if (!array_key_exists($key, $data)) {
             $data[$key] = $value;
             continue;
         }
         if (is_array($data[$key]) && is_array($value)) {
             $data[$key] = self::rmerge($data[$key], $value, $newPath);
             continue;
         }
         if ($newPath === null) {
             continue;
         }
         throw new ConfigurationConflictException('Property \'' . ConfigProperty::create($newPath)->__toString() . '\' is already defined.');
     }
     return $data;
 }