=========================================================== .___ __ __ _________________ __ __ __| _/|__|/ |_ / ___\_` __ \__ \ | | \/ __ | | \\_ __\ / /_/ > | \// __ \| | / /_/ | | || | \___ /|__| (____ /____/\____ | |__||__| /_____/ \/ \/ grep rough audit - static analysis tool v2.8 written by @Wireghoul =================================[justanotherhacker.com]=== php-horde-argv-2.1.0/Horde_Argv-2.1.0/doc/Horde/Argv/ADVANCED-326- php-horde-argv-2.1.0/Horde_Argv-2.1.0/doc/Horde/Argv/ADVANCED:327::``boolean hasOption(string $opt_str)``: Given an option string such as php-horde-argv-2.1.0/Horde_Argv-2.1.0/doc/Horde/Argv/ADVANCED-328- "-q" or "--verbose", returns ``true`` if the ``Horde_Argv_Parser`` has an option php-horde-argv-2.1.0/Horde_Argv-2.1.0/doc/Horde/Argv/ADVANCED-329- with that option string. php-horde-argv-2.1.0/Horde_Argv-2.1.0/doc/Horde/Argv/ADVANCED:330::``Horde_Argv_Option getOption(string $opt_str)``: Returns the php-horde-argv-2.1.0/Horde_Argv-2.1.0/doc/Horde/Argv/ADVANCED-331- ``Horde_Argv_Option`` instance that implements the supplied option string, or php-horde-argv-2.1.0/Horde_Argv-2.1.0/doc/Horde/Argv/ADVANCED-332- ``null`` if no options implement it. php-horde-argv-2.1.0/Horde_Argv-2.1.0/doc/Horde/Argv/ADVANCED:333::``removeOption(string $opt_str)``: If the ``Horde_Argv_Parser`` php-horde-argv-2.1.0/Horde_Argv-2.1.0/doc/Horde/Argv/ADVANCED:334: has an option corresponding to ``$opt_str``, that option is removed. If that php-horde-argv-2.1.0/Horde_Argv-2.1.0/doc/Horde/Argv/ADVANCED-335- option provided any other option strings, all of those option strings become php-horde-argv-2.1.0/Horde_Argv-2.1.0/doc/Horde/Argv/ADVANCED:336: invalid. If ``$opt_str`` does not occur in any option belonging to this php-horde-argv-2.1.0/Horde_Argv-2.1.0/doc/Horde/Argv/ADVANCED-337- ``Horde_Argv_Parser``, throws ``InvalidArgumentException``. ############################################## php-horde-argv-2.1.0/Horde_Argv-2.1.0/doc/Horde/Argv/CALLBACKS-63- php-horde-argv-2.1.0/Horde_Argv-2.1.0/doc/Horde/Argv/CALLBACKS:64::``$option``: is the ``Horde_Argv_Option`` instance that's calling the callback php-horde-argv-2.1.0/Horde_Argv-2.1.0/doc/Horde/Argv/CALLBACKS:65::``$opt``: is the option string seen on the command-line that's triggering the php-horde-argv-2.1.0/Horde_Argv-2.1.0/doc/Horde/Argv/CALLBACKS:66: callback. (If an abbreviated long option was used, ``$opt`` will be the full, php-horde-argv-2.1.0/Horde_Argv-2.1.0/doc/Horde/Argv/CALLBACKS-67- canonical option string -- e.g. if the user puts "--foo" on the command-line as php-horde-argv-2.1.0/Horde_Argv-2.1.0/doc/Horde/Argv/CALLBACKS:68: an abbreviation for "--foobar", then ``$opt`` will be "--foobar".) php-horde-argv-2.1.0/Horde_Argv-2.1.0/doc/Horde/Argv/CALLBACKS:69::``$value``: is the argument to this option seen on the command-line. php-horde-argv-2.1.0/Horde_Argv-2.1.0/doc/Horde/Argv/CALLBACKS-70- *Horde_Argv* will only expect an argument if ``type`` is set; the type of php-horde-argv-2.1.0/Horde_Argv-2.1.0/doc/Horde/Argv/CALLBACKS:71: ``$value`` will be the type implied by the option's type (see "Option types" php-horde-argv-2.1.0/Horde_Argv-2.1.0/doc/Horde/Argv/CALLBACKS-72- below). If ``type`` for this option is ``null`` (no argument expected), then php-horde-argv-2.1.0/Horde_Argv-2.1.0/doc/Horde/Argv/CALLBACKS:73: ``$value`` will be ``null``. If ``nargs`` > 1, ``$value`` will be an array of php-horde-argv-2.1.0/Horde_Argv-2.1.0/doc/Horde/Argv/CALLBACKS-74- values of the appropriate type. php-horde-argv-2.1.0/Horde_Argv-2.1.0/doc/Horde/Argv/CALLBACKS:75::``$parser``: is the ``Horde_Argv_Parser`` instance driving the whole thing, php-horde-argv-2.1.0/Horde_Argv-2.1.0/doc/Horde/Argv/CALLBACKS-76- mainly useful because you can access some other interesting data through it, as ############################################## php-horde-argv-2.1.0/Horde_Argv-2.1.0/doc/Horde/Argv/CALLBACKS-78- php-horde-argv-2.1.0/Horde_Argv-2.1.0/doc/Horde/Argv/CALLBACKS:79: : ``$parser->largs`` : the current list of leftover arguments, ie. arguments that have been consumed but are neither options nor option arguments. Feel free to modify ``$parser->largs``, e.g. by adding more arguments to it. (This list will become ``$args``, the second return value of ``parseArgs()``.) php-horde-argv-2.1.0/Horde_Argv-2.1.0/doc/Horde/Argv/CALLBACKS:80: : ``$parser->rargs`` : the current list of remaining arguments, ie. with ``$opt`` and ``$value`` (if applicable) removed, and only the arguments following them still there. Feel free to modify ``$parser->rargs``, e.g. by consuming more arguments. php-horde-argv-2.1.0/Horde_Argv-2.1.0/doc/Horde/Argv/CALLBACKS:81: : ``$parser->values`` : the object where option values are by default stored (an instance of ``Horde_Argv_Values``). This lets callbacks use the same mechanism as the rest of *Horde_Argv* for storing option values; you don't need to mess around with globals or closures. You can also access or modify the value(s) of any options already encountered on the command-line. php-horde-argv-2.1.0/Horde_Argv-2.1.0/doc/Horde/Argv/CALLBACKS:82::``$args``: is a tuple of arbitrary positional arguments supplied via the php-horde-argv-2.1.0/Horde_Argv-2.1.0/doc/Horde/Argv/CALLBACKS-83- ``callback_args`` option attribute. php-horde-argv-2.1.0/Horde_Argv-2.1.0/doc/Horde/Argv/CALLBACKS:84::``$kwargs``: is a dictionary of arbitrary keyword arguments supplied via php-horde-argv-2.1.0/Horde_Argv-2.1.0/doc/Horde/Argv/CALLBACKS-85- ``callback_kwargs``. ############################################## php-horde-argv-2.1.0/Horde_Argv-2.1.0/doc/Horde/Argv/EXTEND-13- php-horde-argv-2.1.0/Horde_Argv-2.1.0/doc/Horde/Argv/EXTEND:14:To add new types, you need to define your own subclass of the ``Horde_Argv_Option class``. This class has a couple of properties that define *Horde_Argv*'s types: ``$TYPES`` and ``$TYPE_CHECKER``. php-horde-argv-2.1.0/Horde_Argv-2.1.0/doc/Horde/Argv/EXTEND-15- php-horde-argv-2.1.0/Horde_Argv-2.1.0/doc/Horde/Argv/EXTEND:16:``$TYPES`` is a tuple of type names; in your subclass, simply define a new tuple ``$TYPES`` that builds on the standard one. php-horde-argv-2.1.0/Horde_Argv-2.1.0/doc/Horde/Argv/EXTEND-17- php-horde-argv-2.1.0/Horde_Argv-2.1.0/doc/Horde/Argv/EXTEND:18:``$TYPE_CHECKER`` is a dictionary mapping type names to type-checking functions. A type-checking function has the following signature: php-horde-argv-2.1.0/Horde_Argv-2.1.0/doc/Horde/Argv/EXTEND-19- ############################################## php-horde-argv-2.1.0/Horde_Argv-2.1.0/doc/Horde/Argv/EXTEND-23- php-horde-argv-2.1.0/Horde_Argv-2.1.0/doc/Horde/Argv/EXTEND:24:You can name it whatever you like, and make it return any type you like (e.g. the hypothetical type foo). The value returned by a type-checking function will wind up in the ``Horde_Argv_Values`` instance returned by ``Horde_Argv_Parser->parseArgs()``, or be passed to callbacks as the ``$value`` parameter. php-horde-argv-2.1.0/Horde_Argv-2.1.0/doc/Horde/Argv/EXTEND-25- ############################################## php-horde-argv-2.1.0/Horde_Argv-2.1.0/doc/Horde/Argv/EXTEND-29- php-horde-argv-2.1.0/Horde_Argv-2.1.0/doc/Horde/Argv/EXTEND:30:You need to define your type-checker, since it's referred to in the ``$TYPE_CHECKER`` class attribute of your ``Horde_Argv_Option`` subclass: php-horde-argv-2.1.0/Horde_Argv-2.1.0/doc/Horde/Argv/EXTEND-31- ############################################## php-horde-argv-2.1.0/Horde_Argv-2.1.0/doc/Horde/Argv/EXTEND-89- php-horde-argv-2.1.0/Horde_Argv-2.1.0/doc/Horde/Argv/EXTEND:90::``$ACTIONS``: all actions must be listed in ``$ACTIONS`` php-horde-argv-2.1.0/Horde_Argv-2.1.0/doc/Horde/Argv/EXTEND:91::``$STORE_ACTIONS``: "store" actions are additionally listed here php-horde-argv-2.1.0/Horde_Argv-2.1.0/doc/Horde/Argv/EXTEND:92::``$TYPED_ACTIONS``: "typed" actions are additionally listed here php-horde-argv-2.1.0/Horde_Argv-2.1.0/doc/Horde/Argv/EXTEND-93- ############################################## php-horde-argv-2.1.0/Horde_Argv-2.1.0/doc/Horde/Argv/EXTEND-134- php-horde-argv-2.1.0/Horde_Argv-2.1.0/doc/Horde/Argv/EXTEND:135:* ``extend`` both expects a value on the command-line and stores that value somewhere, so it goes in both ``$STORE_ACTIONS`` and ``$TYPED_ACTIONS`` php-horde-argv-2.1.0/Horde_Argv-2.1.0/doc/Horde/Argv/EXTEND-136-* ``MyOption::takeAction()`` implements just this one new action, and passes control back to ``Horde_Argv_Option::takeAction()`` for the standard *Horde_Argv* actions php-horde-argv-2.1.0/Horde_Argv-2.1.0/doc/Horde/Argv/EXTEND:137:* ``$values`` is an instance of the ``Horde_Argv_Values`` class, which provides the very useful ``ensureValue()`` method. ``ensureValue()`` is essentially a getter with a safety valve; it is called as php-horde-argv-2.1.0/Horde_Argv-2.1.0/doc/Horde/Argv/EXTEND-138- php-horde-argv-2.1.0/Horde_Argv-2.1.0/doc/Horde/Argv/EXTEND:139: ``$values->ensureValue($attr, $value)`` php-horde-argv-2.1.0/Horde_Argv-2.1.0/doc/Horde/Argv/EXTEND:140: If the ``$attr`` property of ``$values`` doesn't exist or is ``null``, then ``ensureValue()`` first sets it to ``$value``, and then returns ``$value``. This is very handy for actions like ``extend``, ``append``, and ``count``, all of which accumulate data in a variable and expect that variable to be of a certain type (an array for the first two, an integer for the latter). Using ``ensureValue()`` means that scripts using your action don't have to worry about setting a default value for the option destinations in question; they can just leave the default as ``null`` and ``ensureValue()`` will take care of getting it right when it's needed. php-horde-argv-2.1.0/Horde_Argv-2.1.0/doc/Horde/Argv/EXTEND-141- ############################################## php-horde-argv-2.1.0/Horde_Argv-2.1.0/doc/Horde/Argv/README-88- php-horde-argv-2.1.0/Horde_Argv-2.1.0/doc/Horde/Argv/README:89:When *Horde_Argv* sees the "-f", it consumes the next argument, "foo.txt", and stores it in $values->filename, where values is the first return value from ``parseArgs()``. So, after this call to ``parseArgs()``, ``$values->filename`` is "foo.txt". php-horde-argv-2.1.0/Horde_Argv-2.1.0/doc/Horde/Argv/README-90- ############################################## php-horde-argv-2.1.0/Horde_Argv-2.1.0/doc/Horde/Argv/README-217- php-horde-argv-2.1.0/Horde_Argv-2.1.0/doc/Horde/Argv/README:218:If *Horde_Argv* encounters either '-h' or '--help' on the command-line, or if you just call ``$parser->printHelp()``, it prints the following to stdout: php-horde-argv-2.1.0/Horde_Argv-2.1.0/doc/Horde/Argv/README-219- ############################################## php-horde-argv-2.1.0/Horde_Argv-2.1.0/doc/Horde/Argv/README-236- php-horde-argv-2.1.0/Horde_Argv-2.1.0/doc/Horde/Argv/README:237: ``$usage = 'usage: %prog [options] arg1 arg2';`` php-horde-argv-2.1.0/Horde_Argv-2.1.0/doc/Horde/Argv/README-238- *Horde_Argv* expands "%prog" in the usage string to the name of the current script, i.e. basename($_SERVER['argv'][0]). The expanded string is then printed before the detailed option help.