\Composer\Repository\PearPackageDependencyParser

Read PEAR packages using REST 1.0 interface

Summary

Methods
Properties
Constants
buildDependencyInfo()
No public properties found
No constants found
No protected methods found
No protected properties found
N/A
buildDependency10Info()
buildDependency20Info()
buildDepExtensionConstraints()
buildDepPackageConstraints()
parse20VersionConstraint()
parseVersion()
isHash()
No private properties found
N/A

Methods

buildDependencyInfo()

buildDependencyInfo(  $depArray) : \Composer\Repository\Pear\DependencyInfo

Builds dependency information. It detects used package.xml format.

Parameters

$depArray

array

Returns

\Composer\Repository\Pear\DependencyInfo

buildDependency10Info()

buildDependency10Info(  $depArray) : array<mixed,\Composer\Repository\Pear\DependencyConstraint>

Builds dependency information from package.xml 1.0 format

https://pear.php.net/manual/en/guide.developers.package2.dependencies.php

package.xml 1.0 format consists of array of { type="php|os|sapi|ext|pkg" rel="has|not|eq|ge|gt|le|lt" optional="yes" channel="channelName" name="extName|packageName" }

Parameters

$depArray

array Dependency data in package.xml 1.0 format

Returns

array<mixed,\Composer\Repository\Pear\DependencyConstraint>

buildDependency20Info()

buildDependency20Info(  $depArray) : \Composer\Repository\Pear\DependencyInfo

Builds dependency information from package.xml 2.0 format

Parameters

$depArray

array Dependency data in package.xml 1.0 format

Returns

\Composer\Repository\Pear\DependencyInfo

buildDepExtensionConstraints()

buildDepExtensionConstraints(  $depItem,   $depType) : array<mixed,\Composer\Repository\Pear\DependencyConstraint>

Builds dependency constraint of 'extension' type

Parameters

$depItem

array dependency constraint or array of dependency constraints

$depType

string target type of building constraint.

Returns

array<mixed,\Composer\Repository\Pear\DependencyConstraint>

buildDepPackageConstraints()

buildDepPackageConstraints(  $depItem,   $depType) : array<mixed,\Composer\Repository\Pear\DependencyConstraint>

Builds dependency constraint of 'package' type

Parameters

$depItem

array dependency constraint or array of dependency constraints

$depType

string target type of building constraint.

Returns

array<mixed,\Composer\Repository\Pear\DependencyConstraint>

parse20VersionConstraint()

parse20VersionConstraint(array  $data) : string

Parses version constraint

Parameters

array $data

array containing several 'min', 'max', 'has', 'exclude' and other keys.

Returns

string

parseVersion()

parseVersion(  $version) : null|string

Softened version parser

Parameters

$version

Returns

null|string

isHash()

isHash(array  $array) : boolean

Test if array is associative or hash type

Parameters

array $array

Returns

boolean