src/Tasks/Deploy/Package.php
public function createModuleZips()
	{
		$path = $this->current . "/modules";

		// Get every module
		$hdl = opendir($path);

		while ($entry = readdir($hdl))
		{
			// Only folders
			$p = $path . "/" . $entry;

			if (substr($entry, 0, 1) == '.')
			{
				continue;
			}

			if (!is_file($p))
			{
				$this->say("Packaging Module " . $entry);

				// Package file
				$zip = new \ZipArchive(JPATH_BASE . "/dist", \ZipArchive::CREATE);

				$zip->open(JPATH_BASE . '/dist/zips/' . $entry . '.zip', \ZipArchive::CREATE);

				$this->say("Module " . $p);

				// Process the files to zip
				$this->addFiles($zip, $p);

				// Close the zip archive
				$zip->close();
			}
		}

		closedir($hdl);
	}
public function createModuleZips()
	{
		$path = $this->current . "/modules";

		// Get every module
		$hdl = opendir($path);

		while ($entry = readdir($hdl))
		{
			// Only folders
			$p = $path . "/" . $entry;

			if (substr($entry, 0, 1) == '.')
			{
				continue;
			}

			if (!is_file($p))
			{
				$this->say("Packaging Module " . $entry);

				// Package file
				$zip = new \ZipArchive(JPATH_BASE . "/dist", \ZipArchive::CREATE);

				$zip->open(JPATH_BASE . '/dist/zips/' . $entry . '.zip', \ZipArchive::CREATE);

				$this->say("Module " . $p);

				// Process the files to zip
				$this->addFiles($zip, $p);

				// Close the zip archive
				$zip->close();
			}
		}

		closedir($hdl);
	}
public function createModuleZips ( ) { $ path = $ this -> current . "/modules" ; // Get every module $ hdl = opendir ( $ path ) ; while ( $ entry = readdir ( $ hdl ) ) { // Only folders $ p = $ path . "/" . $ entry ; if ( substr ( $ entry , 0 , 1 ) == '.' ) { continue ; } if ( ! is_file ( $ p ) ) { $ this -> say ( "Packaging Module " . $ entry ) ; // Package file $ zip = new \ ZipArchive ( JPATH_BASE . "/dist" , \ ZipArchive :: CREATE ) ; $ zip -> open ( JPATH_BASE . '/dist/zips/' . $ entry . '.zip' , \ ZipArchive :: CREATE ) ; $ this -> say ( "Module " . $ p ) ; // Process the files to zip $ this -> addFiles ( $ zip , $ p ) ; // Close the zip archive $ zip -> close ( ) ; } } closedir ( $ hdl ) ; }
Create zips for modules

@return  void

@since   1.0
Create zips for modules