public function extract($to = null) { if ($this->archive->open($this->path) === true) { $path = null !== $to ? realpath($to) : './'; $this->archive->extractTo($path); $this->archive->close(); } }