\Composer\Repository\PearChannelReader

PEAR Channel package reader.

Reads channel packages info from and builds Package's

Summary

Methods
Properties
Constants
__construct()
read()
No public properties found
CHANNEL_NS
ALL_CATEGORIES_NS
CATEGORY_PACKAGES_INFO_NS
ALL_PACKAGES_NS
ALL_RELEASES_NS
PACKAGE_INFO_NS
requestContent()
requestXml()
No protected properties found
N/A
selectRestVersion()
$rfs
$readerMap
N/A

Constants

CHANNEL_NS

CHANNEL_NS = 'http://pear.php.net/channel-1.0'

PEAR REST Interface namespaces

ALL_CATEGORIES_NS

ALL_CATEGORIES_NS = 'http://pear.php.net/dtd/rest.allcategories'

CATEGORY_PACKAGES_INFO_NS

CATEGORY_PACKAGES_INFO_NS = 'http://pear.php.net/dtd/rest.categorypackageinfo'

ALL_PACKAGES_NS

ALL_PACKAGES_NS = 'http://pear.php.net/dtd/rest.allpackages'

ALL_RELEASES_NS

ALL_RELEASES_NS = 'http://pear.php.net/dtd/rest.allreleases'

PACKAGE_INFO_NS

PACKAGE_INFO_NS = 'http://pear.php.net/dtd/rest.package'

Properties

$readerMap

$readerMap : array

Type

array — of ('xpath test' => 'rest implementation')

Methods

read()

read(  $url) : \Composer\Repository\Pear\ChannelInfo

Reads PEAR channel through REST interface and builds list of packages

Parameters

$url

string PEAR Channel url

Throws

\UnexpectedValueException

Returns

\Composer\Repository\Pear\ChannelInfo

requestContent()

requestContent(  $origin,   $path) : \SimpleXMLElement

Read content from remote filesystem.

Parameters

$origin

string server

$path

string relative path to content

Throws

\UnexpectedValueException

Returns

\SimpleXMLElement

requestXml()

requestXml(  $origin,   $path) : \SimpleXMLElement

Read xml content from remote filesystem

Parameters

$origin

string server

$path

string relative path to content

Throws

\UnexpectedValueException

Returns

\SimpleXMLElement

selectRestVersion()

selectRestVersion(  $channelXml,   $supportedVersions) : array|null

Reads channel supported REST interfaces and selects one of them

Parameters

$channelXml

\SimpleXMLElement

$supportedVersions

string[] supported PEAR REST protocols

Returns

array|null —

hash with selected version and baseUrl