Bearsampp
2026.9.23
Toggle main menu visibility
Loading...
Searching...
No Matches
PECL.php
Go to the documentation of this file.
1
<?php
18
require_once
'PEAR/Validate.php'
;
30
class
PEAR_Validator_PECL
extends
PEAR_Validate
31
{
32
function
validateVersion
()
33
{
34
if
($this->_state ==
PEAR_VALIDATE_PACKAGING
) {
35
$version = $this->_packagexml->getVersion();
36
$versioncomponents = explode(
'.'
, $version);
37
$last = array_pop($versioncomponents);
38
if
(substr($last, 1, 2) ==
'rc'
) {
39
$this->
_addFailure
(
'version'
,
'Release Candidate versions must have '
.
40
'upper-case RC, not lower-case rc'
);
41
return
false
;
42
}
43
}
44
return
true
;
45
}
46
47
function
validatePackageName
()
48
{
49
$ret = parent::validatePackageName();
50
if
($this->_packagexml->getPackageType() ==
'extsrc'
||
51
$this->_packagexml->getPackageType() ==
'zendextsrc'
) {
52
if
(strtolower($this->_packagexml->getPackage()) !=
53
strtolower($this->_packagexml->getProvidesExtension())) {
54
$this->
_addWarning
(
'providesextension'
,
'package name "'
.
55
$this->_packagexml->getPackage() .
'" is different from extension name "'
.
56
$this->_packagexml->getProvidesExtension() .
'"'
);
57
}
58
}
59
return
$ret;
60
}
61
}
62
?>
PEAR_VALIDATE_PACKAGING
const PEAR_VALIDATE_PACKAGING
Definition
Validate.php:22
PEAR_Validate
Definition
Validate.php:39
PEAR_Validate\_addFailure
_addFailure($field, $reason)
Definition
Validate.php:137
PEAR_Validate\_addWarning
_addWarning($field, $reason)
Definition
Validate.php:145
PEAR_Validator_PECL
Definition
PECL.php:31
PEAR_Validator_PECL\validateVersion
validateVersion()
Definition
PECL.php:32
PEAR_Validator_PECL\validatePackageName
validatePackageName()
Definition
PECL.php:47
sandbox
core
libs
php
pear
pear
PEAR
Validator
PECL.php
Generated by
1.17.0