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

Namespaces

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

Classes

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

Class PATCH

Patch 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
Extended by Phramework\JSONAPI\Controller\PATCH

Direct known subclasses

Phramework\JSONAPI\Controller\DELETE

Indirect known subclasses

Phramework\JSONAPI\Controller

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

Methods summary

protected static boolean
# handlePATCH( object $parameters, string $method, array $headers, integer|string $id, string $modelClass, array $primaryDataParameters = [] )

Parameters

$parameters
Request parameters
$method
Request method
$headers
Request headers
$id
Requested resource's id
$modelClass

Resource's primary model to be used

$primaryDataParameters

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

Returns

boolean

Throws

Phramework\Exceptions\NotFound
If resource not found
Phramework\Exceptions\RequestException
If no fields are changed
Exception
When Validation model for an attribute is not set

Uses

model's getById method to fetch resource
$modelClass::patch method to update resources

Todo

clear call to getById
allow null values
patch relationship data
rethink output

Methods inherited from Phramework\JSONAPI\Controller\POST

handlePOST()

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