Beispiel #1
0
 public function load($version = null)
 {
     $version = $version ? $version : $this->getVersion();
     if (!isset($this->cache[$version]['data'])) {
         $validator = new JsonSchemaValidator($version);
         if (!$validator->getVersionDir(false)) {
             $this->setVersion(0);
             $validator = new JsonSchemaValidator(null);
         }
         $this->cache[$version]['data'] = json_decode($validator->getDocData(), 1);
         $this->cache[$version]['timestamp'] = time();
     }
     $this->rawContent = $this->cache[$version]['data'];
     return $this;
 }