Exemplo n.º 1
0
 /**
  * Get storage information
  * @access public
  * @return array
  */
 public function getStorageStatus()
 {
     $result = null;
     if ($this->_cache === true) {
         $dbCache = $this->getDI()->get('dbCache');
         $key = md5(__METHOD__);
         $result = $dbCache->get($key);
     }
     if ($result === null) {
         $phql = "SHOW VARIABLES";
         $query = new Resultset(null, null, $this->_connection->query($phql), $this->_cache);
         $result = $query->toArray();
         $result = \Helpers\Node::arrayToPair($result);
         if ($this->_cache === true) {
             $dbCache->save($key, $result);
         }
     }
     return $result;
 }