symfony API

sfCommandManager Class

« Back to API menu

action

addon

autoload

cache

command

config

controller

creole

database

debug

exception

filter

form

generator

helper

i18n

log

plugin

propel

request

response

routing

storage

task

test

user

util

validator

view

widget

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

Class to manage command line arguments and options.

Method Summary

Method Details

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

    $argumentSet A sfCommandArgumentSet object
    $optionSet A setOptionSet object

    Constructor.

  • (array) getErrors ()

    Gets the current errors.

    returns An array of errors

  • (array) getArgumentValues ()

    Returns the argument values.

    returns An array of argument values

  • process ($arguments = null)

    $arguments A string or an array of command line parameters

    Processes command line arguments.

  • (mixed) getArgumentValue ($name)

    $name The argument name

    Returns the argument value for a given argument name.

    returns The argument value

  • setArgumentSet ($argumentSet)

    $argumentSet A sfCommandArgumentSet object

    Sets the argument set.

  • setOptionSet ($optionSet)

    $optionSet A sfCommandOptionSet object

    Sets the option set.

  • getOptionSet ()

    Gets the option set.

    returns A sfCommandOptionSet object

  • isValid ()

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

    returns if there are some validation errors, false otherwise

  • parseShortOption ($argument)

    $argument The option argument

    Parses a short option.

  • (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

  • getArgumentSet ()

    Gets the argument set.

    returns A sfCommandArgumentSet object

  • parseLongOption ($argument)

    $argument The option argument

    Parses a long option.

  • setOption ($option, $value)