- Queries
- All Atoms
- Search
- Advanced Search
Diviner All Atoms
All Atoms
All Atoms
- Parse and execute workflows, raising a user-friendly error if anything remains. See also @{method:parseWorkflowsFull}.
- Method
- Parse and consume a list of arguments, raising a user-friendly error if anything remains. See also @{method:parseFull} and @{method:parsePartial}.
- Method
- Parse and consume a list of arguments, throwing an exception if there is anything left unconsumed. This is like @{method:parsePartial}, but raises a {class:PhutilArgumentUsageException} if there are leftovers.
- Method
- Method
- Parse and consume a list of arguments, removing them from the argument vector but leaving unparsed arguments for later consumption. You can retrieve unconsumed arguments directly with @{method:getUnconsumedArgumentVector}. Doing a partial parse can make it easier to share common flags across scripts or workflows.
- Method
- Build a new parser. Generally, you start a script with:
- Method
- Method
- Method
- Method
- Method
- Method
- Used with @{class:PhutilArgumentParser} to build command line tools which operate in several modes, called "workflows", like `git`, `svn`, `arc`, `apt-get`. For example, you might build a simple calculator like this:
- Class
- Normally, workflow arguments are parsed fully, so unexpected arguments will raise an error. You can return `true` from this method to parse workflow arguments only partially. This will allow you to manually parse remaining arguments or delegate to a second level of workflows.
- Method
- Method
- Method
- Method
- Method
- Method
- Method
- Method
- Provide a full explanation of the command. This text is shown only in detailed help.
- Method
- Method
- Provide a brief description of the command, like "Delete a file.".
- Method
- Method
- Provide brief usage examples of common calling conventions, like:
- Method
- Method
- Method
- Method
- Method
- Method
- Method
- Method
- Method
- Method
- Method
- Method
- Method
- Method
- Method
- Method
- Method
- Method
- Method
- Method
- Method
- Method
- Method
- Method
- Method
- Method
- Method
- Method
- Method
- Method
- Method
- Method
- Method
- Method
- Method
- Method
- Method
- Method
- Method