Overview

Namespaces

  • Webmozart
    • Console
      • Adapter
      • Api
        • Application
        • Args
          • Format
        • Command
        • Config
        • Event
        • Formatter
        • IO
        • Resolver
      • Args
      • Config
      • Formatter
      • Handler
        • Help
      • IO
        • InputStream
        • OutputStream
      • Process
      • Resolver
      • UI
        • Alignment
        • Component
        • Help
        • Layout
        • Style
      • Util

Classes

  • Command
  • CommandCollection

Exceptions

  • CannotAddCommandException
  • NoSuchCommandException
  • Overview
  • Namespace
  • Class

Class CannotAddCommandException

Thrown when two commands have the same name.

Exception
Extended by RuntimeException
Extended by Webmozart\Console\Api\Command\CannotAddCommandException
Namespace: Webmozart\Console\Api\Command
Author: Bernhard Schussek bschussek@gmail.com
Since: 1.0
Located at Api/Command/CannotAddCommandException.php
Methods summary
public static static
# nameExists( string $name, Exception $cause = null )

Creates an exception for the code Webmozart\Console\Api\Command\CannotAddCommandException::NAME_EXISTS.

Creates an exception for the code Webmozart\Console\Api\Command\CannotAddCommandException::NAME_EXISTS.

Parameters

$name
The command name.
$cause
The exception that caused this exception.

Returns

static
The created exception.
public static static
# optionExists( string $name, Exception $cause = null )

Creates an exception for the code Webmozart\Console\Api\Command\CannotAddCommandException::OPTION_EXISTS.

Creates an exception for the code Webmozart\Console\Api\Command\CannotAddCommandException::OPTION_EXISTS.

Parameters

$name
The command name.
$cause
The exception that caused this exception.

Returns

static
The created exception.
public static static
# nameEmpty( Exception $cause = null )

Creates an exception for the code Webmozart\Console\Api\Command\CannotAddCommandException::NAME_EMPTY.

Creates an exception for the code Webmozart\Console\Api\Command\CannotAddCommandException::NAME_EMPTY.

Parameters

$cause
The exception that caused this exception.

Returns

static
The created exception.
Methods inherited from Exception
__construct(), __toString(), getCode(), getFile(), getLine(), getMessage(), getPrevious(), getTrace(), getTraceAsString()
Constants summary
integer NAME_EXISTS

Code: A command with the same name exists.

Code: A command with the same name exists.

# 1
integer OPTION_EXISTS

Code: An option with the same name exists.

Code: An option with the same name exists.

# 2
integer NAME_EMPTY

Code: The command name is empty.

Code: The command name is empty.

# 3
Properties inherited from Exception
$code, $file, $line, $message
Webmozart Console API API documentation generated by ApiGen