Raml\ApiDefinition::addSchema PHP Method

addSchema() private method

Add a new schema to a collection
private addSchema ( string $collectionName, string $schemaName, string | Raml\Schema\SchemaDefinitionInterface $schema )
$collectionName string
$schemaName string
$schema string | Raml\Schema\SchemaDefinitionInterface
    private function addSchema($collectionName, $schemaName, $schema)
    {
        if (!is_string($schema) && !$schema instanceof SchemaDefinitionInterface) {
            throw new InvalidSchemaDefinitionException();
        }
        $this->schemaCollections[$collectionName][$schemaName] = $schema;
    }