phramework/jsonapi doc
  • Namespace
  • Class
  • Tree
  • Deprecated
  • Todo

Namespaces

  • Phramework
    • JSONAPI
      • Controller
        • POST
      • Model
      • Viewers

Classes

  • Base
  • DELETE
  • GET
  • GETById
  • PATCH
  • POST
  • Relationships

Class POST

POST related methods

Phramework\JSONAPI\Controller\Base
Extended by Phramework\JSONAPI\Controller\Relationships
Extended by Phramework\JSONAPI\Controller\GETById
Extended by Phramework\JSONAPI\Controller\GET
Extended by Phramework\JSONAPI\Controller\POST

Direct known subclasses

Phramework\JSONAPI\Controller\PATCH

Indirect known subclasses

Phramework\JSONAPI\Controller, Phramework\JSONAPI\Controller\DELETE

Abstract
Namespace: Phramework\JSONAPI\Controller
License: Apache-2.0
Author: Xenofon Spafaridis nohponex@gmail.com
Since: 0.0.0
Located at Controller/POST.php

Methods summary

protected static int[]
# handlePOST( object $params, string $method, array $headers, string $modelClass, array $primaryDataParameters = [], array $relationshipParameters = [], callable[] $validationCallbacks = [], $viewCallback = null )

Parameters

$params
Request parameters
$method
Request method
$headers
Request headers
$modelClass
Resource's primary model
$primaryDataParameters

[Optional] Array with any additional arguments that the primary data is requiring

$relationshipParameters

[Optional] Array with any additional argument primary data's relationships are requiring

$validationCallbacks
$viewCallback

Returns

int[]

Uses

$modelClass::post method to create resources

Todo

handle as transaction queue, Since models usually are not producing exceptions. Prepare data until last possible moment, so that any exceptions can be thrown, and finally invoke the execution of the queue.


validate type

Methods inherited from Phramework\JSONAPI\Controller\GET

handleGET()

Methods inherited from Phramework\JSONAPI\Controller\GETById

handleGETByid()

Methods inherited from Phramework\JSONAPI\Controller\Relationships

handleByIdRelationships()

Methods inherited from Phramework\JSONAPI\Controller\Base

checkIfUnsupportedRequestWithId(), exists(), getRequestAttributes(), getRequestData(), getRequestInclude(), getRequestRelationships(), testUnknownError(), view(), viewData()

phramework/jsonapi doc API documentation generated by ApiGen