protected function getExtractedSource()
    {
        if ($this->source instanceof File) {
            $this->tmpDirectory = tao_helpers_File::createTempDir();
            $this->tmpFile = $this->tmpDirectory . uniqid('owiArchive') . 'zip';
            $sourceResource = $this->source->readStream();
            $destinationResource = fopen($this->tmpFile, 'w');
            stream_copy_to_stream($sourceResource, $destinationResource);
            fclose($sourceResource);
            fclose($destinationResource);
            $this->source = $this->tmpFile;
        }

        if (!is_file($this->source)) {
            throw new \common_exception_Error("Source " . $this->source . " is not a file");
        }

        return $this->source;
    }
protected function getExtractedSource()
    {
        if ($this->source instanceof File) {
            $this->tmpDirectory = tao_helpers_File::createTempDir();
            $this->tmpFile = $this->tmpDirectory . uniqid('owiArchive') . 'zip';
            $sourceResource = $this->source->readStream();
            $destinationResource = fopen($this->tmpFile, 'w');
            stream_copy_to_stream($sourceResource, $destinationResource);
            fclose($sourceResource);
            fclose($destinationResource);
            $this->source = $this->tmpFile;
        }

        if (!is_file($this->source)) {
            throw new \common_exception_Error("Source " . $this->source . " is not a file");
        }

        return $this->source;
    }
protected function getExtractedSource ( ) { if ( $ this -> source instanceof File ) { $ this -> tmpDirectory = tao_helpers_File :: createTempDir ( ) ; $ this -> tmpFile = $ this -> tmpDirectory . uniqid ( 'owiArchive' ) . 'zip' ; $ sourceResource = $ this -> source -> readStream ( ) ; $ destinationResource = fopen ( $ this -> tmpFile , 'w' ) ; stream_copy_to_stream ( $ sourceResource , $ destinationResource ) ; fclose ( $ sourceResource ) ; fclose ( $ destinationResource ) ; $ this -> source = $ this -> tmpFile ; } if ( ! is_file ( $ this -> source ) ) { throw new \ common_exception_Error ( "Source " . $ this -> source . " is not a file" ) ; } return $ this -> source ; }
Get a real path of source. If the source is a remote file, download it and return the new path.

@return File|string
@throws \common_exception_Error
Get a real path of source . If the source is a remote file download it and return the new path .