Initial Commit of AgileBill Open Source
This commit is contained in:
52
includes/pear/PEAR/Validator/PECL.php
Normal file
52
includes/pear/PEAR/Validator/PECL.php
Normal file
@@ -0,0 +1,52 @@
|
||||
<?php
|
||||
/**
|
||||
* Channel Validator for the pecl.php.net channel
|
||||
*
|
||||
* PHP 4 and PHP 5
|
||||
*
|
||||
* @category pear
|
||||
* @package PEAR
|
||||
* @author Greg Beaver <cellog@php.net>
|
||||
* @copyright 1997-2005 The PHP Group
|
||||
* @license http://www.php.net/license/3_0.txt PHP License 3.0
|
||||
* @version CVS: $Id: PECL.php,v 1.4 2005/09/23 04:53:01 cellog Exp $
|
||||
* @link http://pear.php.net/package/PEAR
|
||||
* @since File available since Release 1.4.0a5
|
||||
*/
|
||||
/**
|
||||
* This is the parent class for all validators
|
||||
*/
|
||||
require_once 'PEAR/Validate.php';
|
||||
/**
|
||||
* Channel Validator for the pecl.php.net channel
|
||||
* @category pear
|
||||
* @package PEAR
|
||||
* @author Greg Beaver <cellog@php.net>
|
||||
* @copyright 1997-2005 The PHP Group
|
||||
* @license http://www.php.net/license/3_0.txt PHP License 3.0
|
||||
* @version Release: 1.4.5
|
||||
* @link http://pear.php.net/package/PEAR
|
||||
* @since Class available since Release 1.4.0a5
|
||||
*/
|
||||
class PEAR_Validator_PECL extends PEAR_Validate
|
||||
{
|
||||
function validateVersion()
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
function validatePackageName()
|
||||
{
|
||||
$ret = parent::validatePackageName();
|
||||
if ($this->_packagexml->getPackageType() == 'extsrc') {
|
||||
if (strtolower($this->_packagexml->getPackage()) !=
|
||||
strtolower($this->_packagexml->getProvidesExtension())) {
|
||||
$this->_addWarning('providesextension', 'package name "' .
|
||||
$this->_packagexml->getPackage() . '" is different from extension name "' .
|
||||
$this->_packagexml->getProvidesExtension() . '"');
|
||||
}
|
||||
}
|
||||
return $ret;
|
||||
}
|
||||
}
|
||||
?>
|
Reference in New Issue
Block a user