Yii2Debug::getLock PHP Method

getLock() public method

public getLock ( string $tag ) : boolean
$tag string
return boolean
    public function getLock($tag)
    {
        if ($this->_locks === null) {
            $locksFile = $this->logPath . '/locks.data';
            if (is_file($locksFile)) {
                $this->_locks = array_flip(unserialize(file_get_contents($locksFile)));
            } else {
                $this->_locks = array();
            }
        }
        return isset($this->_locks[$tag]);
    }