private function addFile($pathToAdd, $fileName = null)
    {
        if (!$fileName) {
            $info = pathinfo($pathToAdd);
            $fileName = isset($info['extension']) ?
                $info['filename'].'.'.$info['extension'] :
                $info['filename'];
        }

        $this->repository->addFile($pathToAdd, $this->getInternalPath().$fileName);
    }
private function addFile($pathToAdd, $fileName = null)
    {
        if (!$fileName) {
            $info = pathinfo($pathToAdd);
            $fileName = isset($info['extension']) ?
                $info['filename'].'.'.$info['extension'] :
                $info['filename'];
        }

        $this->repository->addFile($pathToAdd, $this->getInternalPath().$fileName);
    }
private function addFile ( $ pathToAdd , $ fileName = null ) { if ( ! $ fileName ) { $ info = pathinfo ( $ pathToAdd ) ; $ fileName = isset ( $ info [ 'extension' ] ) ? $ info [ 'filename' ] . '.' . $ info [ 'extension' ] : $ info [ 'filename' ] ; } $ this -> repository -> addFile ( $ pathToAdd , $ this -> getInternalPath ( ) . $ fileName ) ; }
Add the file to the zip

@param string $pathToAdd
@param string $fileName
Add the file to the zip