PEAR
[ class tree: PEAR ] [ index: PEAR ] [ all elements ]

Class: PEAR_ChannelFile

Source Location: /PEAR-1.10.0dev2/PEAR/ChannelFile.php

Class Overview


The Channel handling class


Author(s):

Version:

  • Release: 1.10.0dev2

Copyright:

  • 1997-2009 The Authors

Methods


Inherited Variables

Inherited Methods


Class Details

[line 152]
The Channel handling class


[ Top ]


Method Detail

__construct (Constructor)   [line 196]

PEAR_ChannelFile __construct( )


[ Top ]

addFunction   [line 1302]

bool addFunction( string $type, string $version, [string $name = ''], [string $mirror = false])

Add a protocol to the provides section

Parameters:

string   $type   —  protocol type
string   $version   —  protocol version
string   $name   —  protocol name, if any
string   $mirror   —  mirror name, if this is a mirror's protocol

[ Top ]

addMirror   [line 1439]

boolean addMirror( string $server, [int $port = null])


Parameters:

string   $server   —  mirror server
int   $port   —  mirror http port

[ Top ]

addMirrorFunction   [line 1335]

void addMirrorFunction( string $mirror, string $type, string $version, [string $name = ''])

Add a protocol to a mirror's provides section

Parameters:

string   $mirror   —  mirror name (server)
string   $type   —  protocol type
string   $version   —  protocol version
string   $name   —  protocol name, if any

[ Top ]

fromAny   [line 413]

bool fromAny( string $info)

Parse channel information from different sources

This method is able to extract information about a channel from an .xml file or a string

  • Access: public

Parameters:

string   $info   —  Filename of the source or the source itself

[ Top ]

fromArray   [line 311]

PEAR_ChannelFile|false &fromArray( array $data, [ $compatibility = false], [ $stackClass = 'PEAR_ErrorStack'])

  • Return: false if invalid
  • Access: public

Parameters:

array   $data   — 
   $compatibility   — 
   $stackClass   — 

[ Top ]

fromArrayWithErrors   [line 330]

PEAR_ChannelFile &fromArrayWithErrors( array $data, [ $compatibility = false], [ $stackClass = 'PEAR_ErrorStack'])

Unlike fromArray() this does not do any validation
  • Access: public

Parameters:

array   $data   — 
   $compatibility   — 
   $stackClass   — 

[ Top ]

fromXmlFile   [line 388]

bool fromXmlFile( string $descfile)

Parse a channel.xml file. Expects the name of a channel xml file as input.
  • Return: success of parsing

Parameters:

string   $descfile   —  name of channel xml file

[ Top ]

fromXmlString   [line 268]

bool fromXmlString( string $data)

  • Return: success of parsing

Parameters:

string   $data   —  contents of package.xml file

[ Top ]

getAlias   [line 1264]

string getAlias( )


[ Top ]

getBaseURL   [line 943]

void getBaseURL( string $resourceType, [ $mirror = false])

Get the URL to access a base resource.

Hyperlinks in the returned xml will be used to retrieve the proper information needed. This allows extreme extensibility and flexibility in implementation


Parameters:

string   $resourceType   —  Resource Type to retrieve
   $mirror   — 

[ Top ]

getErrors   [line 352]

array getErrors( [boolean $purge = false])

Wrapper to PEAR_ErrorStack::getErrors()

Parameters:

boolean   $purge   —  determines whether to purge the error stack after retrieving

[ Top ]

getFunction   [line 858]

array getFunction( string $type, [string $name = null], [string $mirror = false])


Parameters:

string   $type   —  Protocol type
string   $name   —  Function name (null to return the first protocol of the type requested)
string   $mirror   —  Mirror name, if any

[ Top ]

getFunctions   [line 827]

array|false getFunctions( string $protocol, [string $mirror = false])


Parameters:

string   $protocol   —  protocol type
string   $mirror   —  Mirror name

[ Top ]

getMirror   [line 1065]

array|false getMirror( $server)

Get the unserialized XML representing a mirror

Parameters:

   $server   — 

[ Top ]

getMirrors   [line 1047]

array getMirrors( )


[ Top ]

getName   [line 733]

string|false getName( )


[ Top ]

getPort   [line 757]

int|80 getPort( [ $mirror = false])

  • Return: port number to connect to

Parameters:

   $mirror   — 

[ Top ]

getServer   [line 745]

string|false getServer( )


[ Top ]

getSSL   [line 789]

bool getSSL( [ $mirror = false])

  • Return: Determines whether secure sockets layer (SSL) is used to connect to this channel

Parameters:

   $mirror   — 

[ Top ]

getSummary   [line 813]

string|false getSummary( )


[ Top ]

getValidationObject   [line 1489]

PEAR_Validate|false &getValidationObject( [string|false $package = false])

Retrieve the object that can be used for custom validation
  • Return: false is returned if the validation package cannot be located

Parameters:

string|false   $package   —  the name of the package to validate. If the package is the channel validation package, PEAR_Validate is returned

[ Top ]

getValidationPackage   [line 1468]

string|false getValidationPackage( )

Retrieve the name of the validation package for this channel

[ Top ]

isIncludeable   [line 1534]

void isIncludeable( $path)


Parameters:

   $path   — 

[ Top ]

lastModified   [line 1552]

string lastModified( )

This function is used by the channel updater and retrieves a value set by

the registry, or the current time if it has not been set


[ Top ]

resetFunctions   [line 988]

void resetFunctions( string $type, [string|false $mirror = false])

Empty all protocol definitions

Parameters:

string   $type   —  protocol type
string|false   $mirror   —  mirror name, if any

[ Top ]

resetREST   [line 978]

void resetREST( [string|false $mirror = false])

Since REST does not implement RPC, provide this as a logical wrapper around

resetFunctions for REST


Parameters:

string|false   $mirror   —  mirror name, if any

[ Top ]

setAlias   [line 1244]

boolean setAlias( string $alias, [boolean $local = false])

  • Return: success

Parameters:

string   $alias   — 
boolean   $local   —  determines whether the alias is in channel.xml or local

[ Top ]

setBaseURL   [line 1382]

void setBaseURL( string $resourceType, string $url, [string|false $mirror = false])


Parameters:

string   $resourceType   —  Resource Type this url links to
string   $url   —  URL
string|false   $mirror   —  mirror name, if this is not a primary server REST base URL

[ Top ]

setDefaultPEARProtocols   [line 1023]

void setDefaultPEARProtocols( [ $version = '1.0'], [ $mirror = false])

Set a channel's protocols to the protocols supported by pearweb

Parameters:

   $version   — 
   $mirror   — 

[ Top ]

setName   [line 1082]

string|false setName( string $name)


Parameters:

string   $name   — 

[ Top ]

setPort   [line 1092]

void setPort( integer $port, [string|false $mirror = false])

Set the socket number (port) that is used to connect to this channel

Parameters:

integer   $port   — 
string|false   $mirror   —  name of the mirror server, or false for the primary

[ Top ]

setServer   [line 1185]

string|false setServer( string $server, [ $mirror = false])


Parameters:

string   $server   — 
   $mirror   — 

[ Top ]

setSSL   [line 1127]

void setSSL( [bool $ssl = true], [string|false $mirror = false])

Set the socket number (port) that is used to connect to this channel

Parameters:

bool   $ssl   —  Determines whether to turn on SSL support or turn it off
string|false   $mirror   —  name of the mirror server, or false for the primary

[ Top ]

setSummary   [line 1225]

boolean setSummary( string $summary)

  • Return: success

Parameters:

string   $summary   — 

[ Top ]

setValidationPackage   [line 1285]

boolean setValidationPackage( string|false $validateclass, $version)

Set the package validation object if it differs from PEAR's default The class must be includeable via changing _ in the classname to path separator, but no checking of this is made.
  • Return: success

Parameters:

string|false   $validateclass   —  pass in false to reset to the default packagename regex
   $version   — 

[ Top ]

supports   [line 887]

boolean supports( string $type, [string $name = null], [string $mirror = false], [string $version = '1.0'])


Parameters:

string   $type   —  protocol type
string   $name   —  protocol name
string   $mirror   —  version
string   $version   —  mirror name

[ Top ]

supportsREST   [line 919]

bool supportsREST( [string $mirror = false])

Determines whether a channel supports Representational State Transfer (REST) protocols

for retrieving channel information


Parameters:

string   $mirror   — 

[ Top ]

toArray   [line 298]

array toArray( )


[ Top ]

toXml   [line 445]

string toXml( )

Return an XML document based on previous parsing and modifications
  • Return: XML data
  • Access: public

[ Top ]

validate   [line 596]

boolean validate( )

Validate parsed file.
  • Access: public

[ Top ]

validChannelServer   [line 722]

bool validChannelServer( $server, string $ver)

Test whether a string contains a valid channel server.

Parameters:

string   $ver   —  the package version to test
   $server   — 

[ Top ]

_getErrorMessage   [line 207]

array _getErrorMessage( )

  • Access: protected

[ Top ]


Documentation generated on Fri, 31 Jul 2015 09:30:19 +0000 by phpDocumentor 1.4.4. PEAR Logo Copyright © PHP Group 2004.