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

  • ArgvArgs
  • DefaultArgsParser
  • StringArgs
  • TokenParser
  • Overview
  • Namespace
  • Class

Class DefaultArgsParser

Default parser for Webmozart\Console\Api\Args\RawArgs instances.

This parser delegates most of the work to Symfony's Symfony\Component\Console\Input\ArgvInput class.

Symfony\Component\Console\Input\ArgvInput
Extended by Webmozart\Console\Args\DefaultArgsParser implements Webmozart\Console\Api\Args\ArgsParser
Namespace: Webmozart\Console\Args
Author: Bernhard Schussek bschussek@gmail.com
Since: 1.0
Located at Args/DefaultArgsParser.php
Methods summary
public
# __construct( )

Creates a new parser.

Creates a new parser.

public Webmozart\Console\Api\Args\Args
# parseArgs( Webmozart\Console\Api\Args\RawArgs $args, Webmozart\Console\Api\Args\Format\ArgsFormat $format, boolean $lenient = false )

Parses the raw console arguments and returns the parsed arguments.

Parses the raw console arguments and returns the parsed arguments.

Parameters

$args
The raw console arguments.
$format
The argument format.
$lenient

Whether the parser should ignore parse errors. If true, the parser will not throw any exceptions when parse errors occur.

Returns

Webmozart\Console\Api\Args\Args
The parsed console arguments.

Throws

Webmozart\Console\Api\Args\CannotParseArgsException
If the arguments cannot be parsed.

Implementation of

Webmozart\Console\Api\Args\ArgsParser::parseArgs()
Webmozart Console API API documentation generated by ApiGen