Pantheon\Terminus\DataStore\FileStore::get PHP Method

get() public method

Reads retrieves data from the store
public get ( string $key ) : mixed
$key string A key
return mixed The value fpr the given key or null.
    public function get($key)
    {
        $out = null;
        // Read the json encoded value from disk if it exists.
        $path = $this->getFileName($key);
        if (file_exists($path)) {
            $out = file_get_contents($path);
            $out = json_decode($out);
        }
        return $out;
    }