Overview

Packages

  • Pear

Classes

  • Horde_Pear_Exception
  • Horde_Pear_Package_Contents_Ignore_Composite
  • Horde_Pear_Package_Contents_Ignore_Dot
  • Horde_Pear_Package_Contents_Ignore_Git
  • Horde_Pear_Package_Contents_Ignore_Hidden
  • Horde_Pear_Package_Contents_Ignore_Nothing
  • Horde_Pear_Package_Contents_Ignore_Patterns
  • Horde_Pear_Package_Contents_Include_All
  • Horde_Pear_Package_Contents_InstallAs_Horde
  • Horde_Pear_Package_Contents_InstallAs_HordeApplication
  • Horde_Pear_Package_Contents_InstallAs_HordeComponent
  • Horde_Pear_Package_Contents_InstallAs_HordeRole
  • Horde_Pear_Package_Contents_List
  • Horde_Pear_Package_Contents_Role_HordeApplication
  • Horde_Pear_Package_Contents_Role_HordeComponent
  • Horde_Pear_Package_Dependencies
  • Horde_Pear_Package_Task_UpdateContents
  • Horde_Pear_Package_Type_Horde
  • Horde_Pear_Package_Xml
  • Horde_Pear_Package_Xml_Contents
  • Horde_Pear_Package_Xml_Directory
  • Horde_Pear_Package_Xml_Element_Directory
  • Horde_Pear_Package_Xml_Element_File
  • Horde_Pear_Package_Xml_Factory
  • Horde_Pear_Registry
  • Horde_Pear_Remote
  • Horde_Pear_Rest
  • Horde_Pear_Rest_Dependencies
  • Horde_Pear_Rest_Package
  • Horde_Pear_Rest_PackageList
  • Horde_Pear_Rest_Release
  • Horde_Pear_Rest_Releases

Interfaces

  • Horde_Pear_Package_Contents
  • Horde_Pear_Package_Contents_Ignore
  • Horde_Pear_Package_Contents_Include
  • Horde_Pear_Package_Contents_InstallAs
  • Horde_Pear_Package_Contents_Role
  • Horde_Pear_Package_Task
  • Horde_Pear_Package_Type
  • Overview
  • Package
  • Class
  • Tree

Class Horde_Pear_Package_Xml

Handles package.xml files.

Copyright 2011-2012 Horde LLC (http://www.horde.org/)

See the enclosed file COPYING for license information (LGPL). If you did not receive this file, see http://www.horde.org/licenses/lgpl21.

Package: Pear
Category: Horde
License: LGPL 2.1
Author: Gunnar Wrobel wrobel@pardus.de
Link: http://pear.horde.org/index.php?package=Pear
Located at Horde/Pear/Package/Xml.php
Methods summary
public
# __construct( resource|string $xml, mixed $factory = null )

Constructor.

Constructor.

Parameters

$xml
The package.xml as stream or path.
$factory
public Horde_Pear_Package_Contents_List
# getContent( mixed $type = 'horde', mixed $path = null )

Return the list of contents.

Return the list of contents.

Returns

Horde_Pear_Package_Contents_List
The contents.
public string
# getName( )

Return the package name.

Return the package name.

Returns

string
The name of the package.
public string
# getChannel( )

Return the package channel.

Return the package channel.

Returns

string
The channel of the package.
public string
# getSummary( )

Return the package summary.

Return the package summary.

Returns

string
The summary of the package.
public string
# getDescription( )

Return the package description.

Return the package description.

Returns

string
The description of the package.
public string
# getVersion( )

Return the package version.

Return the package version.

Returns

string
The version of the package.
public string
# getDate( )

Return the release date.

Return the release date.

Returns

string
The date for the current release.
public string
# getNotes( )

Return the package notes.

Return the package notes.

Returns

string
The notes for the current release.
public string
# getState( string $key = 'release' )

Return the stability of the release or api.

Return the stability of the release or api.

Parameters

$key
"release" or "api"

Returns

string
The stability.
public array
# getDependencies( )

Return the package dependencies.

Return the package dependencies.

Returns

array
The package dependencies.
public string
# getLicense( )

Return the license name.

Return the license name.

Returns

string
The name of the license.
public string
# getLicenseLocation( )

Return the URL to the license information.

Return the URL to the license information.

Returns

string
The license URI.
public string
# getLeads( )

Return the package lead developers.

Return the package lead developers.

Returns

string
The package lead developers.
public mixed
# __call( string $name, array $arguments )

Catch undefined method calls and try to run them as task.

Catch undefined method calls and try to run them as task.

Parameters

$name
The method/task name.
$arguments
The arguments for the call.

Returns

mixed
public null
# timestamp( )

Mark the package as being release and set the timestamps to now.

Mark the package as being release and set the timestamps to now.

Returns

null
public null
# syncCurrentVersion( )

Synchronizes the current version information with the release information in the changelog.

Synchronizes the current version information with the release information in the changelog.

Returns

null
public null
# addNote( string $note )

Add a new note to the package.xml

Add a new note to the package.xml

Parameters

$note
The note text.

Returns

null
public null
# setVersion( string $rel_version = null, string $api_version = null )

Set the version in the package.xml

Set the version in the package.xml

Parameters

$rel_version
The new release version number.
$api_version
The new api version number.

Returns

null
public null
# addNextVersion( string $version, string $initial_note, string $stability_api = null, string $stability_release = null )

Add the next version to the package.xml

Add the next version to the package.xml

Parameters

$version
The new version number.
$initial_note
The text for the initial note.
$stability_api
The API stability for the next release.
$stability_release
The stability for the next release.

Returns

null
public string
# __toString( )

Return the complete package.xml as string.

Return the complete package.xml as string.

Returns

string
The package.xml content.
public DOMNode|false
# findNode( string $query )

Return a single named node matching the given XPath query.

Return a single named node matching the given XPath query.

Parameters

$query
The query.

Returns

DOMNode|false
The named DOMNode or empty if no node was found.
public DOMNode|false
# findNodeRelativeTo( string $query, DOMNode $context )

Return a single named node below the given context matching the given XPath query.

Return a single named node below the given context matching the given XPath query.

Parameters

$query
The query.
$context
Search below this node.

Returns

DOMNode|false
The named DOMNode or empty if no node was found.
public DOMNodeList
# findNodes( string $query )

Return all nodes matching the given XPath query.

Return all nodes matching the given XPath query.

Parameters

$query
The query.

Returns

DOMNodeList
The list of DOMNodes.
public DOMNodeList
# findNodesRelativeTo( string $query, mixed $context )

Return all nodes matching the given XPath query.

Return all nodes matching the given XPath query.

Parameters

$query
The query.
$context

Returns

DOMNodeList
The list of DOMNodes.
public string|false
# getNodeText( string $path )

Return the content of a single named node matching the given XPath query.

Return the content of a single named node matching the given XPath query.

Parameters

$path
The node path.

Returns

string|false

The node content as string or empty if no node was found.

public string|false
# getNodeTextRelativeTo( string $path, DOMNode $context )

Return the content of a single named node below the given context and matching the given XPath query.

Return the content of a single named node below the given context and matching the given XPath query.

Parameters

$path
The node path.
$context
Search below this node.

Returns

string|false

The node content as string or empty if no node was found.

public DOMNodeList
# replaceTextNode( string $path, string $value )

Replace a specific text node

Replace a specific text node

Parameters

$path
The XPath query pointing to the node.
$value
The new text value.

Returns

DOMNodeList
The list of DOMNodes.
public DOMNodeList
# replaceTextNodeRelativeTo( string $path, DOMNode $context, string $value, array $attributes = array() )

Replace a specific text node

Replace a specific text node

Parameters

$path
The XPath query pointing to the node.
$context
Search below this node.
$value
The new text value.
$attributes
$attribues Attributes to add to the node.

Returns

DOMNodeList
The list of DOMNodes.
public DOMNode
# _insertWhiteSpace( DOMNode $parent, string $ws )

Insert some white space.

Insert some white space.

Parameters

$parent
The parent DOMNode.
$ws
Additional white space that should be inserted.

Returns

DOMNode
The inserted white space node.
public
# insert( mixed $elements, mixed $point )
public
# append( mixed $elements, mixed $parent )
public
# createText( mixed $text )
public
# createComment( mixed $comment )
public
# createNode( mixed $name, mixed $attributes = array() )
public
# removeWhitespace( mixed $node )
public
# removeComment( mixed $node, mixed $comment )
Constants summary
string XMLNAMESPACE

The package.xml namespace

The package.xml namespace

# 'http://pear.php.net/dtd/package-2.0'
API documentation generated by ApiGen