Permalink
Browse files

Convert PEAR2_Console_CommandLine to namespaces.

  • Loading branch information...
1 parent 105515b commit e19dcb28c79f0cfc4c6826f9de9cecc554ab548c @saltybeagle saltybeagle committed May 11, 2010
Showing with 467 additions and 399 deletions.
  1. +97 −96 src/Console/CommandLine.php
  2. +11 −10 src/Console/CommandLine/Action.php
  3. +8 −4 src/Console/CommandLine/Action/Callback.php
  4. +8 −4 src/Console/CommandLine/Action/Counter.php
  5. +8 −4 src/Console/CommandLine/Action/Help.php
  6. +5 −4 src/Console/CommandLine/Action/List.php
  7. +8 −4 src/Console/CommandLine/Action/Password.php
  8. +8 −4 src/Console/CommandLine/Action/StoreArray.php
  9. +8 −4 src/Console/CommandLine/Action/StoreFalse.php
  10. +10 −6 src/Console/CommandLine/Action/StoreFloat.php
  11. +10 −6 src/Console/CommandLine/Action/StoreInt.php
  12. +8 −4 src/Console/CommandLine/Action/StoreString.php
  13. +8 −4 src/Console/CommandLine/Action/StoreTrue.php
  14. +8 −4 src/Console/CommandLine/Action/Version.php
  15. +7 −6 src/Console/CommandLine/Argument.php
  16. +7 −5 src/Console/CommandLine/Command.php
  17. +7 −6 src/Console/CommandLine/CustomMessageProvider.php
  18. +7 −6 src/Console/CommandLine/Element.php
  19. +11 −10 src/Console/CommandLine/Exception.php
  20. +6 −5 src/Console/CommandLine/MessageProvider.php
  21. +8 −7 src/Console/CommandLine/MessageProvider/Default.php
  22. +24 −20 src/Console/CommandLine/Option.php
  23. +5 −4 src/Console/CommandLine/Outputter.php
  24. +6 −5 src/Console/CommandLine/Outputter/Default.php
  25. +5 −4 src/Console/CommandLine/Renderer.php
  26. +9 −8 src/Console/CommandLine/Renderer/Default.php
  27. +6 −5 src/Console/CommandLine/Result.php
  28. +30 −26 src/Console/CommandLine/XmlParser.php
  29. +7 −7 tests/AllTests.php
  30. +2 −2 tests/console_commandline_accept.phpt
  31. +7 −7 tests/console_commandline_addargument.phpt
  32. +3 −3 tests/console_commandline_addcommand.phpt
  33. +11 −11 tests/console_commandline_addoption.phpt
  34. +2 −2 tests/console_commandline_addoption_errors_1.phpt
  35. +2 −2 tests/console_commandline_addoption_errors_2.phpt
  36. +2 −2 tests/console_commandline_addoption_errors_3.phpt
  37. +2 −2 tests/console_commandline_addoption_errors_4.phpt
  38. +2 −2 tests/console_commandline_addoption_errors_5.phpt
  39. +2 −2 tests/console_commandline_addoption_errors_6.phpt
  40. +2 −2 tests/console_commandline_addoption_errors_7.phpt
  41. +2 −2 tests/console_commandline_fromxmlfile.phpt
  42. +2 −2 tests/console_commandline_fromxmlfile_error.phpt
  43. +2 −2 tests/console_commandline_fromxmlstring.phpt
  44. +2 −2 tests/console_commandline_options_defaults.phpt
  45. +1 −1 tests/console_commandline_parse_1.phpt
  46. +1 −1 tests/console_commandline_parse_10.phpt
  47. +1 −1 tests/console_commandline_parse_11.phpt
  48. +1 −1 tests/console_commandline_parse_12.phpt
  49. +2 −2 tests/console_commandline_parse_13.phpt
  50. +2 −2 tests/console_commandline_parse_14.phpt
  51. +1 −1 tests/console_commandline_parse_15.phpt
  52. +2 −2 tests/console_commandline_parse_16.phpt
  53. +2 −2 tests/console_commandline_parse_17.phpt
  54. +4 −4 tests/console_commandline_parse_18.phpt
  55. +4 −4 tests/console_commandline_parse_19.phpt
  56. +1 −1 tests/console_commandline_parse_2.phpt
  57. +2 −2 tests/console_commandline_parse_20.phpt
  58. +1 −1 tests/console_commandline_parse_21.phpt
  59. +2 −2 tests/console_commandline_parse_22.phpt
  60. +1 −1 tests/console_commandline_parse_23.phpt
  61. +2 −2 tests/console_commandline_parse_24.phpt
  62. +2 −2 tests/console_commandline_parse_25.phpt
  63. +2 −2 tests/console_commandline_parse_26.phpt
  64. +2 −2 tests/console_commandline_parse_27.phpt
  65. +2 −2 tests/console_commandline_parse_28.phpt
  66. +2 −2 tests/console_commandline_parse_29.phpt
  67. +1 −1 tests/console_commandline_parse_3.phpt
  68. +2 −2 tests/console_commandline_parse_4.phpt
  69. +2 −2 tests/console_commandline_parse_5.phpt
  70. +2 −2 tests/console_commandline_parse_6.phpt
  71. +3 −3 tests/console_commandline_parse_7.phpt
  72. +3 −3 tests/console_commandline_parse_8.phpt
  73. +1 −1 tests/console_commandline_parse_9.phpt
  74. +1 −1 tests/console_commandline_webrequest_1.phpt
  75. +1 −1 tests/console_commandline_webrequest_2.phpt
  76. +1 −1 tests/console_commandline_webrequest_3.phpt
  77. +15 −15 tests/tests.inc.php
View

Large diffs are not rendered by default.

Oops, something went wrong.
@@ -3,7 +3,7 @@
/* vim: set expandtab tabstop=4 shiftwidth=4 softtabstop=4: */
/**
- * This file is part of the PEAR2_Console_CommandLine package.
+ * This file is part of the pear2\Console\CommandLine package.
*
* PHP version 5
*
@@ -12,7 +12,7 @@
* http://opensource.org/licenses/mit-license.php
*
* @category Console
- * @package PEAR2_Console_CommandLine
+ * @package pear2\Console\CommandLine
* @author David JEAN LOUIS <izimobil@gmail.com>
* @copyright 2007-2009 David JEAN LOUIS
* @license http://opensource.org/licenses/mit-license.php MIT License
@@ -26,36 +26,37 @@
* Class that represent an option action.
*
* @category Console
- * @package PEAR2_Console_CommandLine
+ * @package pear2\Console\CommandLine
* @author David JEAN LOUIS <izimobil@gmail.com>
* @copyright 2007-2009 David JEAN LOUIS
* @license http://opensource.org/licenses/mit-license.php MIT License
* @version Release: @package_version@
* @link http://pear.php.net/package/Console_CommandLine
* @since Class available since release 0.1.0
*/
-abstract class PEAR2_Console_CommandLine_Action
+namespace pear2\Console\CommandLine;
+abstract class Action
{
// Properties {{{
/**
* A reference to the result instance.
*
- * @var PEAR2_Console_CommandLine_Result $result The result instance
+ * @var pear2\Console\CommandLine_Result $result The result instance
*/
protected $result;
/**
* A reference to the option instance.
*
- * @var PEAR2_Console_CommandLine_Option $option The action option
+ * @var pear2\Console\CommandLine_Option $option The action option
*/
protected $option;
/**
* A reference to the parser instance.
*
- * @var PEAR2_Console_CommandLine $parser The parser
+ * @var pear2\Console\CommandLine $parser The parser
*/
protected $parser;
@@ -65,9 +66,9 @@
/**
* Constructor
*
- * @param PEAR2_Console_CommandLine_Result $result The result instance
- * @param PEAR2_Console_CommandLine_Option $option The action option
- * @param PEAR2_Console_CommandLine $parser The current parser
+ * @param pear2\Console\CommandLine_Result $result The result instance
+ * @param pear2\Console\CommandLine_Option $option The action option
+ * @param pear2\Console\CommandLine $parser The current parser
*
* @return void
*/
@@ -3,7 +3,7 @@
/* vim: set expandtab tabstop=4 shiftwidth=4 softtabstop=4: */
/**
- * This file is part of the PEAR2_Console_CommandLine package.
+ * This file is part of the pear2\Console\CommandLine package.
*
* PHP version 5
*
@@ -12,7 +12,7 @@
* http://opensource.org/licenses/mit-license.php
*
* @category Console
- * @package PEAR2_Console_CommandLine
+ * @package pear2\Console\CommandLine
* @author David JEAN LOUIS <izimobil@gmail.com>
* @copyright 2007-2009 David JEAN LOUIS
* @license http://opensource.org/licenses/mit-license.php MIT License
@@ -46,15 +46,19 @@
* and *must* return the option value.
*
* @category Console
- * @package PEAR2_Console_CommandLine
+ * @package pear2\Console\CommandLine
* @author David JEAN LOUIS <izimobil@gmail.com>
* @copyright 2007-2009 David JEAN LOUIS
* @license http://opensource.org/licenses/mit-license.php MIT License
* @version Release: @package_version@
* @link http://pear.php.net/package/Console_CommandLine
* @since Class available since release 0.1.0
*/
-class PEAR2_Console_CommandLine_Action_Callback extends PEAR2_Console_CommandLine_Action
+namespace pear2\Console\CommandLine\Action;
+
+use pear2\Console\CommandLine;
+
+class Callback extends CommandLine\Action
{
// execute() {{{
@@ -3,7 +3,7 @@
/* vim: set expandtab tabstop=4 shiftwidth=4 softtabstop=4: */
/**
- * This file is part of the PEAR2_Console_CommandLine package.
+ * This file is part of the pear2\Console\CommandLine package.
*
* PHP version 5
*
@@ -12,7 +12,7 @@
* http://opensource.org/licenses/mit-license.php
*
* @category Console
- * @package PEAR2_Console_CommandLine
+ * @package pear2\Console\CommandLine
* @author David JEAN LOUIS <izimobil@gmail.com>
* @copyright 2007-2009 David JEAN LOUIS
* @license http://opensource.org/licenses/mit-license.php MIT License
@@ -49,15 +49,19 @@
* the verbose variable will be set to to 3.
*
* @category Console
- * @package PEAR2_Console_CommandLine
+ * @package pear2\Console\CommandLine
* @author David JEAN LOUIS <izimobil@gmail.com>
* @copyright 2007-2009 David JEAN LOUIS
* @license http://opensource.org/licenses/mit-license.php MIT License
* @version Release: @package_version@
* @link http://pear.php.net/package/Console_CommandLine
* @since Class available since release 0.1.0
*/
-class PEAR2_Console_CommandLine_Action_Counter extends PEAR2_Console_CommandLine_Action
+namespace pear2\Console\CommandLine\Action;
+
+use pear2\Console\CommandLine;
+
+class Counter extends CommandLine\Action
{
// execute() {{{
@@ -3,7 +3,7 @@
/* vim: set expandtab tabstop=4 shiftwidth=4 softtabstop=4: */
/**
- * This file is part of the PEAR2_Console_CommandLine package.
+ * This file is part of the pear2\Console\CommandLine package.
*
* PHP version 5
*
@@ -12,7 +12,7 @@
* http://opensource.org/licenses/mit-license.php
*
* @category Console
- * @package PEAR2_Console_CommandLine
+ * @package pear2\Console\CommandLine
* @author David JEAN LOUIS <izimobil@gmail.com>
* @copyright 2007-2009 David JEAN LOUIS
* @license http://opensource.org/licenses/mit-license.php MIT License
@@ -27,15 +27,19 @@
* help message, telling the user how to use the program.
*
* @category Console
- * @package PEAR2_Console_CommandLine
+ * @package pear2\Console\CommandLine
* @author David JEAN LOUIS <izimobil@gmail.com>
* @copyright 2007-2009 David JEAN LOUIS
* @license http://opensource.org/licenses/mit-license.php MIT License
* @version Release: @package_version@
* @link http://pear.php.net/package/Console_CommandLine
* @since Class available since release 0.1.0
*/
-class PEAR2_Console_CommandLine_Action_Help extends PEAR2_Console_CommandLine_Action
+namespace pear2\Console\CommandLine\Action;
+
+use pear2\Console\CommandLine;
+
+class Help extends CommandLine\Action
{
// execute() {{{
@@ -3,7 +3,7 @@
/* vim: set expandtab tabstop=4 shiftwidth=4 softtabstop=4: */
/**
- * This file is part of the PEAR2_Console_CommandLine package.
+ * This file is part of the pear2\Console\CommandLine package.
*
* PHP version 5
*
@@ -12,7 +12,7 @@
* http://opensource.org/licenses/mit-license.php
*
* @category Console
- * @package PEAR2_Console_CommandLine
+ * @package pear2\Console\CommandLine
* @author David JEAN LOUIS <izimobil@gmail.com>
* @copyright 2007-2009 David JEAN LOUIS
* @license http://opensource.org/licenses/mit-license.php MIT License
@@ -27,15 +27,16 @@
* array as a list.
*
* @category Console
- * @package PEAR2_Console_CommandLine
+ * @package pear2\Console\CommandLine
* @author David JEAN LOUIS <izimobil@gmail.com>
* @copyright 2007-2009 David JEAN LOUIS
* @license http://opensource.org/licenses/mit-license.php MIT License
* @version Release: @package_version@
* @link http://pear.php.net/package/Console_CommandLine
* @since Class available since release 0.1.0
*/
-class PEAR2_Console_CommandLine_Action_List extends PEAR2_Console_CommandLine_Action
+namespace pear2\Console\CommandLine;
+class Action_List extends Action
{
// execute() {{{
@@ -3,7 +3,7 @@
/* vim: set expandtab tabstop=4 shiftwidth=4 softtabstop=4: */
/**
- * This file is part of the PEAR2_Console_CommandLine package.
+ * This file is part of the pear2\Console\CommandLine package.
*
* PHP version 5
*
@@ -12,7 +12,7 @@
* http://opensource.org/licenses/mit-license.php
*
* @category Console
- * @package PEAR2_Console_CommandLine
+ * @package pear2\Console\CommandLine
* @author David JEAN LOUIS <izimobil@gmail.com>
* @copyright 2007-2009 David JEAN LOUIS
* @license http://opensource.org/licenses/mit-license.php MIT License
@@ -28,15 +28,19 @@
* entering it.
*
* @category Console
- * @package PEAR2_Console_CommandLine
+ * @package pear2\Console\CommandLine
* @author David JEAN LOUIS <izimobil@gmail.com>
* @copyright 2007-2009 David JEAN LOUIS
* @license http://opensource.org/licenses/mit-license.php MIT License
* @version Release: @package_version@
* @link http://pear.php.net/package/Console_CommandLine
* @since Class available since release 0.1.0
*/
-class PEAR2_Console_CommandLine_Action_Password extends PEAR2_Console_CommandLine_Action
+namespace pear2\Console\CommandLine\Action;
+
+use pear2\Console\CommandLine;
+
+class Password extends CommandLine\Action
{
// execute() {{{
@@ -3,7 +3,7 @@
/* vim: set expandtab tabstop=4 shiftwidth=4 softtabstop=4: */
/**
- * This file is part of the PEAR2_Console_CommandLine package.
+ * This file is part of the pear2\Console\CommandLine package.
*
* PHP version 5
*
@@ -12,7 +12,7 @@
* http://opensource.org/licenses/mit-license.php
*
* @category Console
- * @package PEAR2_Console_CommandLine
+ * @package pear2\Console\CommandLine
* @author David JEAN LOUIS <izimobil@gmail.com>
* @copyright 2007-2009 David JEAN LOUIS
* @license http://opensource.org/licenses/mit-license.php MIT License
@@ -29,15 +29,19 @@
* the result option array entry.
*
* @category Console
- * @package PEAR2_Console_CommandLine
+ * @package pear2\Console\CommandLine
* @author David JEAN LOUIS <izimobil@gmail.com>
* @copyright 2007-2009 David JEAN LOUIS
* @license http://opensource.org/licenses/mit-license.php MIT License
* @version Release: @package_version@
* @link http://pear.php.net/package/Console_CommandLine
* @since Class available since release 0.1.0
*/
-class PEAR2_Console_CommandLine_Action_StoreArray extends PEAR2_Console_CommandLine_Action
+namespace pear2\Console\CommandLine\Action;
+
+use pear2\Console\CommandLine;
+
+class StoreArray extends CommandLine\Action
{
// Protected properties {{{
@@ -3,7 +3,7 @@
/* vim: set expandtab tabstop=4 shiftwidth=4 softtabstop=4: */
/**
- * This file is part of the PEAR2_Console_CommandLine package.
+ * This file is part of the pear2\Console\CommandLine package.
*
* PHP version 5
*
@@ -12,7 +12,7 @@
* http://opensource.org/licenses/mit-license.php
*
* @category Console
- * @package PEAR2_Console_CommandLine
+ * @package pear2\Console\CommandLine
* @author David JEAN LOUIS <izimobil@gmail.com>
* @copyright 2007-2009 David JEAN LOUIS
* @license http://opensource.org/licenses/mit-license.php MIT License
@@ -30,15 +30,19 @@
* command line entered by the user).
*
* @category Console
- * @package PEAR2_Console_CommandLine
+ * @package pear2\Console\CommandLine
* @author David JEAN LOUIS <izimobil@gmail.com>
* @copyright 2007-2009 David JEAN LOUIS
* @license http://opensource.org/licenses/mit-license.php MIT License
* @version Release: @package_version@
* @link http://pear.php.net/package/Console_CommandLine
* @since Class available since release 0.1.0
*/
-class PEAR2_Console_CommandLine_Action_StoreFalse extends PEAR2_Console_CommandLine_Action
+namespace pear2\Console\CommandLine\Action;
+
+use pear2\Console\CommandLine;
+
+class StoreFalse extends CommandLine\Action
{
// execute() {{{
Oops, something went wrong.

0 comments on commit e19dcb2

Please sign in to comment.