Check if lock is locked

@param  string $name name of lock
@return bool
490856
public function isLocked($name)
    {
        if (empty($this->pdo) && !$this->setupPDO($name)) {
            return false;
        }

        return !current($this->pdo)->query(
            sprintf(
                'SELECT IS_FREE_LOCK(%s)',
                current($this->pdo)->quote($name)
            ),
            PDO::FETCH_COLUMN,
            0
        )->fetch();
    }
378295
public function isSaved( string $name ): bool
	{
		return $this->load($name) !== false || $this->memcached->getResultCode() !== \Memcached::RES_NOTFOUND;
	}
1226521
public function __isset( $name ) {
		$func = "get_{$name}";
		if ( method_exists( $this, $func ) ) {
			return true;
		}
		$func = "is_{$name}";
		if ( method_exists( $this, $func ) ) {
			return true;
		}

		return isset( $GLOBALS[ $name ] );
	}
1161117
public function __isset($name) {
        switch ($name) {
            case 'id':
                return isset($this->_id);
            case 'contextlevel':
                return isset($this->_contextlevel);
            case 'instanceid':
                return isset($this->_instanceid);
            case 'path':
                return isset($this->_path);
            case 'depth':
                return isset($this->_depth);
            case 'locked':
                // Locked is always set.
                return true;
            default:
                return false;
        }
    }
278461
public function releaseLock($name)
    {
        if (isset($this->locks[$name]) && $this->client->del($name)) {
            unset($this->locks[$name]);

            return true;
        }

        return false;
    }
694286
public function __isset($name)
    {
        // If the key was loaded, return true
        if (array_key_exists($name, $this->attributes)) {
            return true;
        }

        // If it is a not loaded relation, return true
        if ($this->isRelation($name)) {
            return true;
        }

        // At least return true if this key can be lazy loaded
        return $this->isLazyLoadKey($name);
    }
435199
protected function unlock($name)
	{
		if (! array_key_exists($name, $this->locks)) {
			return false;
		}
		unset($this->locks[$name]);

		return true;
	}
1226528
public function has($name)
    {
        if (! isset($this->instances[$name])) {
            return isset($this->registry[$name]);
        }

        return true;
    }
1183642
public function isProtected($name)
    {
        return (bool) (
            $this->_services_protected->offsetExists($name) &&
            $this->_services_protected->offsetGet($name)===true
        );
    }
1014887
public function releaseNamedLock($name)
    {
        $stmt = $this->query('SELECT RELEASE_LOCK("' . $name . '")');
        return $stmt->fetch(self::FETCH_COLUMN);

    }
1062014
public static function check($name) {
		if (empty($name)) {
			return false;
		}

		return Hash::get($_SESSION, $name) !== null;
	}
1356316
public function lock($lockName)
    {
        $lockHandle = $this->lockProvider->lock($lockName);

        if ($lockHandle === false) {
            return false;
        }

        $this->lockList[$lockName] = $lockHandle;
        return true;
    }
819254
public function lock () {
        if (!$this->beforeLock ()) {
            return false;
        }
        $redis = $this->getConnection ()->getClient ();
        if (!$redis->setnx ($this->name , $this->getExpiresAt (true))) {
            // see if this mutex has expired

            $value = $redis->get ($this->name);
            if ($value > microtime (true)) {
                return false;
            }
        }
        $this->afterLock ();
        return true;
    }
1274701
public function hasConstant($name) {
        $hasConstant = false;
        if(array_key_exists($name, $this->getConstants())) {
            $hasConstant = true;
        }

        return $hasConstant;
    }
1329330
public function hasLock(Smarty $smarty, Smarty_Template_Cached $cached)
    {
        if (version_compare(PHP_VERSION, '5.3.0', '>=')) {
            clearstatcache(true, $cached->lock_id);
        } else {
            clearstatcache();
        }
        if (is_file($cached->lock_id)) {
            $t = @filemtime($cached->lock_id);
            return $t && (time() - $t < $smarty->locking_timeout);
        } else {
            return false;
        }
    }
258491
public function __isset($name)
    {
        $name = Type::snake_case($name);
        return isset($this->constraints[$name]);
    }
470559
protected static function getSettingsBlock($name)
	{
		return self::getSettingsItem(
			self::$_settingsBlock,
			self::p2mSettings(),
			$name, false
		);
	}