PHP Class Neomerx\JsonApi\Encoder\Handlers\ReplyInterpreter

Inheritance: implements Neomerx\JsonApi\Contracts\Encoder\Handlers\ReplyInterpreterInterface, implements Psr\Log\LoggerAwareInterface, use trait Psr\Log\LoggerAwareTrait
Show file Open project: neomerx/json-api Class Usage Examples

Public Methods

Method Description
__construct ( Neomerx\JsonApi\Contracts\Document\DocumentInterface $document, Neomerx\JsonApi\Contracts\Encoder\Parameters\ParametersAnalyzerInterface $parameterAnalyzer )
handle ( Neomerx\JsonApi\Contracts\Encoder\Parser\ParserReplyInterface $reply )

Protected Methods

Method Description
handleIncluded ( string $rootType, Neomerx\JsonApi\Contracts\Encoder\Parser\ParserReplyInterface $reply, Neomerx\JsonApi\Contracts\Encoder\Stack\StackFrameReadOnlyInterface $current, Neomerx\JsonApi\Contracts\Encoder\Stack\StackFrameReadOnlyInterface $previous )
handleRelationships ( string $rootType, Neomerx\JsonApi\Contracts\Encoder\Parser\ParserReplyInterface $reply, Neomerx\JsonApi\Contracts\Encoder\Stack\StackFrameReadOnlyInterface $current, Neomerx\JsonApi\Contracts\Encoder\Stack\StackFrameReadOnlyInterface $previous )

Private Methods

Method Description
addRelationshipToData ( Neomerx\JsonApi\Contracts\Encoder\Parser\ParserReplyInterface $reply, Neomerx\JsonApi\Contracts\Encoder\Stack\StackFrameReadOnlyInterface $current, Neomerx\JsonApi\Contracts\Encoder\Stack\StackFrameReadOnlyInterface $previous ) : void
addRelationshipToIncluded ( Neomerx\JsonApi\Contracts\Encoder\Parser\ParserReplyInterface $reply, Neomerx\JsonApi\Contracts\Encoder\Stack\StackFrameReadOnlyInterface $current, Neomerx\JsonApi\Contracts\Encoder\Stack\StackFrameReadOnlyInterface $previous ) : void
addToData ( Neomerx\JsonApi\Contracts\Encoder\Parser\ParserReplyInterface $reply, Neomerx\JsonApi\Contracts\Encoder\Stack\StackFrameReadOnlyInterface $current ) : void
addToIncluded ( Neomerx\JsonApi\Contracts\Encoder\Parser\ParserReplyInterface $reply, Neomerx\JsonApi\Contracts\Encoder\Stack\StackFrameReadOnlyInterface $current ) : void
addToIncludedAndCheckIfParentIsTarget ( string $rootType, Neomerx\JsonApi\Contracts\Encoder\Parser\ParserReplyInterface $reply, Neomerx\JsonApi\Contracts\Encoder\Stack\StackFrameReadOnlyInterface $current, Neomerx\JsonApi\Contracts\Encoder\Stack\StackFrameReadOnlyInterface $previous ) : boolean
getIfTargets ( string $rootType, Neomerx\JsonApi\Contracts\Encoder\Stack\StackFrameReadOnlyInterface $current, Neomerx\JsonApi\Contracts\Encoder\Stack\StackFrameReadOnlyInterface $previous = null ) : bool[]
isRelationshipInFieldSet ( Neomerx\JsonApi\Contracts\Encoder\Stack\StackFrameReadOnlyInterface $current, Neomerx\JsonApi\Contracts\Encoder\Stack\StackFrameReadOnlyInterface $previous ) : boolean If relationship from 'parent' to 'current' resource passes field set filter.
setResourceCompleted ( Neomerx\JsonApi\Contracts\Encoder\Stack\StackFrameReadOnlyInterface $current ) : void

Method Details

__construct() public method

public __construct ( 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

handle() public method

public handle ( Neomerx\JsonApi\Contracts\Encoder\Parser\ParserReplyInterface $reply )
$reply Neomerx\JsonApi\Contracts\Encoder\Parser\ParserReplyInterface

handleIncluded() protected method

protected handleIncluded ( string $rootType, Neomerx\JsonApi\Contracts\Encoder\Parser\ParserReplyInterface $reply, Neomerx\JsonApi\Contracts\Encoder\Stack\StackFrameReadOnlyInterface $current, Neomerx\JsonApi\Contracts\Encoder\Stack\StackFrameReadOnlyInterface $previous )
$rootType string
$reply Neomerx\JsonApi\Contracts\Encoder\Parser\ParserReplyInterface
$current Neomerx\JsonApi\Contracts\Encoder\Stack\StackFrameReadOnlyInterface
$previous Neomerx\JsonApi\Contracts\Encoder\Stack\StackFrameReadOnlyInterface

handleRelationships() protected method

protected handleRelationships ( string $rootType, Neomerx\JsonApi\Contracts\Encoder\Parser\ParserReplyInterface $reply, Neomerx\JsonApi\Contracts\Encoder\Stack\StackFrameReadOnlyInterface $current, Neomerx\JsonApi\Contracts\Encoder\Stack\StackFrameReadOnlyInterface $previous )
$rootType string
$reply Neomerx\JsonApi\Contracts\Encoder\Parser\ParserReplyInterface
$current Neomerx\JsonApi\Contracts\Encoder\Stack\StackFrameReadOnlyInterface
$previous Neomerx\JsonApi\Contracts\Encoder\Stack\StackFrameReadOnlyInterface