Documentation

ChannelReader extends BaseChannelReader
in package

PEAR Channel package reader.

Reads channel packages info from and builds Package's

Tags
author

Alexey Prilipko palex@farpost.com

Table of Contents

ALL_CATEGORIES_NS  = 'http://pear.php.net/dtd/rest.allcategories'
ALL_PACKAGES_NS  = 'http://pear.php.net/dtd/rest.allpackages'
ALL_RELEASES_NS  = 'http://pear.php.net/dtd/rest.allreleases'
CATEGORY_PACKAGES_INFO_NS  = 'http://pear.php.net/dtd/rest.categorypackageinfo'
CHANNEL_NS  = 'http://pear.php.net/channel-1.0'
PEAR REST Interface namespaces
PACKAGE_INFO_NS  = 'http://pear.php.net/dtd/rest.package'
$readerMap  : array<string|int, mixed>
$rfs  : RemoteFilesystem
__construct()  : mixed
read()  : ChannelInfo
Reads PEAR channel through REST interface and builds list of packages
requestContent()  : SimpleXMLElement
Read content from remote filesystem.
requestXml()  : SimpleXMLElement
Read xml content from remote filesystem
selectRestVersion()  : array<string|int, mixed>|null
Reads channel supported REST interfaces and selects one of them

Constants

ALL_CATEGORIES_NS

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

ALL_PACKAGES_NS

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

ALL_RELEASES_NS

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

CATEGORY_PACKAGES_INFO_NS

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

CHANNEL_NS

PEAR REST Interface namespaces

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

PACKAGE_INFO_NS

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

Properties

$readerMap

private array<string|int, mixed> $readerMap

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

Methods

read()

Reads PEAR channel through REST interface and builds list of packages

public read(string $url) : ChannelInfo
Parameters
$url : string

PEAR Channel url

Tags
throws
UnexpectedValueException
Return values
ChannelInfo

requestContent()

Read content from remote filesystem.

protected requestContent(string $origin, string $path) : SimpleXMLElement
Parameters
$origin : string

server

$path : string

relative path to content

Tags
throws
UnexpectedValueException
Return values
SimpleXMLElement

requestXml()

Read xml content from remote filesystem

protected requestXml(string $origin, string $path) : SimpleXMLElement
Parameters
$origin : string

server

$path : string

relative path to content

Tags
throws
UnexpectedValueException
Return values
SimpleXMLElement

selectRestVersion()

Reads channel supported REST interfaces and selects one of them

private selectRestVersion(SimpleXMLElement $channelXml, array<string|int, string> $supportedVersions) : array<string|int, mixed>|null
Parameters
$channelXml : SimpleXMLElement
$supportedVersions : array<string|int, string>

supported PEAR REST protocols

Return values
array<string|int, mixed>|null

hash with selected version and baseUrl

Search results