public function releaseLock($name) { if (!$this->available) { return false; } if ($this->counter > 0) { $this->counter--; return true; } return false; }