symfony API

sfCommandArgument Class

You are currently browsing
the website for symfony 1

Visit the Symfony2 website


« Back to API menu

1.4 API OpenSearch

Packages

You are currently browsing the symfony API for the 1.4 version. Switch to:

Represents a command line argument.

Method Summary

  • mixed getDefault()
    Returns the default value.
  • string getHelp()
    Returns the help text.
  • string getName()
    Returns the argument name.
  • Boolean isArray()
    Returns true if the argument can take multiple values.
  • Boolean isRequired()
    Returns true if the argument is required.
  • setDefault($default)
    Sets the default value.
  • __construct($name, $mode, $help, $default)
    Constructor.

Method Details

  • (mixed) getDefault () Browse code

    Returns the default value.

    returns The default value

  • (string) getHelp () Browse code

    Returns the help text.

    returns The help text

  • (string) getName () Browse code

    Returns the argument name.

    returns The argument name

  • (Boolean) isArray () Browse code

    Returns true if the argument can take multiple values.

    returns true if mode is self::IS_ARRAY, false otherwise

  • (Boolean) isRequired () Browse code

    Returns true if the argument is required.

    returns true if parameter mode is self::REQUIRED, false otherwise

  • setDefault ($default) Browse code

    $default The default value

    Sets the default value.

  • __construct ($name, $mode, $help, $default) Browse code

    $name The argument name
    $mode The argument mode: self::REQUIRED or self::OPTIONAL
    $help A help text
    $default The default value (for self::OPTIONAL mode only)

    Constructor.