Neomerx\JsonApi\Encoder\Parser\Parser::getSchema PHP Method

getSchema() private method

private getSchema ( mixed $resource, Neomerx\JsonApi\Contracts\Encoder\Stack\StackFrameReadOnlyInterface $frame ) : Neomerx\JsonApi\Contracts\Schema\SchemaProviderInterface
$resource mixed
$frame Neomerx\JsonApi\Contracts\Encoder\Stack\StackFrameReadOnlyInterface
return Neomerx\JsonApi\Contracts\Schema\SchemaProviderInterface
    private function getSchema($resource, StackFrameReadOnlyInterface $frame)
    {
        try {
            $schema = $this->container->getSchema($resource);
        } catch (InvalidArgumentException $exception) {
            $message = T::t('Schema is not registered for a resource at path \'%s\'.', [$frame->getPath()]);
            throw new InvalidArgumentException($message, 0, $exception);
        }
        return $schema;
    }