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

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

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

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

			if (!is_file($p))
			{
				// Plugin type folder
				$type = $entry;

				$hdl2 = opendir($p);

				while ($plugin = readdir($hdl2))
				{
					if (substr($plugin, 0, 1) == '.')
					{
						continue;
					}

					// Only folders
					$p2 = $path . "/" . $type . "/" . $plugin;

					if (!is_file($p2))
					{
						$plg = "plg_" . $type . "_" . $plugin;

						$this->say("Packaging Plugin " . $plg);

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

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

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

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

				closedir($hdl2);
			}
		}

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

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

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

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

			if (!is_file($p))
			{
				// Plugin type folder
				$type = $entry;

				$hdl2 = opendir($p);

				while ($plugin = readdir($hdl2))
				{
					if (substr($plugin, 0, 1) == '.')
					{
						continue;
					}

					// Only folders
					$p2 = $path . "/" . $type . "/" . $plugin;

					if (!is_file($p2))
					{
						$plg = "plg_" . $type . "_" . $plugin;

						$this->say("Packaging Plugin " . $plg);

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

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

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

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

				closedir($hdl2);
			}
		}

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

@return  void

@since   1.0
Create zips for plugins