You are here

public function RestfulBase::getVersion in RESTful 7

Return array keyed with the major and minor version of the resource.

Return value

array Keyed array with the major and minor version as provided in the plugin definition.

6 calls to RestfulBase::getVersion()
RestfulBase::clearResourceRenderedCache in plugins/restful/RestfulBase.php
Clear all caches corresponding to the current resource.
RestfulBase::generateCacheId in plugins/restful/RestfulBase.php
Generate a cache identifier for the request and the current context.
RestfulBase::process in plugins/restful/RestfulBase.php
Entry point to process a request.
RestfulEntityBase::clearResourceRenderedCacheEntity in plugins/restful/RestfulEntityBase.php
Clear all caches corresponding to the current resource for a given entity.
RestfulEntityBaseMultipleBundles::getList in plugins/restful/RestfulEntityBaseMultipleBundles.php
Overrides RestfulEntityBase::getList().

... See full list

File

plugins/restful/RestfulBase.php, line 608
Contains RestfulBase.

Class

RestfulBase
Class \RestfulBase

Code

public function getVersion() {
  $version = $this->staticCache
    ->get(__CLASS__ . '::' . __FUNCTION__);
  if (isset($version)) {
    return $version;
  }
  $version = array(
    'major' => $this
      ->getPluginKey('major_version'),
    'minor' => $this
      ->getPluginKey('minor_version'),
  );
  $this->staticCache
    ->set(__CLASS__ . '::' . __FUNCTION__, $version);
  return $version;
}