Method | Description | |
---|---|---|
__construct ( Neomerx\JsonApi\Contracts\Schema\SchemaFactoryInterface $factory, array $schemas = [] ) | ||
getSchema ( $resource ) | ||
getSchemaByResourceType ( $resourceType ) | ||
getSchemaByType ( $type ) | ||
register ( string $type, string | Closur\Closure $schema ) : void | Register provider for resource type. | |
registerArray ( array $schemas ) : void | Register providers for resource types. |
Method | Description | |
---|---|---|
createSchemaFromClassName ( string $className ) : Neomerx\JsonApi\Contracts\Schema\SchemaProviderInterface | ||
createSchemaFromClosure ( Closure $closure ) : Neomerx\JsonApi\Contracts\Schema\SchemaProviderInterface | ||
getCreatedProvider ( string $type ) : Neomerx\JsonApi\Contracts\Schema\SchemaProviderInterface | ||
getFactory ( ) : Neomerx\JsonApi\Contracts\Schema\SchemaFactoryInterface | ||
getJsonType ( string $resourceType ) : string | ||
getProviderMapping ( string $type ) : mixed | ||
getProviderMappings ( ) : array | ||
getResourceType ( object $resource ) : string | ||
hasCreatedProvider ( string $type ) : boolean | ||
hasProviderMapping ( string $type ) : boolean | ||
hasResourceToJsonTypeMapping ( string $resourceType ) : boolean | ||
setCreatedProvider ( string $type, Neomerx\JsonApi\Contracts\Schema\SchemaProviderInterface $provider ) : void | ||
setProviderMapping ( string $type, string | Closur\Closure $schema ) : void | ||
setResourceToJsonTypeMapping ( string $resourceType, string $jsonType ) : void |
public __construct ( Neomerx\JsonApi\Contracts\Schema\SchemaFactoryInterface $factory, array $schemas = [] ) | ||
$factory | Neomerx\JsonApi\Contracts\Schema\SchemaFactoryInterface | |
$schemas | array |
protected createSchemaFromClassName ( string $className ) : Neomerx\JsonApi\Contracts\Schema\SchemaProviderInterface | ||
$className | string | |
return | Neomerx\JsonApi\Contracts\Schema\SchemaProviderInterface |
protected createSchemaFromClosure ( Closure $closure ) : Neomerx\JsonApi\Contracts\Schema\SchemaProviderInterface | ||
$closure | Closure | |
return | Neomerx\JsonApi\Contracts\Schema\SchemaProviderInterface |
protected getCreatedProvider ( string $type ) : Neomerx\JsonApi\Contracts\Schema\SchemaProviderInterface | ||
$type | string | |
return | Neomerx\JsonApi\Contracts\Schema\SchemaProviderInterface |
protected getFactory ( ) : Neomerx\JsonApi\Contracts\Schema\SchemaFactoryInterface | ||
return | Neomerx\JsonApi\Contracts\Schema\SchemaFactoryInterface |
protected getJsonType ( string $resourceType ) : string | ||
$resourceType | string | |
return | string |
protected getProviderMapping ( string $type ) : mixed | ||
$type | string | |
return | mixed |
protected getResourceType ( object $resource ) : string | ||
$resource | object | |
return | string |
protected hasCreatedProvider ( string $type ) : boolean | ||
$type | string | |
return | boolean |
protected hasProviderMapping ( string $type ) : boolean | ||
$type | string | |
return | boolean |
protected hasResourceToJsonTypeMapping ( string $resourceType ) : boolean | ||
$resourceType | string | |
return | boolean |
public registerArray ( array $schemas ) : void | ||
$schemas | array | |
return | void |
protected setCreatedProvider ( string $type, Neomerx\JsonApi\Contracts\Schema\SchemaProviderInterface $provider ) : void | ||
$type | string | |
$provider | Neomerx\JsonApi\Contracts\Schema\SchemaProviderInterface | |
return | void |