public function check_state($key, $ownerid) {
        if (array_key_exists($key, $this->locks)) {
            // The key is locked and we own it.
            return true;
        }
        $lockfile = $this->get_lock_file($key);
        if (file_exists($lockfile)) {
            // The key is locked and we don't own it.
            return false;
        }
        return null;
    }
public function check_state($key, $ownerid) {
        if (array_key_exists($key, $this->locks)) {
            // The key is locked and we own it.
            return true;
        }
        $lockfile = $this->get_lock_file($key);
        if (file_exists($lockfile)) {
            // The key is locked and we don't own it.
            return false;
        }
        return null;
    }
public function check_state ( $ key , $ ownerid ) { if ( array_key_exists ( $ key , $ this -> locks ) ) { // The key is locked and we own it. return true ; } $ lockfile = $ this -> get_lock_file ( $ key ) ; if ( file_exists ( $ lockfile ) ) { // The key is locked and we don't own it. return false ; } return null ; }
Checks if the given key is locked.

@param string $key
@param string $ownerid
Checks if the given key is locked .