Updated PEAR and PEAR packages.
[timetracker.git] / WEB-INF / lib / pear / PEAR / Command.php
index db39b8f..9ec5550 100644 (file)
@@ -10,7 +10,6 @@
  * @author     Greg Beaver <cellog@php.net>
  * @copyright  1997-2009 The Authors
  * @license    http://opensource.org/licenses/bsd-license.php New BSD License
- * @version    CVS: $Id: Command.php 313023 2011-07-06 19:17:11Z dufuz $
  * @link       http://pear.php.net/package/PEAR
  * @since      File available since Release 0.1
  */
@@ -94,7 +93,7 @@ $GLOBALS['_PEAR_Command_objects'] = array();
  * @author     Greg Beaver <cellog@php.net>
  * @copyright  1997-2009 The Authors
  * @license    http://opensource.org/licenses/bsd-license.php New BSD License
- * @version    Release: 1.9.4
+ * @version    Release: 1.10.1
  * @link       http://pear.php.net/package/PEAR
  * @since      Class available since Release 0.1
  */
@@ -109,11 +108,8 @@ class PEAR_Command
      * @param object $config  Instance of PEAR_Config object
      *
      * @return object the command object or a PEAR error
-     *
-     * @access public
-     * @static
      */
-    function &factory($command, &$config)
+    public static function &factory($command, &$config)
     {
         if (empty($GLOBALS['_PEAR_Command_commandlist'])) {
             PEAR_Command::registerCommands();
@@ -134,13 +130,13 @@ class PEAR_Command
             return $a;
         }
         $ui =& PEAR_Command::getFrontendObject();
-        $obj = &new $class($ui, $config);
+        $obj = new $class($ui, $config);
         return $obj;
     }
 
     // }}}
     // {{{ & getObject()
-    function &getObject($command)
+    public static function &getObject($command)
     {
         $class = $GLOBALS['_PEAR_Command_commandlist'][$command];
         if (!class_exists($class)) {
@@ -151,7 +147,7 @@ class PEAR_Command
         }
         $ui =& PEAR_Command::getFrontendObject();
         $config = &PEAR_Config::singleton();
-        $obj = &new $class($ui, $config);
+        $obj = new $class($ui, $config);
         return $obj;
     }
 
@@ -162,9 +158,8 @@ class PEAR_Command
      * Get instance of frontend object.
      *
      * @return object|PEAR_Error
-     * @static
      */
-    function &getFrontendObject()
+    public static function &getFrontendObject()
     {
         $a = &PEAR_Frontend::singleton();
         return $a;
@@ -179,9 +174,8 @@ class PEAR_Command
      * @param string $uiclass Name of class implementing the frontend
      *
      * @return object the frontend object, or a PEAR error
-     * @static
      */
-    function &setFrontendClass($uiclass)
+    public static function &setFrontendClass($uiclass)
     {
         $a = &PEAR_Frontend::setFrontendClass($uiclass);
         return $a;
@@ -196,9 +190,8 @@ class PEAR_Command
      * @param string $uitype Name of the frontend type (for example "CLI")
      *
      * @return object the frontend object, or a PEAR error
-     * @static
      */
-    function setFrontendType($uitype)
+    public static function setFrontendType($uitype)
     {
         $uiclass = 'PEAR_Frontend_' . $uitype;
         return PEAR_Command::setFrontendClass($uiclass);
@@ -221,11 +214,8 @@ class PEAR_Command
      *               included.
      *
      * @return bool TRUE on success, a PEAR error on failure
-     *
-     * @access public
-     * @static
      */
-    function registerCommands($merge = false, $dir = null)
+    public static function registerCommands($merge = false, $dir = null)
     {
         $parser = new PEAR_XMLParser;
         if ($dir === null) {
@@ -305,11 +295,8 @@ class PEAR_Command
      * classes implement them.
      *
      * @return array command => implementing class
-     *
-     * @access public
-     * @static
      */
-    function getCommands()
+    public static function getCommands()
     {
         if (empty($GLOBALS['_PEAR_Command_commandlist'])) {
             PEAR_Command::registerCommands();
@@ -324,11 +311,8 @@ class PEAR_Command
      * Get the list of command shortcuts.
      *
      * @return array shortcut => command
-     *
-     * @access public
-     * @static
      */
-    function getShortcuts()
+    public static function getShortcuts()
     {
         if (empty($GLOBALS['_PEAR_Command_shortcuts'])) {
             PEAR_Command::registerCommands();
@@ -347,11 +331,8 @@ class PEAR_Command
      * @param array  $long_args   (reference) long getopt format
      *
      * @return void
-     *
-     * @access public
-     * @static
      */
-    function getGetoptArgs($command, &$short_args, &$long_args)
+    public static function getGetoptArgs($command, &$short_args, &$long_args)
     {
         if (empty($GLOBALS['_PEAR_Command_commandlist'])) {
             PEAR_Command::registerCommands();
@@ -375,11 +356,8 @@ class PEAR_Command
      * @param  string $command Name of the command
      *
      * @return string command description
-     *
-     * @access public
-     * @static
      */
-    function getDescription($command)
+    public static function getDescription($command)
     {
         if (!isset($GLOBALS['_PEAR_Command_commanddesc'][$command])) {
             return null;
@@ -394,11 +372,8 @@ class PEAR_Command
      * Get help for command.
      *
      * @param string $command Name of the command to return help for
-     *
-     * @access public
-     * @static
      */
-    function getHelp($command)
+    public static function getHelp($command)
     {
         $cmds = PEAR_Command::getCommands();
         if (isset($GLOBALS['_PEAR_Command_shortcuts'][$command])) {