Overview

Namespaces

  • PHP
  • PhpOptions
    • Types

Classes

  • Arguments
  • Option
  • Options

Exceptions

  • InvalidArgumentException
  • LogicException
  • UserBadCallException
  • Overview
  • Namespace
  • Class
  • Tree
  • Todo

Class Arguments

Static class for getting options and argumets from command-line.

Namespace: PhpOptions
Author: Viktor Mašíček <viktor@masicek.net>
Located at Arguments.php
Methods summary
public static array
# options( )
Return array of options with their values in command-line. Options are prepared for better work. <pre> --abc="xxx" => ('abc' => 'xxx') --abc ="xxx" => ('abc' => 'xxx') --abc "xxx" => ('abc' => 'xxx') -abc="xxx" => ('a' => TRUE, 'b' => TRUE, 'c' => 'xxx') -abc "xxx" => ('a' => TRUE, 'b' => TRUE, 'c' => 'xxx') -abc ="xxx" => ('a' => TRUE, 'b' => TRUE, 'c' => 'xxx') -a -bc ="xxx" => ('a' => TRUE, 'b' => TRUE, 'c' => 'xxx') </pre>

Return array of options with their values in command-line. Options are prepared for better work.

--abc="xxx" => ('abc' => 'xxx')
--abc ="xxx" => ('abc' => 'xxx')
--abc "xxx" => ('abc' => 'xxx')
-abc="xxx" => ('a' => TRUE, 'b' => TRUE, 'c' => 'xxx')
-abc "xxx" => ('a' => TRUE, 'b' => TRUE, 'c' => 'xxx')
-abc ="xxx" => ('a' => TRUE, 'b' => TRUE, 'c' => 'xxx')
-a -bc ="xxx" => ('a' => TRUE, 'b' => TRUE, 'c' => 'xxx')

Returns

array
([option] => [value], ...)
public static array
# getArguments( )
Return array of arguments in command-line.

Return array of arguments in command-line.

Returns

array
PhpOptions API documentation generated by ApiGen.
Generated using the TokenReflection library.