Method | Description | |
---|---|---|
__construct ( array $schemaParsers = null, array $securitySettingsParsers = null, array $fileLoaders = null, raml\ParseConfiguration $config = null ) | Create a new parser object - Optionally pass a list of parsers to use - If null is passed then the default schemaParsers are used | |
addFileLoader ( Raml\FileLoader\FileLoaderInterface $fileLoader ) | Add a file loader | |
addSchemaParser ( Raml\Schema\SchemaParserInterface $schemaParser ) | Add a new schema parser | |
addSecuritySettingParser ( Raml\SecurityScheme\SecuritySettingsParserInterface $securitySettingsParser ) | Add a new security scheme | |
parse ( string $rawFileName ) : |
Parse a RAML spec from a file | |
parseFromString ( string $ramlString, string $rootDir ) : |
Parse a RAML spec from a string | |
setConfiguration ( raml\ParseConfiguration $config ) | Set the parse configuration |
Method | Description | |
---|---|---|
applyTraitVariables ( array $values, array $trait ) : mixed | Add trait variables | |
getCachedFilePath ( string $data ) : string | ||
includeAndParseFiles ( array | string $structure, string $rootDir ) : array | Recurse through the structure and load includes | |
loadAndParseFile ( string $fileName, string $rootDir ) : array | Load and parse a file | |
parseRamlData ( string $ramlData, string $rootDir ) : |
Parse RAML data | |
parseRamlString ( string $ramlString, string $rootDir ) : array | Parse a RAML or YAML content | |
parseResourceTypes ( $ramlData ) : array | Parse the resource types | |
parseSecuritySettings ( $schemesArray ) : array | Parse the security settings data into an array | |
parseTraits ( $ramlData ) : array | Parse the traits | |
parseYaml ( string $fileData ) : array | Convert a yaml string into an array | |
recurseAndParseSchemas ( array $array, string $rootDir ) : array | Recurses though resources and replaces schema strings | |
replaceSchemas ( array $array, array $schemas ) : array | Replaces schema into the raml file | |
replaceTraits ( array $raml, array $traits, string $path, string $name ) : array | Insert the traits into the RAML file | |
replaceTypes ( array $raml, array $types, string $path, string $name, string $parentKey = null ) : array | Insert the types into the RAML file |
public addFileLoader ( Raml\FileLoader\FileLoaderInterface $fileLoader ) | ||
$fileLoader | Raml\FileLoader\FileLoaderInterface |
public addSchemaParser ( Raml\Schema\SchemaParserInterface $schemaParser ) | ||
$schemaParser | Raml\Schema\SchemaParserInterface |
public addSecuritySettingParser ( Raml\SecurityScheme\SecuritySettingsParserInterface $securitySettingsParser ) | ||
$securitySettingsParser | Raml\SecurityScheme\SecuritySettingsParserInterface |
public parseFromString ( string $ramlString, string $rootDir ) : |
||
$ramlString | string | |
$rootDir | string | |
return |
public setConfiguration ( raml\ParseConfiguration $config ) | ||
$config | raml\ParseConfiguration |