symfony API

sfCommandManager Class

You are currently browsing
the website for symfony 1

Visit the Symfony2 website

« Back to API menu


You are currently browsing the symfony API for the 1.4 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

  • (sfCommandArgumentSet) getArgumentSet ()

    Gets the argument set.

    returns A sfCommandArgumentSet object

  • (mixed) getArgumentValue ($name)

    $name The argument name

    Returns the argument value for a given argument name.

    returns The argument value

  • (array) getArgumentValues ()

    Returns the argument values.

    returns An array of argument values

  • (array) getErrors ()

    Gets the current errors.

    returns An array of errors

  • (sfCommandOptionSet) getOptionSet ()

    Gets the option set.

    returns A sfCommandOptionSet object

  • (mixed) getOptionValue ($name)

    $name The option name

    Returns the option value for a given option name.

    returns The option value

  • (array) getOptionValues ()

    Returns the options values.

    returns An array of option values

  • (true) isValid ()

    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)

    $argument The option argument

    Parses a long option.

  • parseShortOption ($argument)

    $argument The option argument

    Parses a short option.

  • process ($arguments)

    $arguments A string or an array of command line parameters

    Processes command line arguments.

  • setArgumentSet ($argumentSet)

    $argumentSet A sfCommandArgumentSet object

    Sets the argument set.

  • setOption ()

  • setOptionSet ($optionSet)

    $optionSet A sfCommandOptionSet object

    Sets the option set.

  • __construct ($argumentSet, $optionSet)

    $argumentSet A sfCommandArgumentSet object
    $optionSet A setOptionSet object