/** * @param array $resources */ private function releaseResources(array $resources) { foreach ($resources as $resource) { $this->kv->delete($this->lockPath . $resource); } $this->session->destroy($this->sessionId); }
/** * Release resources if they were aquired */ public function release() { if ($this->sessionId) { foreach ($this->resources as $resource) { $this->kv->delete($this->getResourceKey($resource, $this->sessionId)); } $this->session->destroy($this->sessionId); $this->sessionId = null; } }