protected function importPackage($file)
    {
        $extension = strtolower(pathinfo($file, PATHINFO_EXTENSION));

        if ($extension === Packager::FILE_EXTENSION) {
            $this->importOldPackage($file);
        } else {
            $package = new Package($file, $this->option('delete'), $this->option('password'));
            $importer = new Importer($package);
            $importer->import();
            $log = $importer->getLog();
            $this->importLog[] = [
                'file' => $file,
                'log'  => $log
            ];
        }
    }
protected function importPackage($file)
    {
        $extension = strtolower(pathinfo($file, PATHINFO_EXTENSION));

        if ($extension === Packager::FILE_EXTENSION) {
            $this->importOldPackage($file);
        } else {
            $package = new Package($file, $this->option('delete'), $this->option('password'));
            $importer = new Importer($package);
            $importer->import();
            $log = $importer->getLog();
            $this->importLog[] = [
                'file' => $file,
                'log'  => $log
            ];
        }
    }
protected function importPackage ( $ file ) { $ extension = strtolower ( pathinfo ( $ file , PATHINFO_EXTENSION ) ) ; if ( $ extension === Packager :: FILE_EXTENSION ) { $ this -> importOldPackage ( $ file ) ; } else { $ package = new Package ( $ file , $ this -> option ( 'delete' ) , $ this -> option ( 'password' ) ) ; $ importer = new Importer ( $ package ) ; $ importer -> import ( ) ; $ log = $ importer -> getLog ( ) ; $ this -> importLog [ ] = [ 'file' => $ file , 'log' => $ log ] ; } }
Imports package.

@param $file

@throws \Exception
Imports package .