/** * Returns a data pair value by its key or NULL if pair not found. * @access public * @param string $key Data pair key * @return mixed */ public function get($key) { $uri = $this->getUriForKey($key); if (!$this->isValidFile($uri)) { return NULL; } if (isset($this->data[$key])) { return $this->data[$key]; } $content = \FS_File_Editor::load($uri); $value = unserialize($content); $this->data[$key] = $value; return $value; }
/** * Returns a data pair value by its key or NULL if pair not found. * @access public * @param string $key Data pair key * @return mixed */ public function get($key) { $uri = $this->path . $this->context . $key; if (!$this->isValidFile($uri)) { return NULL; } return \FS_File_Editor::load($uri); }