[ Index ]
 

Code source de GeekLog 1.4.1

Accédez au Source d'autres logiciels libres

title

Body

[fermer]

/system/pear/PEAR/ -> ChannelFile.php (sommaire)

PEAR_ChannelFile, the channel handling class PHP versions 4 and 5

Author: Greg Beaver <cellog@php.net>
Copyright: 1997-2006 The PHP Group
License: http://www.php.net/license/3_0.txt PHP License 3.0
Version: CVS: $Id: ChannelFile.php,v 1.75 2006/03/02 18:14:12 cellog Exp $
Poids: 1615 lignes (57 kb)
Inclus ou requis:0 fois
Référencé: 0 fois
Nécessite: 0 fichiers

Définit 1 class

PEAR_ChannelFile:: (55 méthodes):
  PEAR_ChannelFile()
  _getErrorMessage()
  fromXmlString()
  toArray()
  fromArray()
  fromArrayWithErrors()
  _fromArray()
  getErrors()
  _unIndent()
  fromXmlFile()
  fromAny()
  toXml()
  _makeXmlrpcXml()
  _makeSoapXml()
  _makeRestXml()
  _makeMirrorsXml()
  _makeFunctionsXml()
  _validateError()
  _validateWarning()
  validate()
  _validateFunctions()
  validChannelServer()
  getName()
  getServer()
  getPort()
  getSSL()
  getSummary()
  getPath()
  getFunctions()
  getFunction()
  supports()
  supportsREST()
  getBaseURL()
  resetREST()
  resetFunctions()
  setDefaultPEARProtocols()
  getMirrors()
  getMirror()
  setName()
  setPort()
  setSSL()
  setPath()
  setServer()
  setSummary()
  setAlias()
  getAlias()
  setValidationPackage()
  addFunction()
  addMirrorFunction()
  setBaseURL()
  addMirror()
  getValidationPackage()
  getValidationObject()
  isIncludeable()
  lastModified()


Classe: PEAR_ChannelFile  - X-Ref

The Channel handling class

PEAR_ChannelFile()   X-Ref
Flag used to determine the validity of parsed content


_getErrorMessage()   X-Ref

return: array

fromXmlString($data)   X-Ref

param: string contents of package.xml file
return: bool success of parsing

toArray()   X-Ref

return: array

fromArray($data, $compatibility = false, $stackClass = 'PEAR_ErrorStack')   X-Ref

param: array
return: PEAR_ChannelFile|false false if invalid

fromArrayWithErrors($data, $compatibility = false,$stackClass = 'PEAR_ErrorStack')   X-Ref
Unlike {@link fromArray()} this does not do any validation

param: array
return: PEAR_ChannelFile

_fromArray($data)   X-Ref

param: array

getErrors($purge = false)   X-Ref
Wrapper to {@link PEAR_ErrorStack::getErrors()}

param: boolean determines whether to purge the error stack after retrieving
return: array

_unIndent($str)   X-Ref
Unindent given string (?)

param: string $str The string that has to be unindented.
return: string

fromXmlFile($descfile)   X-Ref
Parse a channel.xml file.  Expects the name of
a channel xml file as input.

param: string  $descfile  name of channel xml file
return: bool success of parsing

fromAny($info)   X-Ref
Parse channel information from different sources

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

param: string Filename of the source or the source itself
return: bool

toXml()   X-Ref
Return an XML document based on previous parsing and modifications

return: string XML data

_makeXmlrpcXml($info, $indent)   X-Ref
Generate the <xmlrpc> tag


_makeSoapXml($info, $indent)   X-Ref
Generate the <soap> tag


_makeRestXml($info, $indent)   X-Ref
Generate the <rest> tag


_makeMirrorsXml($channelInfo)   X-Ref
Generate the <mirrors> tag


_makeFunctionsXml($functions, $indent, $rest = false)   X-Ref
Generate the <functions> tag


_validateError($code, $params = array()   X-Ref
Validation error.  Also marks the object contents as invalid

param: error code
param: array error information

_validateWarning($code, $params = array()   X-Ref
Validation warning.  Does not mark the object contents invalid.

param: error code
param: array error information

validate()   X-Ref
Validate parsed file.

return: boolean

_validateFunctions($protocol, $functions, $parent = '')   X-Ref

param: string xmlrpc or soap - protocol name this function applies to
param: array the functions
param: string the name of the parent element (mirror name, for instance)

validChannelServer($server)   X-Ref
Test whether a string contains a valid channel server.

param: string $ver the package version to test
return: bool

getName()   X-Ref

return: string|false

getServer()   X-Ref

return: string|false

getPort($mirror = false)   X-Ref

return: int|80 port number to connect to

getSSL($mirror = false)   X-Ref

return: bool Determines whether secure sockets layer (SSL) is used to connect to this channel

getSummary()   X-Ref

return: string|false

getPath($protocol, $mirror = false)   X-Ref

param: string xmlrpc or soap
param: string|false mirror name or false for primary server

getFunctions($protocol, $mirror = false)   X-Ref

param: string protocol type (xmlrpc, soap)
param: string Mirror name
return: array|false

getFunction($type, $name = null, $mirror = false)   X-Ref

param: string Protocol type
param: string Function name (null to return the
param: string Mirror name, if any
return: array

supports($type, $name = null, $mirror = false, $version = '1.0')   X-Ref

param: string protocol type
param: string protocol name
param: string version
param: string mirror name
return: boolean

supportsREST($mirror = false)   X-Ref
Determines whether a channel supports Representational State Transfer (REST) protocols
for retrieving channel information

param: string
return: bool

getBaseURL($resourceType, $mirror = false)   X-Ref
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
param: string Resource Type to retrieve

resetREST($mirror = false)   X-Ref
Since REST does not implement RPC, provide this as a logical wrapper around
resetFunctions for REST

param: string|false mirror name, if any

resetFunctions($type, $mirror = false)   X-Ref
Empty all protocol definitions

param: string protocol type (xmlrpc, soap)
param: string|false mirror name, if any

setDefaultPEARProtocols($version = '1.0', $mirror = false)   X-Ref
Set a channel's protocols to the protocols supported by pearweb


getMirrors()   X-Ref

return: array

getMirror($server)   X-Ref
Get the unserialized XML representing a mirror

return: array|false

setName($name)   X-Ref

param: string
return: string|false

setPort($port, $mirror = false)   X-Ref
Set the socket number (port) that is used to connect to this channel

param: integer
param: string|false name of the mirror server, or false for the primary

setSSL($ssl = true, $mirror = false)   X-Ref
Set the socket number (port) that is used to connect to this channel

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

setPath($protocol, $path, $mirror = false)   X-Ref
Set the socket number (port) that is used to connect to this channel

param: integer
param: string|false name of the mirror server, or false for the primary

setServer($server, $mirror = false)   X-Ref

param: string
return: string|false

setSummary($summary)   X-Ref

param: string
return: boolean success

setAlias($alias, $local = false)   X-Ref

param: string
param: boolean determines whether the alias is in channel.xml or local
return: boolean success

getAlias()   X-Ref

return: string

setValidationPackage($validateclass, $version)   X-Ref
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.

param: string|false pass in false to reset to the default packagename regex
return: boolean success

addFunction($type, $version, $name = '', $mirror = false)   X-Ref
Add a protocol to the provides section

param: string protocol type
param: string protocol version
param: string protocol name, if any
param: string mirror name, if this is a mirror's protocol
return: bool

addMirrorFunction($mirror, $type, $version, $name = '')   X-Ref
Add a protocol to a mirror's provides section

param: string mirror name (server)
param: string protocol type
param: string protocol version
param: string protocol name, if any

setBaseURL($resourceType, $url, $mirror = false)   X-Ref

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

addMirror($server, $port = null)   X-Ref

param: string mirror server
param: int mirror http port
return: boolean

getValidationPackage()   X-Ref
Retrieve the name of the validation package for this channel

return: string|false

getValidationObject($package = false)   X-Ref
Retrieve the object that can be used for custom validation

param: string|false the name of the package to validate.  If the package is
return: PEAR_Validate|false false is returned if the validation package

isIncludeable($path)   X-Ref
Pas de description

lastModified()   X-Ref
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

return: string



Généré le : Wed Nov 21 12:27:40 2007 par Balluche grâce à PHPXref 0.7
  Clicky Web Analytics