public function addDirectory($directory)
    {
        if (!file_exists($directory) || !is_dir($directory)) {
            throw new \Exception('The configuration directory does not exist.');
        } else {
            if (substr($directory, -1) != DIRECTORY_SEPARATOR) {
                $directory .= DIRECTORY_SEPARATOR;
            }

            foreach (glob($directory . '*.yml') as $file) {
                self::addFile($file);
            }
        }

        return self::getInstance();
    }
public function addDirectory($directory)
    {
        if (!file_exists($directory) || !is_dir($directory)) {
            throw new \Exception('The configuration directory does not exist.');
        } else {
            if (substr($directory, -1) != DIRECTORY_SEPARATOR) {
                $directory .= DIRECTORY_SEPARATOR;
            }

            foreach (glob($directory . '*.yml') as $file) {
                self::addFile($file);
            }
        }

        return self::getInstance();
    }
public function addDirectory ( $ directory ) { if ( ! file_exists ( $ directory ) || ! is_dir ( $ directory ) ) { throw new \ Exception ( 'The configuration directory does not exist.' ) ; } else { if ( substr ( $ directory , - 1 ) != DIRECTORY_SEPARATOR ) { $ directory .= DIRECTORY_SEPARATOR ; } foreach ( glob ( $ directory . '*.yml' ) as $ file ) { self :: addFile ( $ file ) ; } } return self :: getInstance ( ) ; }
Parse .yml files in a given directory.

@param string $directory

@return self
Parse . yml files in a given directory .