HEX
Server: Apache
System: Linux server 5.4.0-56-generic #62-Ubuntu SMP Mon Nov 23 19:20:19 UTC 2020 x86_64
User: losadagest (10000)
PHP: 7.4.33
Disabled: opcache_get_status
Upload Files
File: /var/www/vhosts/aceitunaslosada.com/insta-gallery/includes/models/QLIGG_Model.php
<?php

class QLIGG_Model {

  private $cache = array();
  protected $table = null;

  function save_all($data = null) {

    if (!$this->table) {
      error_log('Model can\'t be accesed directly');
      die();
    }

    $this->cache[$this->table] = $data;

    return update_option($this->table, $data);
  }

  function get_all() {

    if (!$this->table) {
      error_log('Model can\'t be accesed directly');
      die();
    }

    if (!isset($this->cache[$this->table])) {
      $this->cache[$this->table] = get_option($this->table, $this->get_defaults());
    }

    return $this->cache[$this->table];
  }

}