cvs: pear-core /PEAR Validate.php
| From: | Greg Beaver | Date: | Wed, 03 Nov 2004 21:49:05 +0000 |
| Subject: | cvs: pear-core /PEAR Validate.php | ||
| Groups: | php.pear.cvs php.pear.core | ||
| Request: | Send a blank email to pear-core+get-1212@lists.php.net to get a copy of this message | ||
cellog Wed Nov 3 16:49:05 2004 EDT
Modified files:
/pear-core/PEAR Validate.php
Log:
remove unused methods, rename validBundleName()
to validGroupName()
http://cvs.php.net/diff.php/pear-core/PEAR/Validate.php?r1=1.17&r2=1.18&ty=u
Index: pear-core/PEAR/Validate.php
diff -u pear-core/PEAR/Validate.php:1.17 pear-core/PEAR/Validate.php:1.18
--- pear-core/PEAR/Validate.php:1.17 Tue Oct 12 21:31:22 2004
+++ pear-core/PEAR/Validate.php Wed Nov 3 16:49:05 2004
@@ -16,7 +16,7 @@
// | Authors: Gregory Beaver <cellog@php.net> |
// +----------------------------------------------------------------------+
//
-// $Id: Validate.php,v 1.17 2004/10/13 01:31:22 cellog Exp $
+// $Id: Validate.php,v 1.18 2004/11/03 21:49:05 cellog Exp $
define('PEAR_VALIDATE_INSTALLING', 1);
define('PEAR_VALIDATE_UNINSTALLING', 2); // this is not bit-mapped like the others
define('PEAR_VALIDATE_NORMAL', 3);
@@ -41,34 +41,12 @@
*/
var $_validStates =
array('alpha','beta','stable','snapshot','devel');
/**
- * Valid file installation roles
- * @var array
- * @access private
- */
- var $_validInstallRoles =
array('php','ext','test','doc','data','src','script');
- /**
- * Valid dependency relations
- * @var array
- * @access private
- */
- var $_validDepRelations =
array('has','eq','lt','le','gt','ge','not');
- /**
* Format: ('error' => array('field' => name, 'reason'
=> reason), 'warning' => same)
* @var array
* @access private
*/
var $_failures = array('error' => array(), 'warning' => array());
- function getChannelPackageDownloadRegex()
- {
- return '(' . _PEAR_CHANNELS_NAME_PREG . ')::' .
$this->getPackageDownloadRegex();
- }
-
- function getPackageDownloadRegex()
- {
- return '(' . $this->packageregex . ')(-([.0-9a-zA-Z]+))?';
- }
-
/**
* @param string
*/
@@ -79,11 +57,12 @@
/**
* This validates a bundle name, and bundle names must conform
- * to the PEAR naming convention, so the method is final.
+ * to the PEAR naming convention, so the method is final and static.
* @param string
* @final
+ * @static
*/
- function validBundleName($name)
+ function validGroupName($name)
{
return (bool)preg_match('/^' . _PEAR_COMMON_PACKAGE_NAME_PREG . '$/',
$name);
}
@@ -98,16 +77,6 @@
return $this->_validStates;
}
- function validInstallRole($role)
- {
- return in_array($role, $this->_validInstallRoles);
- }
-
- function validDepRelation($rel)
- {
- return in_array($rel, $this->_validDepRelations);
- }
-
function validVersion($ver)
{
return (bool) preg_match(PEAR_COMMON_PACKAGE_VERSION_PREG, $ver);