PHP Class Neomerx\JsonApi\Factories\Factory

Inheritance: implements Neomerx\JsonApi\Contracts\Factories\FactoryInterface
Show file Open project: neomerx/json-api Class Usage Examples

Protected Properties

Property Type Description
$logger Psr\Log\LoggerInterface

Public Methods

Method Description
__construct ( ) Constructor.
createAcceptHeader ( $unsortedMediaTypes )
createAcceptMediaType ( $position, $type, $subType, $parameters = null, $quality = 1, $extensions = null )
createCodecMatcher ( )
createContainer ( array $providers = [] )
createDocument ( )
createEmptyReply ( $replyType, Neomerx\JsonApi\Contracts\Encoder\Stack\StackReadOnlyInterface $stack )
createEncoder ( Neomerx\JsonApi\Contracts\Schema\ContainerInterface $container, Neomerx\JsonApi\Encoder\EncoderOptions $encoderOptions = null )
createError ( $idx = null, Neomerx\JsonApi\Contracts\Document\LinkInterface $aboutLink = null, $status = null, $code = null, $title = null, $detail = null, $source = null, array $meta = null )
createFrame ( Neomerx\JsonApi\Contracts\Encoder\Stack\StackFrameReadOnlyInterface $previous = null )
createHeaderParameters ( $method, Neomerx\JsonApi\Contracts\Http\Headers\AcceptHeaderInterface $accept, Neomerx\JsonApi\Contracts\Http\Headers\HeaderInterface $contentType )
createHeaderParametersParser ( )
createHeadersChecker ( Neomerx\JsonApi\Contracts\Codec\CodecMatcherInterface $codecMatcher )
createIdentitySchema ( Neomerx\JsonApi\Contracts\Schema\ContainerInterface $container, $classType, Closure $identityClosure )
createLink ( $subHref, $meta = null, $treatAsHref = false )
createManager ( Neomerx\JsonApi\Contracts\Encoder\Parameters\ParametersAnalyzerInterface $parameterAnalyzer )
createMediaType ( $type, $subType, $parameters = null )
createParametersAnalyzer ( Neomerx\JsonApi\Contracts\Encoder\Parameters\EncodingParametersInterface $parameters, Neomerx\JsonApi\Contracts\Schema\ContainerInterface $container )
createParser ( Neomerx\JsonApi\Contracts\Schema\ContainerInterface $container, Neomerx\JsonApi\Contracts\Encoder\Parser\ParserManagerInterface $manager )
createQueryChecker ( $allowUnrecognized = true, array $includePaths = null, array $fieldSetTypes = null, array $sortParameters = null, array $pagingParameters = null, array $filteringParameters = null )
createQueryParameters ( $includePaths = null, array $fieldSets = null, $sortParameters = null, array $pagingParameters = null, array $filteringParameters = null, array $unrecognizedParams = null )
createQueryParametersParser ( )
createRelationshipObject ( $name, $data, $links, $meta, $isShowData, $isRoot )
createReply ( $replyType, Neomerx\JsonApi\Contracts\Encoder\Stack\StackReadOnlyInterface $stack )
createReplyInterpreter ( Neomerx\JsonApi\Contracts\Document\DocumentInterface $document, Neomerx\JsonApi\Contracts\Encoder\Parameters\ParametersAnalyzerInterface $parameterAnalyzer )
createResourceIdentifierContainerAdapter ( Neomerx\JsonApi\Contracts\Schema\ContainerInterface $container )
createResourceIdentifierSchemaAdapter ( Neomerx\JsonApi\Contracts\Schema\SchemaProviderInterface $schema )
createResourceObject ( Neomerx\JsonApi\Contracts\Schema\SchemaProviderInterface $schema, $resource, $isInArray, $attributeKeysFilter = null )
createSortParam ( $sortField, $isAscending )
createStack ( )
createSupportedExtensions ( $extensions = MediaTypeInterface::NO_EXT )
setLogger ( Psr\Log\LoggerInterface $logger )

Method Details

__construct() public method

Constructor.
public __construct ( )

createAcceptHeader() public method

public createAcceptHeader ( $unsortedMediaTypes )

createAcceptMediaType() public method

public createAcceptMediaType ( $position, $type, $subType, $parameters = null, $quality = 1, $extensions = null )

createCodecMatcher() public method

public createCodecMatcher ( )

createContainer() public method

public createContainer ( array $providers = [] )
$providers array

createDocument() public method

public createDocument ( )

createEmptyReply() public method

public createEmptyReply ( $replyType, Neomerx\JsonApi\Contracts\Encoder\Stack\StackReadOnlyInterface $stack )
$stack Neomerx\JsonApi\Contracts\Encoder\Stack\StackReadOnlyInterface

createEncoder() public method

public createEncoder ( Neomerx\JsonApi\Contracts\Schema\ContainerInterface $container, Neomerx\JsonApi\Encoder\EncoderOptions $encoderOptions = null )
$container Neomerx\JsonApi\Contracts\Schema\ContainerInterface
$encoderOptions Neomerx\JsonApi\Encoder\EncoderOptions

createError() public method

public createError ( $idx = null, Neomerx\JsonApi\Contracts\Document\LinkInterface $aboutLink = null, $status = null, $code = null, $title = null, $detail = null, $source = null, array $meta = null )
$aboutLink Neomerx\JsonApi\Contracts\Document\LinkInterface
$meta array

createFrame() public method

public createFrame ( Neomerx\JsonApi\Contracts\Encoder\Stack\StackFrameReadOnlyInterface $previous = null )
$previous Neomerx\JsonApi\Contracts\Encoder\Stack\StackFrameReadOnlyInterface

createHeaderParameters() public method

public createHeaderParameters ( $method, Neomerx\JsonApi\Contracts\Http\Headers\AcceptHeaderInterface $accept, Neomerx\JsonApi\Contracts\Http\Headers\HeaderInterface $contentType )
$accept Neomerx\JsonApi\Contracts\Http\Headers\AcceptHeaderInterface
$contentType Neomerx\JsonApi\Contracts\Http\Headers\HeaderInterface

createHeaderParametersParser() public method

createHeadersChecker() public method

public createHeadersChecker ( Neomerx\JsonApi\Contracts\Codec\CodecMatcherInterface $codecMatcher )
$codecMatcher Neomerx\JsonApi\Contracts\Codec\CodecMatcherInterface

createIdentitySchema() public method

public createIdentitySchema ( Neomerx\JsonApi\Contracts\Schema\ContainerInterface $container, $classType, Closure $identityClosure )
$container Neomerx\JsonApi\Contracts\Schema\ContainerInterface
$identityClosure Closure

createManager() public method

public createManager ( Neomerx\JsonApi\Contracts\Encoder\Parameters\ParametersAnalyzerInterface $parameterAnalyzer )
$parameterAnalyzer Neomerx\JsonApi\Contracts\Encoder\Parameters\ParametersAnalyzerInterface

createMediaType() public method

public createMediaType ( $type, $subType, $parameters = null )

createParametersAnalyzer() public method

public createParametersAnalyzer ( Neomerx\JsonApi\Contracts\Encoder\Parameters\EncodingParametersInterface $parameters, Neomerx\JsonApi\Contracts\Schema\ContainerInterface $container )
$parameters Neomerx\JsonApi\Contracts\Encoder\Parameters\EncodingParametersInterface
$container Neomerx\JsonApi\Contracts\Schema\ContainerInterface

createParser() public method

public createParser ( Neomerx\JsonApi\Contracts\Schema\ContainerInterface $container, Neomerx\JsonApi\Contracts\Encoder\Parser\ParserManagerInterface $manager )
$container Neomerx\JsonApi\Contracts\Schema\ContainerInterface
$manager Neomerx\JsonApi\Contracts\Encoder\Parser\ParserManagerInterface

createQueryChecker() public method

public createQueryChecker ( $allowUnrecognized = true, array $includePaths = null, array $fieldSetTypes = null, array $sortParameters = null, array $pagingParameters = null, array $filteringParameters = null )
$includePaths array
$fieldSetTypes array
$sortParameters array
$pagingParameters array
$filteringParameters array

createQueryParameters() public method

public createQueryParameters ( $includePaths = null, array $fieldSets = null, $sortParameters = null, array $pagingParameters = null, array $filteringParameters = null, array $unrecognizedParams = null )
$fieldSets array
$pagingParameters array
$filteringParameters array
$unrecognizedParams array

createQueryParametersParser() public method

createRelationshipObject() public method

public createRelationshipObject ( $name, $data, $links, $meta, $isShowData, $isRoot )

createReply() public method

public createReply ( $replyType, Neomerx\JsonApi\Contracts\Encoder\Stack\StackReadOnlyInterface $stack )
$stack Neomerx\JsonApi\Contracts\Encoder\Stack\StackReadOnlyInterface

createReplyInterpreter() public method

public createReplyInterpreter ( Neomerx\JsonApi\Contracts\Document\DocumentInterface $document, Neomerx\JsonApi\Contracts\Encoder\Parameters\ParametersAnalyzerInterface $parameterAnalyzer )
$document Neomerx\JsonApi\Contracts\Document\DocumentInterface
$parameterAnalyzer Neomerx\JsonApi\Contracts\Encoder\Parameters\ParametersAnalyzerInterface

createResourceIdentifierContainerAdapter() public method

public createResourceIdentifierContainerAdapter ( Neomerx\JsonApi\Contracts\Schema\ContainerInterface $container )
$container Neomerx\JsonApi\Contracts\Schema\ContainerInterface

createResourceIdentifierSchemaAdapter() public method

public createResourceIdentifierSchemaAdapter ( Neomerx\JsonApi\Contracts\Schema\SchemaProviderInterface $schema )
$schema Neomerx\JsonApi\Contracts\Schema\SchemaProviderInterface

createResourceObject() public method

public createResourceObject ( Neomerx\JsonApi\Contracts\Schema\SchemaProviderInterface $schema, $resource, $isInArray, $attributeKeysFilter = null )
$schema Neomerx\JsonApi\Contracts\Schema\SchemaProviderInterface

createSortParam() public method

public createSortParam ( $sortField, $isAscending )

createStack() public method

public createStack ( )

createSupportedExtensions() public method

public createSupportedExtensions ( $extensions = MediaTypeInterface::NO_EXT )

setLogger() public method

public setLogger ( Psr\Log\LoggerInterface $logger )
$logger Psr\Log\LoggerInterface

Property Details

$logger protected property

protected LoggerInterface,Psr\Log $logger
return Psr\Log\LoggerInterface