symfony API

sfCommandOptionSet 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:

Represent a set of command line options.

Method Summary

  • __construct($options = array())
    Constructor.
  • string shortcutToName($shortcut)
    Returns the option name given a shortcut.
  • array getOptions()
    Gets the array of sfCommandOption objects.
  • Boolean hasShortcut($name)
    Returns true if an option object exists by shortcut.
  • getOption($name)
    Returns an option by name.
  • setOptions($options = array())
    Sets the sfCommandOption objects.
  • array getDefaults()
    Gets an array of default values.
  • addOption($option)
    Add a sfCommandOption objects.
  • Boolean hasOption($name)
    Returns true if an option object exists by name.
  • addOptions($options = array())
    Add an array of sfCommandOption objects.
  • getOptionForShortcut($shortcut)
    Gets an option by shortcut.

Method Details

  • __construct ($options = array())

    $options An array of sfCommandOption objects

    Constructor.

  • (string) shortcutToName ($shortcut)

    $shortcut The shortcut

    Returns the option name given a shortcut.

    returns The option name

  • (array) getOptions ()

    Gets the array of sfCommandOption objects.

    returns An array of sfCommandOption objects

  • (Boolean) hasShortcut ($name)

    $name The option shortcut

    Returns true if an option object exists by shortcut.

    returns true if the option object exists, false otherwise

  • getOption ($name)

    $name The option name

    Returns an option by name.

    returns A sfCommandOption object

  • setOptions ($options = array())

    $options An array of sfCommandOption objects

    Sets the sfCommandOption objects.

  • (array) getDefaults ()

    Gets an array of default values.

    returns An array of all default values

  • addOption ($option)

    $option A sfCommandOption object

    Add a sfCommandOption objects.

  • (Boolean) hasOption ($name)

    $name The option name

    Returns true if an option object exists by name.

    returns true if the option object exists, false otherwise

  • addOptions ($options = array())

    $options An array of sfCommandOption objects

    Add an array of sfCommandOption objects.

  • getOptionForShortcut ($shortcut)

    Gets an option by shortcut.

    returns A sfCommandOption object