Console_Getargs
[ class tree: Console_Getargs ] [ index: Console_Getargs ] [ all elements ]

Class: Console_Getargs_Options

Source Location: /Console_Getargs-1.2.1/Getargs.php

Class Overview


This class implements a wrapper to the command line options and arguments.


Author(s):

Methods


Inherited Variables

Inherited Methods


Class Details

[line 489]
This class implements a wrapper to the command line options and arguments.


[ Top ]


Method Detail

getValue   [line 1011]

array|string|null getValue( string $optname)

Returns the argument of the given option

You can use the short, alias or long version of the option name. This method will try to find the argument(s) of the given option name. If it is not found it will return null. If the arg has more than one argument, an array of arguments will be returned.

  • Return: argument(s) associated with the option
  • Access: public

Parameters:

string   $optname   —  the name of the option

[ Top ]

isDefined   [line 964]

boolean isDefined( string $optname)

Checks whether the given option is defined

An option will be defined if an argument was assigned to it using the command line options. You can use the short, the long or an alias name as parameter.

  • Return: true if the option is defined
  • Access: public

Parameters:

string   $optname   —  the name of the option to be checked

[ Top ]


Documentation generated on Mon, 11 Mar 2019 13:58:50 -0400 by phpDocumentor 1.4.4. PEAR Logo Copyright © PHP Group 2004.