symfony API

sfCommandManager Class

You are currently browsing
the website for symfony 1

Visit the Symfony2 website


« Back to API menu

1.2 API OpenSearch

Packages

You are currently browsing the symfony API for the 1.2 version. Switch to:
This version of symfony is not maintained anymore.
If some of your projects still use this version, consider upgrading as soon as possible.

Class to manage command line arguments and options.

Method Summary

Method Details

  • getArgumentSet () Browse code

    Gets the argument set.

    returns A sfCommandArgumentSet object

  • (mixed) getArgumentValue ($name) Browse code

    $name The argument name

    Returns the argument value for a given argument name.

    returns The argument value

  • (array) getArgumentValues () Browse code

    Returns the argument values.

    returns An array of argument values

  • (array) getErrors () Browse code

    Gets the current errors.

    returns An array of errors

  • getOptionSet () Browse code

    Gets the option set.

    returns A sfCommandOptionSet object

  • (mixed) getOptionValue ($name) Browse code

    $name The option name

    Returns the option value for a given option name.

    returns The option value

  • (array) getOptionValues () Browse code

    Returns the options values.

    returns An array of option values

  • isValid () Browse code

    Returns true if the current command line options validate the argument and option sets.

    returns if there are some validation errors, false otherwise

  • parseLongOption ($argument) Browse code

    $argument The option argument

    Parses a long option.

  • parseShortOption ($argument) Browse code

    $argument The option argument

    Parses a short option.

  • process ($arguments = null) Browse code

    $arguments A string or an array of command line parameters

    Processes command line arguments.

  • setArgumentSet ($argumentSet) Browse code

    $argumentSet A sfCommandArgumentSet object

    Sets the argument set.

  • setOption ($option, $value) Browse code

    $option
    $value

  • setOptionSet ($optionSet) Browse code

    $optionSet A sfCommandOptionSet object

    Sets the option set.

  • __construct ($argumentSet = null, $optionSet = null) Browse code

    $argumentSet A sfCommandArgumentSet object
    $optionSet A setOptionSet object

    Constructor.