Pop\Archive\Adapter\Zip::__construct PHP Метод

__construct() публичный Метод

Method to instantiate an archive adapter object
public __construct ( Archive $archive ) : Zip
$archive Pop\Archive\Archive
Результат Zip
    public function __construct(\Pop\Archive\Archive $archive)
    {
        if (strpos($archive->getFullpath(), '/.') !== false) {
            $this->workingDir = substr($archive->getFullpath(), 0, strpos($archive->getFullpath(), '/.'));
        } else {
            if (strpos($archive->getFullpath(), '\\.') !== false) {
                $this->workingDir = substr($archive->getFullpath(), 0, strpos($archive->getFullpath(), '\\.'));
            } else {
                $this->workingDir = getcwd();
            }
        }
        if (substr($archive->getFullpath(), 0, 1) != '/' && substr($archive->getFullpath(), 1, 1) != ':') {
            $this->path = $this->workingDir . DIRECTORY_SEPARATOR . $archive->getFullpath();
        } else {
            $this->path = realpath(dirname($archive->getFullpath())) . DIRECTORY_SEPARATOR . $archive->getBasename();
        }
        $this->archive = new \ZipArchive();
    }