프로퍼티 | 타입 | 설명 | |
---|---|---|---|
$container | Neomerx\JsonApi\Contracts\Schema\ContainerInterface | ||
$encoderOptions | Neomerx\JsonApi\Encoder\EncoderOptions | null | ||
$factory | Neomerx\JsonApi\Contracts\Factories\FactoryInterface | ||
$isAddJsonApiVersion | boolean | ||
$jsonApiVersionMeta | mixed | null | ||
$links | array | null | Links in array |
|
$meta | array | object | null |
메소드 | 설명 | |
---|---|---|
__construct ( Neomerx\JsonApi\Contracts\Factories\FactoryInterface $factory, Neomerx\JsonApi\Contracts\Schema\ContainerInterface $container, Neomerx\JsonApi\Encoder\EncoderOptions $encoderOptions = null ) | ||
encodeData ( $data, Neomerx\JsonApi\Contracts\Encoder\Parameters\EncodingParametersInterface $parameters = null ) | ||
encodeError ( Neomerx\JsonApi\Contracts\Document\ErrorInterface $error ) | ||
encodeErrors ( $errors ) | ||
encodeIdentifiers ( $data, Neomerx\JsonApi\Contracts\Encoder\Parameters\EncodingParametersInterface $parameters = null ) | ||
encodeMeta ( $meta ) | ||
instance ( array $schemas = [], Neomerx\JsonApi\Encoder\EncoderOptions $encodeOptions = null ) : Neomerx\JsonApi\Contracts\Encoder\EncoderInterface | Create encoder instance. | |
withJsonApiVersion ( $meta = null ) | ||
withLinks ( array $links ) | ||
withMeta ( $meta ) | ||
withRelationshipRelatedLink ( $resource, $relationshipName, $meta = null, $treatAsHref = false ) | ||
withRelationshipSelfLink ( $resource, $relationshipName, $meta = null, $treatAsHref = false ) |
메소드 | 설명 | |
---|---|---|
checkInputData ( mixed $data ) | ||
encodeDataInternal ( Neomerx\JsonApi\Contracts\Schema\ContainerInterface $container, object | array | Iterato\Iterator | null $data, Neomerx\JsonApi\Contracts\Encoder\Parameters\EncodingParametersInterface $parameters = null ) : string | ||
encodeToJson ( array $document ) : string | Encode array to JSON. | |
getFactory ( ) : Neomerx\JsonApi\Contracts\Factories\FactoryInterface |
메소드 | 설명 | |
---|---|---|
configureUrlPrefix ( Neomerx\JsonApi\Contracts\Document\DocumentInterface $docWriter ) | ||
createParametersAnalyzer ( Neomerx\JsonApi\Contracts\Schema\ContainerInterface $container, Neomerx\JsonApi\Contracts\Encoder\Parameters\EncodingParametersInterface $parameters = null ) : Neomerx\JsonApi\Contracts\Encoder\Parameters\ParametersAnalyzerInterface | ||
resetEncodeParameters ( ) | Reset encode parameters. |
public __construct ( Neomerx\JsonApi\Contracts\Factories\FactoryInterface $factory, Neomerx\JsonApi\Contracts\Schema\ContainerInterface $container, Neomerx\JsonApi\Encoder\EncoderOptions $encoderOptions = null ) | ||
$factory | Neomerx\JsonApi\Contracts\Factories\FactoryInterface | |
$container | Neomerx\JsonApi\Contracts\Schema\ContainerInterface | |
$encoderOptions | Neomerx\JsonApi\Encoder\EncoderOptions |
public encodeData ( $data, Neomerx\JsonApi\Contracts\Encoder\Parameters\EncodingParametersInterface $parameters = null ) | ||
$parameters | Neomerx\JsonApi\Contracts\Encoder\Parameters\EncodingParametersInterface |
protected encodeDataInternal ( Neomerx\JsonApi\Contracts\Schema\ContainerInterface $container, object | array | Iterato\Iterator | null $data, Neomerx\JsonApi\Contracts\Encoder\Parameters\EncodingParametersInterface $parameters = null ) : string | ||
$container | Neomerx\JsonApi\Contracts\Schema\ContainerInterface | |
$data | object | array | Iterato\Iterator | null | |
$parameters | Neomerx\JsonApi\Contracts\Encoder\Parameters\EncodingParametersInterface | |
리턴 | string |
public encodeError ( Neomerx\JsonApi\Contracts\Document\ErrorInterface $error ) | ||
$error | Neomerx\JsonApi\Contracts\Document\ErrorInterface |
public encodeIdentifiers ( $data, Neomerx\JsonApi\Contracts\Encoder\Parameters\EncodingParametersInterface $parameters = null ) | ||
$parameters | Neomerx\JsonApi\Contracts\Encoder\Parameters\EncodingParametersInterface |
protected encodeToJson ( array $document ) : string | ||
$document | array | |
리턴 | string |
protected static getFactory ( ) : Neomerx\JsonApi\Contracts\Factories\FactoryInterface | ||
리턴 | Neomerx\JsonApi\Contracts\Factories\FactoryInterface |
public static instance ( array $schemas = [], Neomerx\JsonApi\Encoder\EncoderOptions $encodeOptions = null ) : Neomerx\JsonApi\Contracts\Encoder\EncoderInterface | ||
$schemas | array | Schema providers. |
$encodeOptions | Neomerx\JsonApi\Encoder\EncoderOptions | |
리턴 | Neomerx\JsonApi\Contracts\Encoder\EncoderInterface |
public withRelationshipRelatedLink ( $resource, $relationshipName, $meta = null, $treatAsHref = false ) |
public withRelationshipSelfLink ( $resource, $relationshipName, $meta = null, $treatAsHref = false ) |
protected ContainerInterface,Neomerx\JsonApi\Contracts\Schema $container | ||
리턴 | Neomerx\JsonApi\Contracts\Schema\ContainerInterface |
protected EncoderOptions,Neomerx\JsonApi\Encoder|null $encoderOptions | ||
리턴 | Neomerx\JsonApi\Encoder\EncoderOptions | null |
protected FactoryInterface,Neomerx\JsonApi\Contracts\Factories $factory | ||
리턴 | Neomerx\JsonApi\Contracts\Factories\FactoryInterface |