public function setDir($dir)
    {
        if (!is_dir($dir)) {
            throw new FileNotFoundException(sprintf('Config "%s" is not a directory.', is_string($dir) ? $dir : (is_object($dir) ? get_class($dir) : gettype($dir))));
        }

        $newDir = realpath($dir).'/';
        if (null === $this->configDirectory) {
            $this->configDirectory = $newDir;

            return $this;
        }

        if ($newDir === $this->configDirectory) {
            return $this;
        }

        $this->configDirectory = $newDir;
        $this->flushAll();

        return $this;
    }
public function setDir($dir)
    {
        if (!is_dir($dir)) {
            throw new FileNotFoundException(sprintf('Config "%s" is not a directory.', is_string($dir) ? $dir : (is_object($dir) ? get_class($dir) : gettype($dir))));
        }

        $newDir = realpath($dir).'/';
        if (null === $this->configDirectory) {
            $this->configDirectory = $newDir;

            return $this;
        }

        if ($newDir === $this->configDirectory) {
            return $this;
        }

        $this->configDirectory = $newDir;
        $this->flushAll();

        return $this;
    }
public function setDir ( $ dir ) { if ( ! is_dir ( $ dir ) ) { throw new FileNotFoundException ( sprintf ( 'Config "%s" is not a directory.' , is_string ( $ dir ) ? $ dir : ( is_object ( $ dir ) ? get_class ( $ dir ) : gettype ( $ dir ) ) ) ) ; } $ newDir = realpath ( $ dir ) . '/' ; if ( null === $ this -> configDirectory ) { $ this -> configDirectory = $ newDir ; return $ this ; } if ( $ newDir === $ this -> configDirectory ) { return $ this ; } $ this -> configDirectory = $ newDir ; $ this -> flushAll ( ) ; return $ this ; }
Set the directory location for the config files.

Triggers @see ConfigLoader::flushAll.

@param string $dir Full path

@throws FileNotFoundException

@return $this
Set the directory location for the config files .