Webiny\Component\Rest\Compiler\Cache::getCacheContent PHP 메소드

getCacheContent() 공개 메소드

Returns the contents of an existing cache file in form of an array.
public getCacheContent ( $api, $class, $version ) : array
$api Name of the API.
$class Name of the class.
$version Version of the class.
리턴 array
    public function getCacheContent($api, $class, $version)
    {
        return $this->cacheDriver->read($api, $class, $version);
    }

Usage Example

예제 #1
0
파일: Router.php 프로젝트: Webiny/Framework
 /**
  * Process the api rest request and return the CallbackResult object.
  *
  * @return CallbackResult
  */
 public function processRequest()
 {
     // get version cache file
     $version = $this->getVersion();
     // get class data from the compiled cache files
     $classData = $this->compilerCache->getCacheContent($this->api, $this->class, $version);
     // match request
     return $this->matchRequest($classData);
 }