public function load()
    {
        if (!file_exists($this->file)) {
            return []; // File doesn't exist yet.
        }
        $data = file_get_contents($this->file);
        if (strlen($data) === 0) {
            return [];
        }
        if ($this->isEncrypted()) {
            $data = Crypto::decryptWithPassword($data, $this->key, true);
        }
        return json_decode($data, true);
    }
public function load()
    {
        if (!file_exists($this->file)) {
            return []; // File doesn't exist yet.
        }
        $data = file_get_contents($this->file);
        if (strlen($data) === 0) {
            return [];
        }
        if ($this->isEncrypted()) {
            $data = Crypto::decryptWithPassword($data, $this->key, true);
        }
        return json_decode($data, true);
    }
public function load ( ) { if ( ! file_exists ( $ this -> file ) ) { return [ ] ; // File doesn't exist yet. } $ data = file_get_contents ( $ this -> file ) ; if ( strlen ( $ data ) === 0 ) { return [ ] ; } if ( $ this -> isEncrypted ( ) ) { $ data = Crypto :: decryptWithPassword ( $ data , $ this -> key , true ) ; } return json_decode ( $ data , true ) ; }
Loads all data from the database, decrypting it if needed.

@return array    the data from the database
Loads all data from the database decrypting it if needed .