Back to Joomla project (class list)

Class WritableContainerLoader - list of methods

PSR-11 compatible writable command loader.

Extends

Package: Joomla\CMS\Console\Loader
Copyright: (C) 2019 Open Source Matters, Inc.
License: GNU General Public License version 2 or later; see LICENSE.txt
Located at: Joomla/Console/Loader/WritableContainerLoader.php
Project: Joomla

Method Summary

public
(\Psr\Container\ContainerInterface $container, array $commandMap)

Constructor.
Parameters
  • \Psr\Container\ContainerInterface $container A container from which to load command services.
  • array $commandMap An array with command names as keys and service IDs as values.
Since
  • 4.0.0
Show source code of this method: __construct Source Code

public void
(string $commandName, string $className)

Adds a command to the loader.
Parameters
  • string $commandName The name of the command to load.
  • string $className The fully qualified class name of the command.
Returns
  • void
Since
  • 4.0.0
Show source code of this method: add Source Code

public \Joomla\Console\Command\AbstractCommand
(string $name)

Loads a command.
Parameters
  • string $name The command to load.
Returns
  • \Joomla\Console\Command\AbstractCommand
Since
  • 4.0.0
-
  • \Symfony\Component\Console\Exception\CommandNotFoundException
Show source code of this method: get Source Code

public string[]
()

Get the names of the registered commands.
Returns
  • string[]
Since
  • 4.0.0
Show source code of this method: getNames Source Code

public bool
(mixed $name)

Checks if a command exists.
Parameters
  • string $name The command to check.
Returns
  • bool
Since
  • 4.0.0
Show source code of this method: has Source Code

Properties Summary

private \Psr\Container\ContainerInterface
$container
The service container.
Since
  • 4.0.0
private string[]
$commandMap
The command name to service ID map.
Since
  • 4.0.0

Tags Summary

Since
4.0.0