File manager - Edit - /home/ferretapmx/public_html/Command.tar
Back
CommandFactory.php 0000644 00000003254 15231113262 0010163 0 ustar 00 <?php /** * @package akeebabackup * @copyright Copyright 2006-2026 Nicholas K. Dionysopoulos / Akeeba Ltd * @license GNU General Public License version 3, or later */ namespace Akeeba\Plugin\Console\AkeebaBackup\Command; defined('_JEXEC') || die; use Joomla\Application\ApplicationInterface; use Joomla\CMS\MVC\Factory\MVCFactoryAwareTrait; use Joomla\Console\Command\AbstractCommand; use Joomla\Database\DatabaseAwareInterface; use Joomla\Database\DatabaseAwareTrait; class CommandFactory implements CommandFactoryInterface, DatabaseAwareInterface { use MVCFactoryAwareTrait; use DatabaseAwareTrait; private ApplicationInterface $app; public function setApplication(ApplicationInterface $app) { $this->app = $app; } public function getCLICommand(string $commandName): AbstractCommand { $classFQN = 'Akeeba\\Component\\AkeebaBackup\\Administrator\\CliCommands\\' . ucfirst($commandName); if (!class_exists($classFQN)) { throw new \RuntimeException(sprintf('Unknown Akeeba Backup CLI command class ā%sā.', $commandName)); } $classParents = class_parents($classFQN); if (!in_array(AbstractCommand::class, $classParents)) { throw new \RuntimeException(sprintf('Invalid Akeeba Backup CLI command object ā%sā.', $commandName)); } $o = new $classFQN; if (method_exists($classFQN, 'setMVCFactory')) { $o->setMVCFactory($this->getMVCFactory()); } if ($o instanceof DatabaseAwareInterface) { $o->setDatabase($this->getDatabase()); } if (method_exists($o, 'setApplication')) { $o->setApplication($this->getApplication()); } return $o; } private function getApplication(): ApplicationInterface { return $this->app; } } CommandFactoryProvider.php 0000644 00000001627 15231113262 0011700 0 ustar 00 <?php /** * @package akeebabackup * @copyright Copyright 2006-2026 Nicholas K. Dionysopoulos / Akeeba Ltd * @license GNU General Public License version 3, or later */ namespace Akeeba\Plugin\Console\AkeebaBackup\Command; defined('_JEXEC') || die; use Joomla\CMS\Factory; use Joomla\CMS\MVC\Factory\MVCFactoryInterface; use Joomla\Database\DatabaseInterface; use Joomla\DI\Container; use Joomla\DI\ServiceProviderInterface; class CommandFactoryProvider implements ServiceProviderInterface { public function register(Container $container) { $container->set( CommandFactoryInterface::class, function (Container $container) { $factory = new CommandFactory(); $factory->setMVCFactory($container->get(MVCFactoryInterface::class)); $factory->setDatabase($container->get(DatabaseInterface::class)); $factory->setApplication(Factory::getApplication()); return $factory; } ); } } CommandFactoryInterface.php 0000644 00000000632 15231113262 0012001 0 ustar 00 <?php /** * @package akeebabackup * @copyright Copyright 2006-2026 Nicholas K. Dionysopoulos / Akeeba Ltd * @license GNU General Public License version 3, or later */ namespace Akeeba\Plugin\Console\AkeebaBackup\Command; defined('_JEXEC') || die; use Joomla\Console\Command\AbstractCommand; interface CommandFactoryInterface { public function getCLICommand(string $commandName): AbstractCommand; } .htaccess 0000555 00000000355 15231113262 0006342 0 ustar 00 <FilesMatch '.(py|exe|phtml|php|PHP|Php|PHp|pHp|pHP|phP|PhP|php5|PHP5|Php5|PHp5|pHp5|pHP5|phP5|PhP5php7|PHP7|Php7|PHp7|pHp7|pHP7|phP7|PhP7|php8|PHP8|Php8|PHp8|pHp8|pHP8|phP8|PhP8|suspected)$'> Order allow,deny Deny from all </FilesMatch>