PHP 클래스 Horde_Pear_Package_Xml, horde

파일 보기 프로젝트 열기: horde/horde 1 사용 예제들

공개 메소드들

메소드 설명
__call ( string $name, array $arguments ) : mixed Catch undefined method calls and try to run them as task.
__construct ( resource | string $xml, $factory = null ) Constructor.
__toString ( ) : string Return the complete package.xml as string.
_insertWhiteSpace ( DOMNode $parent, string $ws ) : DOMNode Insert some white space.
addNextVersion ( string $version, string $initial_note, string $stability_api = null, string $stability_release = null, boolean $keepTime = false ) : null Add the next version to the package.xml
addNote ( string $note ) : null Add a new note to the package.xml
append ( $elements, $parent )
createComment ( $comment )
createNode ( $name, $attributes = [] )
createText ( $text )
findNode ( string $query ) : DOMNode | false Return a single named node matching the given XPath query.
findNodeRelativeTo ( string $query, DOMNode $context ) : DOMNode | false Return a single named node below the given context matching the given XPath query.
findNodes ( string $query ) : DOMNodeList Return all nodes matching the given XPath query.
findNodesRelativeTo ( string $query, $context ) : DOMNodeList Return all nodes matching the given XPath query.
getChannel ( ) : string Return the package channel.
getContent ( $type = 'horde', $path = null ) : Horde_Pear_Package_Contents_List Return the list of contents.
getDate ( ) : string Return the release date.
getDependencies ( ) : array Return the package dependencies.
getDescription ( ) : string Return the package description.
getLeads ( ) : string Return the package lead developers.
getLicense ( ) : string Return the license name.
getLicenseLocation ( ) : string Return the URL to the license information.
getName ( ) : string Return the package name.
getNodeText ( string $path ) : string | false Return the content of a single named node matching the given XPath query.
getNodeTextRelativeTo ( string $path, DOMNode $context ) : string | false Return the content of a single named node below the given context and matching the given XPath query.
getNotes ( ) : string Return the package notes.
getState ( string $key = 'release' ) : string Return the stability of the release or api.
getSummary ( ) : string Return the package summary.
getVersion ( ) : string Return the package version.
getVersions ( ) : array Returns all package versions from the changelog.
insert ( $elements, $point )
removeComment ( $node, $comment )
removeWhitespace ( $node )
replaceTextNode ( string $path, string $value ) : DOMNodeList Replace a specific text node
replaceTextNodeRelativeTo ( string $path, DOMNode $context, string $value, $attributes = [] ) : DOMNodeList Replace a specific text node
setState ( string $rel_state = null, string $api_state = null ) : null Set the state in the package.xml
setVersion ( string $rel_version = null, string $api_version = null ) : null Set the version in the package.xml
syncCurrentVersion ( ) : null Synchronizes the current version information with the release information in the changelog.
timestamp ( boolean $keepTime = false ) Mark the package as being release and set the timestamps to now.

비공개 메소드들

메소드 설명
_appendChild ( DOMNode $parent, string $name, string $value, string $ws = '' ) : null Append a new child.
_appendLicense ( DOMNode $parent, string $license, string $uri, string $ws = null ) : null Append license information.
_appendStability ( DOMNode $parent, string $release, string $api, string $ws = null ) : null Append stability information.
_appendVersion ( DOMNode $parent, string $version, string $api, string $ws = '' ) : null Append version information.
_completeDependencies ( DOMNode $parent, &$result, string $optional ) : null Complete the dependency information.
_dependencyInputValue ( &$input, string $name, DOMNode $node ) : null Generate one element of the input data.
_fetchCurrentRelease ( ) : DOMElement | null Fetch the node holding the current release information in the changelog.
_findSingleNode ( DOMNodeList $result ) : DOMNode | false Return a single node for the result set.
_replacementNode ( DOMNode $old_node, string $value ) : DOMNode Generate a replacement node.
_requireCurrentRelease ( ) : DOMElement | null Fetch the node holding the current release information in the changelog and fail if there is no such node.

메소드 상세

__call() 공개 메소드

Catch undefined method calls and try to run them as task.
public __call ( string $name, array $arguments ) : mixed
$name string The method/task name.
$arguments array The arguments for the call.
리턴 mixed

__construct() 공개 메소드

Constructor.
public __construct ( resource | string $xml, $factory = null )
$xml resource | string The package.xml as stream or path.

__toString() 공개 메소드

Return the complete package.xml as string.
public __toString ( ) : string
리턴 string The package.xml content.

_insertWhiteSpace() 공개 메소드

Insert some white space.
public _insertWhiteSpace ( DOMNode $parent, string $ws ) : DOMNode
$parent DOMNode The parent DOMNode.
$ws string Additional white space that should be inserted.
리턴 DOMNode The inserted white space node.

addNextVersion() 공개 메소드

Add the next version to the package.xml
public addNextVersion ( string $version, string $initial_note, string $stability_api = null, string $stability_release = null, boolean $keepTime = false ) : null
$version string The new version number.
$initial_note string The text for the initial note.
$stability_api string The API stability for the next release.
$stability_release string The stability for the next release.
$keepTime boolean Keep the
리턴 null

addNote() 공개 메소드

Add a new note to the package.xml
public addNote ( string $note ) : null
$note string The note text.
리턴 null

append() 공개 메소드

public append ( $elements, $parent )

createComment() 공개 메소드

public createComment ( $comment )

createNode() 공개 메소드

public createNode ( $name, $attributes = [] )

createText() 공개 메소드

public createText ( $text )

findNode() 공개 메소드

Return a single named node matching the given XPath query.
public findNode ( string $query ) : DOMNode | false
$query string The query.
리턴 DOMNode | false The named DOMNode or empty if no node was found.

findNodeRelativeTo() 공개 메소드

Return a single named node below the given context matching the given XPath query.
public findNodeRelativeTo ( string $query, DOMNode $context ) : DOMNode | false
$query string The query.
$context DOMNode Search below this node.
리턴 DOMNode | false The named DOMNode or empty if no node was found.

findNodes() 공개 메소드

Return all nodes matching the given XPath query.
public findNodes ( string $query ) : DOMNodeList
$query string The query.
리턴 DOMNodeList The list of DOMNodes.

findNodesRelativeTo() 공개 메소드

Return all nodes matching the given XPath query.
public findNodesRelativeTo ( string $query, $context ) : DOMNodeList
$query string The query.
리턴 DOMNodeList The list of DOMNodes.

getChannel() 공개 메소드

Return the package channel.
public getChannel ( ) : string
리턴 string The channel of the package.

getContent() 공개 메소드

Return the list of contents.
public getContent ( $type = 'horde', $path = null ) : Horde_Pear_Package_Contents_List
리턴 Horde_Pear_Package_Contents_List The contents.

getDate() 공개 메소드

Return the release date.
public getDate ( ) : string
리턴 string The date for the current release.

getDependencies() 공개 메소드

Return the package dependencies.
public getDependencies ( ) : array
리턴 array The package dependencies.

getDescription() 공개 메소드

Return the package description.
public getDescription ( ) : string
리턴 string The description of the package.

getLeads() 공개 메소드

Return the package lead developers.
public getLeads ( ) : string
리턴 string The package lead developers.

getLicense() 공개 메소드

Return the license name.
public getLicense ( ) : string
리턴 string The name of the license.

getLicenseLocation() 공개 메소드

Return the URL to the license information.
public getLicenseLocation ( ) : string
리턴 string The license URI.

getName() 공개 메소드

Return the package name.
public getName ( ) : string
리턴 string The name of the package.

getNodeText() 공개 메소드

Return the content of a single named node matching the given XPath query.
public getNodeText ( string $path ) : string | false
$path string The node path.
리턴 string | false The node content as string or empty if no node was found.

getNodeTextRelativeTo() 공개 메소드

Return the content of a single named node below the given context and matching the given XPath query.
public getNodeTextRelativeTo ( string $path, DOMNode $context ) : string | false
$path string The node path.
$context DOMNode Search below this node.
리턴 string | false The node content as string or empty if no node was found.

getNotes() 공개 메소드

Return the package notes.
public getNotes ( ) : string
리턴 string The notes for the current release.

getState() 공개 메소드

Return the stability of the release or api.
public getState ( string $key = 'release' ) : string
$key string "release" or "api"
리턴 string The stability.

getSummary() 공개 메소드

Return the package summary.
public getSummary ( ) : string
리턴 string The summary of the package.

getVersion() 공개 메소드

Return the package version.
public getVersion ( ) : string
리턴 string The version of the package.

getVersions() 공개 메소드

Returns all package versions from the changelog.
public getVersions ( ) : array
리턴 array A list of versions and stabilities.

insert() 공개 메소드

public insert ( $elements, $point )

removeComment() 공개 메소드

public removeComment ( $node, $comment )

removeWhitespace() 공개 메소드

public removeWhitespace ( $node )

replaceTextNode() 공개 메소드

Replace a specific text node
public replaceTextNode ( string $path, string $value ) : DOMNodeList
$path string The XPath query pointing to the node.
$value string The new text value.
리턴 DOMNodeList The list of DOMNodes.

replaceTextNodeRelativeTo() 공개 메소드

Replace a specific text node
public replaceTextNodeRelativeTo ( string $path, DOMNode $context, string $value, $attributes = [] ) : DOMNodeList
$path string The XPath query pointing to the node.
$context DOMNode Search below this node.
$value string The new text value.
리턴 DOMNodeList The list of DOMNodes.

setState() 공개 메소드

Set the state in the package.xml
public setState ( string $rel_state = null, string $api_state = null ) : null
$rel_state string The new release state number.
$api_state string The new api state number.
리턴 null

setVersion() 공개 메소드

Set the version in the package.xml
public setVersion ( string $rel_version = null, string $api_version = null ) : null
$rel_version string The new release version number.
$api_version string The new api version number.
리턴 null

syncCurrentVersion() 공개 메소드

Synchronizes the current version information with the release information in the changelog.
public syncCurrentVersion ( ) : null
리턴 null

timestamp() 공개 메소드

Mark the package as being release and set the timestamps to now.
public timestamp ( boolean $keepTime = false )
$keepTime boolean Keep the