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

Namespaces

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

Classes

  • Cache
  • Directives
  • Get
  • Model
  • Relationship

Class Cache

Phramework\JSONAPI\Model\Model
Extended by Phramework\JSONAPI\Model\Cache

Direct known subclasses

Phramework\JSONAPI\Model\Directives

Indirect known subclasses

Phramework\JSONAPI\Model, Phramework\JSONAPI\Model\Get, Phramework\JSONAPI\Model\Relationship

Abstract
Namespace: Phramework\JSONAPI\Model
License: Apache-2.0
Author: Xenofon Spafaridis nohponex@gmail.com
Since: 1.0.0
Located at Model/Cache.php

Methods summary

protected static
# initializeCache( string $type )

Initialize cache object for a resource type NOTE self MUST be used not static when accessing $cache object

Initialize cache object for a resource type NOTE self MUST be used not static when accessing $cache object

Parameters

$type
Resource type
protected static Phramework\JSONAPI\Resource|null
# getCache( string $id )

NOTE Will return a clone of the resource, so any changes to it wont affect the stored in cache resource.

NOTE Will return a clone of the resource, so any changes to it wont affect the stored in cache resource.

Parameters

$id

Returns

Phramework\JSONAPI\Resource|null
protected static boolean
# setCache( string $id, Phramework\JSONAPI\Resource $resource )

Parameters

$id
$resource

Returns

boolean
protected static
# invalidateCache( string $id )

Remove resource from cache, used by PUT, PATCH and DELETE methods when changing an object

Remove resource from cache, used by PUT, PATCH and DELETE methods when changing an object

Parameters

$id

Methods inherited from Phramework\JSONAPI\Model\Model

getCast(), getEndpoint(), getIdAttribute(), getSchema(), getSelfLink(), getTable(), getType()

Constants summary

Constants inherited from Phramework\JSONAPI\Model\Model

GET_BY_PREFIX, GET_RELATIONSHIP_BY_PREFIX, POST_RELATIONSHIP_BY_PREFIX

Properties summary

protected static object|null $cache

Cache object

Cache object

Example

(object) [
    'trend' => (object)[
        '1' => class stdClass...,
        '2' => class stdClass...
    ],
    'trend_template' => (object)[
        '13' => class stdClass...,
        '12' => class stdClass...
    ]
]

# null

Properties inherited from Phramework\JSONAPI\Model\Model

$cast, $endpoint, $idAttribute, $schema, $table, $type

phramework/jsonapi doc API documentation generated by ApiGen