Minor - Adding "static" to functions

skala
Julio Montoya 14 years ago
parent c969f065f3
commit 6d3826957f
  1. 92
      main/inc/lib/pear/HTML/QuickForm/RuleRegistry.php
  2. 4
      main/inc/lib/pear/PEAR.php

@ -1,39 +1,39 @@
<?php
/* vim: set expandtab tabstop=4 shiftwidth=4 softtabstop=4: */
/* vim: set expandtab tabstop=4 shiftwidth=4 softtabstop=4: */
/**
* Registers rule objects and uses them for validation
*
* PHP versions 4 and 5
*
* LICENSE: This source file is subject to version 3.01 of the PHP license
* that is available through the world-wide-web at the following URI:
* http://www.php.net/license/3_01.txt If you did not receive a copy of
* the PHP License and are unable to obtain it through the web, please
* send a note to license@php.net so we can mail you a copy immediately.
*
* @category HTML
* @package HTML_QuickForm
* @author Adam Daniel <adaniel1@eesus.jnj.com>
* @author Bertrand Mansion <bmansion@mamasam.com>
* @author Alexey Borzov <avb@php.net>
* @copyright 2001-2009 The PHP Group
* @license http://www.php.net/license/3_01.txt PHP License 3.01
* @version CVS: $Id: RuleRegistry.php,v 1.19 2009/04/04 21:34:02 avb Exp $
* @link http://pear.php.net/package/HTML_QuickForm
*/
/**
* Registers rule objects and uses them for validation
*
* @category HTML
* @package HTML_QuickForm
* @author Adam Daniel <adaniel1@eesus.jnj.com>
* @author Bertrand Mansion <bmansion@mamasam.com>
* @author Alexey Borzov <avb@php.net>
* @version Release: 3.2.11
* @since 3.2
*/
* Registers rule objects and uses them for validation
*
* PHP versions 4 and 5
*
* LICENSE: This source file is subject to version 3.01 of the PHP license
* that is available through the world-wide-web at the following URI:
* http://www.php.net/license/3_01.txt If you did not receive a copy of
* the PHP License and are unable to obtain it through the web, please
* send a note to license@php.net so we can mail you a copy immediately.
*
* @category HTML
* @package HTML_QuickForm
* @author Adam Daniel <adaniel1@eesus.jnj.com>
* @author Bertrand Mansion <bmansion@mamasam.com>
* @author Alexey Borzov <avb@php.net>
* @copyright 2001-2009 The PHP Group
* @license http://www.php.net/license/3_01.txt PHP License 3.01
* @version CVS: $Id: RuleRegistry.php,v 1.19 2009/04/04 21:34:02 avb Exp $
* @link http://pear.php.net/package/HTML_QuickForm
*/
/**
* Registers rule objects and uses them for validation
*
* @category HTML
* @package HTML_QuickForm
* @author Adam Daniel <adaniel1@eesus.jnj.com>
* @author Bertrand Mansion <bmansion@mamasam.com>
* @author Alexey Borzov <avb@php.net>
* @version Release: 3.2.11
* @since 3.2
*/
class HTML_QuickForm_RuleRegistry
{
/**
@ -52,9 +52,9 @@ class HTML_QuickForm_RuleRegistry
*
* @access public
* @static
* @return HTML_QuickForm_RuleRegistry
* @return HTML_QuickForm_RuleRegistry
*/
function &singleton()
static function &singleton()
{
static $obj;
if (!isset($obj)) {
@ -115,7 +115,7 @@ class HTML_QuickForm_RuleRegistry
*
* @param string $ruleName Name of the requested rule
* @access public
* @return HTML_QuickForm_Rule
* @return HTML_QuickForm_Rule
*/
function &getRule($ruleName)
{
@ -165,10 +165,10 @@ class HTML_QuickForm_RuleRegistry
/**
* Returns the validation test in javascript code
*
* @param array|HTML_QuickForm_element Element(s) the rule applies to
* @param string Element name, in case $element is
* not an array
* @param array Rule data
* @param array|HTML_QuickForm_element Element(s) the rule applies to
* @param string Element name, in case $element is
* not an array
* @param array Rule data
* @access public
* @return string JavaScript for the rule
*/
@ -218,12 +218,12 @@ class HTML_QuickForm_RuleRegistry
* Returns JavaScript to get and to reset the element's value
*
* @access private
* @param HTML_QuickForm_element element being processed
* @param string element's name
* @param bool whether to generate JavaScript to reset
* the value
* @param integer value's index in the array (only used for
* multielement rules)
* @param HTML_QuickForm_element element being processed
* @param string element's name
* @param bool whether to generate JavaScript to reset
* the value
* @param integer value's index in the array (only used for
* multielement rules)
* @return array first item is value javascript, second is reset
*/
function _getJsValue(&$element, $elementName, $reset = false, $index = null)

@ -253,7 +253,7 @@ class PEAR
$GLOBALS['_PEAR_shutdown_funcs'][] = array($func, $args);
}
// }}}
// }}}
// {{{ isError()
/**
@ -267,7 +267,7 @@ class PEAR
* @access public
* @return bool true if parameter is an error
*/
function isError($data, $code = null)
static function isError($data, $code = null)
{
if (!is_a($data, 'PEAR_Error')) {
return false;

Loading…
Cancel
Save