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

  • Args

Interfaces

  • ArgsParser
  • RawArgs

Exceptions

  • CannotAddArgumentException
  • CannotAddOptionException
  • CannotParseArgsException
  • NoSuchArgumentException
  • NoSuchOptionException
  • Overview
  • Namespace
  • Class

Class CannotAddArgumentException

Thrown when an argument cannot be added.

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

Creates an exception with code Webmozart\Console\Api\Args\CannotAddArgumentException::EXISTS_ALREADY.

Creates an exception with code Webmozart\Console\Api\Args\CannotAddArgumentException::EXISTS_ALREADY.

Parameters

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

Returns

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

Creates an exception with code ADD_AFTER_MULTI_VALUED.

Creates an exception with code ADD_AFTER_MULTI_VALUED.

Parameters

$cause
The exception that caused this exception.

Returns

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

Creates an exception with code ADD_REQUIRED_AFTER_OPTIONAL.

Creates an exception with code ADD_REQUIRED_AFTER_OPTIONAL.

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 EXISTS_ALREADY

Code: The argument exists already.

Code: The argument exists already.

# 1
integer MULTI_VALUED_EXISTS

Code: An argument was added after a multi-valued argument.

Code: An argument was added after a multi-valued argument.

# 2
integer REQUIRED_AFTER_OPTIONAL

Code: A required argument was added after an optional argument.

Code: A required argument was added after an optional argument.

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