Bearsampp 2026.9.23
Loading...
Searching...
No Matches
PEAR_Validator_PECL Class Reference
Inheritance diagram for PEAR_Validator_PECL:
Collaboration diagram for PEAR_Validator_PECL:

Public Member Functions

 validatePackageName ()
 validateVersion ()
Public Member Functions inherited from PEAR_Validate
 _addFailure ($field, $reason)
 _addWarning ($field, $reason)
 _validateFilelist ()
 _validPackageName ($name)
 getFailures ()
 setPackageFile (&$pf)
 validate ($state=null)
 validateChangelog ()
 validateDate ()
 validateDependencies ()
 validateDeps ()
 validateDescription ()
 validateFilelist ()
 validateLicense ()
 validateMainFilelist ()
 validateMaintainers ()
 validateNotes ()
 validateReleaseFilelist ()
 validateStability ()
 validateState ()
 validateSummary ()
 validateTime ()
 validPackageName ($name, $validatepackagename=false)

Additional Inherited Members

Static Public Member Functions inherited from PEAR_Validate
static getValidStates ()
static validGroupName ($name)
static validState ($state)
static validVersion ($ver)
Data Fields inherited from PEAR_Validate
 $_failures = array('error' => array(), 'warning' => array())
 $_packagexml
 $_state = PEAR_VALIDATE_NORMAL
 $packageregex = _PEAR_COMMON_PACKAGE_NAME_PREG

Detailed Description

Definition at line 30 of file PECL.php.

Member Function Documentation

◆ validatePackageName()

validatePackageName ( )

@access protected

Reimplemented from PEAR_Validate.

Definition at line 47 of file PECL.php.

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 }
_addWarning($field, $reason)
Definition Validate.php:145

References PEAR_Validate\_addWarning().

Here is the call graph for this function:

◆ validateVersion()

validateVersion ( )

@access protected

Reimplemented from PEAR_Validate.

Definition at line 32 of file PECL.php.

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 }
const PEAR_VALIDATE_PACKAGING
Definition Validate.php:22
_addFailure($field, $reason)
Definition Validate.php:137

References PEAR_Validate\_addFailure(), and PEAR_VALIDATE_PACKAGING.

Here is the call graph for this function:

The documentation for this class was generated from the following file:
  • E:/Bearsampp-development/sandbox/core/libs/php/pear/pear/PEAR/Validator/PECL.php