Jamm\Memory\KeyAutoUnlocker::getKey PHP Method

getKey() public method

public getKey ( )
    public function getKey()
    {
        return $this->key;
    }

Usage Example

Esempio n. 1
0
 /**
  * Unlock key, locked by method 'lock_key'
  * @param \Jamm\Memory\KeyAutoUnlocker $key_auto_unlocker
  * @return bool
  */
 public function unlock_key(\Jamm\Memory\KeyAutoUnlocker $key_auto_unlocker)
 {
     $key = $key_auto_unlocker->getKey();
     if (empty($key)) {
         $this->ReportError('Empty key in the AutoUnlocker', __LINE__);
         return false;
     }
     $key_auto_unlocker->revoke();
     if (!$this->sem->get_access_write($auto_unlocker)) {
         return false;
     }
     $this->readmemory();
     if (!isset($this->mem[self::map_keys][$key])) {
         $this->ReportError('key [' . $key . '] does not exists', __LINE__);
         return false;
     }
     if (isset($this->mem[self::map_key_locks][$key])) {
         unset($this->mem[self::map_key_locks][$key]);
         return $this->refresh();
     }
     return true;
 }
All Usage Examples Of Jamm\Memory\KeyAutoUnlocker::getKey