You are here

class CustomDefaultCommandApplication in Zircon Profile 8

Same name and namespace in other branches
  1. 8.0 vendor/symfony/console/Tests/ApplicationTest.php \Symfony\Component\Console\Tests\CustomDefaultCommandApplication

Hierarchy

Expanded class hierarchy of CustomDefaultCommandApplication

File

vendor/symfony/console/Tests/ApplicationTest.php, line 1047

Namespace

Symfony\Component\Console\Tests
View source
class CustomDefaultCommandApplication extends Application {

  /**
   * Overwrites the constructor in order to set a different default command.
   */
  public function __construct() {
    parent::__construct();
    $command = new \FooCommand();
    $this
      ->add($command);
    $this
      ->setDefaultCommand($command
      ->getName());
  }

}

Members

Namesort descending Modifiers Type Description Overrides
Application::$autoExit private property
Application::$catchExceptions private property
Application::$commands private property
Application::$defaultCommand private property
Application::$definition private property
Application::$dispatcher private property
Application::$helperSet private property
Application::$name private property
Application::$runningCommand private property
Application::$terminalDimensions private property
Application::$version private property
Application::$wantHelps private property
Application::add public function Adds a command object.
Application::addCommands public function Adds an array of command objects.
Application::all public function Gets the commands (registered in the given namespace if provided).
Application::asText Deprecated public function Returns a text representation of the Application.
Application::asXml Deprecated public function Returns an XML representation of the Application.
Application::configureIO protected function Configures the input and output instances based on the user arguments and options.
Application::doRun public function Runs the current application.
Application::doRunCommand protected function Runs the current command.
Application::extractAllNamespaces private function Returns all namespaces of the command name.
Application::extractNamespace public function Returns the namespace part of the command name.
Application::find public function Finds a command by name or alias.
Application::findAlternatives private function Finds alternative of $name among $collection, if nothing is found in $collection, try in $abbrevs.
Application::findNamespace public function Finds a registered namespace by a name or an abbreviation.
Application::get public function Returns a registered command by name or alias.
Application::getAbbreviations public static function Returns an array of possible abbreviations given a set of names.
Application::getAbbreviationSuggestions private function Returns abbreviated suggestions in string format.
Application::getCommandName protected function Gets the name of the command based on input. 2
Application::getConsoleMode private function Runs and parses mode CON if it's available, suppressing any error output.
Application::getDefaultCommands protected function Gets the default commands that should always be available. 3
Application::getDefaultHelperSet protected function Gets the default helper set with the helpers that should always be available. 1
Application::getDefaultInputDefinition protected function Gets the default input definition. 1
Application::getDefinition public function Gets the InputDefinition related to this Application. 2
Application::getHelp public function Gets the help message.
Application::getHelperSet public function Get the helper set associated with the command.
Application::getLongVersion public function Returns the long version of the application.
Application::getName public function Gets the name of the application.
Application::getNamespaces public function Returns an array of all unique namespaces used by currently registered commands.
Application::getSttyColumns private function Runs and parses stty -a if it's available, suppressing any error output.
Application::getTerminalDimensions public function Tries to figure out the terminal dimensions based on the current environment.
Application::getTerminalHeight protected function Tries to figure out the terminal height in which this application runs.
Application::getTerminalWidth protected function Tries to figure out the terminal width in which this application runs.
Application::getVersion public function Gets the application version.
Application::has public function Returns true if the command exists, false otherwise.
Application::register public function Registers a new command.
Application::renderException public function Renders a caught exception.
Application::run public function Runs the current application.
Application::setAutoExit public function Sets whether to automatically exit after a command execution or not.
Application::setCatchExceptions public function Sets whether to catch exceptions or not during commands execution.
Application::setDefaultCommand public function Sets the default Command name.
Application::setDefinition public function Set an input definition set to be used with this application.
Application::setDispatcher public function
Application::setHelperSet public function Set a helper set to be used with the command.
Application::setName public function Sets the application name.
Application::setTerminalDimensions public function Sets terminal dimensions.
Application::setVersion public function Sets the application version.
Application::splitStringByWidth private function
Application::stringWidth private function
CustomDefaultCommandApplication::__construct public function Overwrites the constructor in order to set a different default command. Overrides Application::__construct