Contao\ZipReader::__construct PHP Метод

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

Open the archive and return the file handle
public __construct ( string $strFile )
$strFile string The file path
    public function __construct($strFile)
    {
        // Handle open_basedir restrictions
        if ($strFile == '.') {
            $strFile = '';
        }
        $this->strFile = $strFile;
        // Check if file exists
        if (!file_exists(TL_ROOT . '/' . $strFile)) {
            throw new \Exception("Could not find file {$strFile}");
        }
        $this->resFile = @fopen(TL_ROOT . '/' . $strFile, 'rb');
        // Could not open file
        if (!is_resource($this->resFile)) {
            throw new \Exception("Could not open file {$strFile}");
        }
        $this->readCentralDirectory();
    }