Esempio n. 1
0
 /**
  * Returns the record for the current key. If there is no record than an empty array is returned.
  *
  * @return array
  */
 protected function getRecord()
 {
     $record = $this->driver->getData($this->key);
     if (!is_array($record)) {
         return array();
     }
     return $record;
 }
Esempio n. 2
0
 /**
  * This clears out any locks that are present if this Item is prematurely destructed.
  */
 public function __destruct()
 {
     if (isset($this->stampedeRunning) && $this->stampedeRunning === true) {
         $spkey = $this->key;
         $spkey[0] = 'sp';
         $this->driver->clear($spkey);
     }
 }