private function parseRamlString($ramlString, $rootDir)
    {
        // get the header
        $header = \strtok($ramlString, "\n");

        $data = $this->parseYaml($ramlString);

        if (empty($data)) {
            throw new \RuntimeException('RAML file appears to be empty');
        }

        if (\strpos($header, '#%RAML') === 0) {
            // @todo extract the raml version and do something with it

            $data = $this->includeAndParseFiles(
                $data,
                $rootDir
            );
        }

        return $data;
    }
private function parseRamlString($ramlString, $rootDir)
    {
        // get the header
        $header = \strtok($ramlString, "\n");

        $data = $this->parseYaml($ramlString);

        if (empty($data)) {
            throw new \RuntimeException('RAML file appears to be empty');
        }

        if (\strpos($header, '#%RAML') === 0) {
            // @todo extract the raml version and do something with it

            $data = $this->includeAndParseFiles(
                $data,
                $rootDir
            );
        }

        return $data;
    }
private function parseRamlString ( $ ramlString , $ rootDir ) { // get the header $ header = \ strtok ( $ ramlString , "\n" ) ; $ data = $ this -> parseYaml ( $ ramlString ) ; if ( empty ( $ data ) ) { throw new \ RuntimeException ( 'RAML file appears to be empty' ) ; } if ( \ strpos ( $ header , '#%RAML' ) === 0 ) { // @todo extract the raml version and do something with it $ data = $ this -> includeAndParseFiles ( $ data , $ rootDir ) ; } return $ data ; }
Parse a RAML or YAML content

@param string $ramlString
@param string $rootDir
@return array

@throws \RuntimeException
Parse a RAML or YAML content