private function open() { $this->fileHandle = fopen($this->path, "c+"); if (!is_resource($this->fileHandle)) { throw new StorageException("Could not open '{$this->path}'."); } $this->mutex = new FlockMutex($this->fileHandle); }