public function addConfig($config, $watcher)
  {
    if (!$this->root) {
      return;
    }
    $config = realpath($config);

    $filesystem = new Filesystem();
    $relativePath = $filesystem->makePathRelative($config, $this->root);
    if (substr($relativePath, 0, 2) == "..") {
      return;
    }

    if (!isset($this->configs[$watcher])) {
      $this->configs[$watcher] = array();
    }
    $this->configs[$watcher][] = $config;
  }
public function addConfig($config, $watcher)
  {
    if (!$this->root) {
      return;
    }
    $config = realpath($config);

    $filesystem = new Filesystem();
    $relativePath = $filesystem->makePathRelative($config, $this->root);
    if (substr($relativePath, 0, 2) == "..") {
      return;
    }

    if (!isset($this->configs[$watcher])) {
      $this->configs[$watcher] = array();
    }
    $this->configs[$watcher][] = $config;
  }
public function addConfig ( $ config , $ watcher ) { if ( ! $ this -> root ) { return ; } $ config = realpath ( $ config ) ; $ filesystem = new Filesystem ( ) ; $ relativePath = $ filesystem -> makePathRelative ( $ config , $ this -> root ) ; if ( substr ( $ relativePath , 0 , 2 ) == ".." ) { return ; } if ( ! isset ( $ this -> configs [ $ watcher ] ) ) { $ this -> configs [ $ watcher ] = array ( ) ; } $ this -> configs [ $ watcher ] [ ] = $ config ; }
Add config path to watch

@param string $config  Path to config file
@param string $watcher Watcher name

@return null
Add config path to watch