PHP 클래스 Horde_Kolab_Format_Xml_Helper, horde

Copyright 2011-2016 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.
파일 보기 프로젝트 열기: horde/horde 1 사용 예제들

보호된 프로퍼티들

프로퍼티 타입 설명
$_xmldoc DOMDocument The XML document this object works with.

공개 메소드들

메소드 설명
__construct ( DOMDocument $xmldoc ) Constructor
__toString ( ) : string Output the document as XML string.
appendXml ( DOMNode $parent_node, string $xml ) : DOMNode Append an XML snippet.
createNewNode ( DOMNode $parent_node, string $name ) : DOMNode Create a new node.
createNodeValue ( DOMNode $parent_node, string $name, string $value ) : DOMNode Store a value as a new text node.
fetchNodeValue ( DOMNode $node ) : string | null Fetch the value of a node.
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, DOMNode $context ) : DOMNodeList Return all nodes matching the given XPath query.
removeNodes ( DOMNode $parent_node, string $name ) : null Remove named nodes from a parent node.
replaceFirstNodeTextValue ( DOMNode $node, string $value ) : null Store a value as a new text node.
storeNewNodeValue ( DOMNode $parent_node, string $name, string $value ) : DOMNode Store a value as a new text node.

비공개 메소드들

메소드 설명
_fetchFirstTextNode ( DOMNode $node ) : DOMNode | null Fetch the the first text node.

메소드 상세

__construct() 공개 메소드

Constructor
public __construct ( DOMDocument $xmldoc )
$xmldoc DOMDocument The XML document this object works with.

__toString() 공개 메소드

Output the document as XML string.
public __toString ( ) : string
리턴 string The XML output.

appendXml() 공개 메소드

Append an XML snippet.
public appendXml ( DOMNode $parent_node, string $xml ) : DOMNode
$parent_node DOMNode Attach the XML below this parent.
$xml string The XML to append.
리턴 DOMNode The new child node.

createNewNode() 공개 메소드

Create a new node.
public createNewNode ( DOMNode $parent_node, string $name ) : DOMNode
$parent_node DOMNode Attach the new node to this parent.
$name string Name of the new child node.
리턴 DOMNode The new child node.

createNodeValue() 공개 메소드

Store a value as a new text node.
public createNodeValue ( DOMNode $parent_node, string $name, string $value ) : DOMNode
$parent_node DOMNode Attach the new node to this parent.
$name string Name of the new child node.
$value string Text value of the new child node.
리턴 DOMNode The new child node.

fetchNodeValue() 공개 메소드

Fetch the value of a node.
public fetchNodeValue ( DOMNode $node ) : string | null
$node DOMNode Retrieve the text value for this node.
리턴 string | null The text value or null if no value was identified.

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, DOMNode $context ) : DOMNodeList
$query string The query.
$context DOMNode Search below this node.
리턴 DOMNodeList The list of DOMNodes.

removeNodes() 공개 메소드

Remove named nodes from a parent node.
public removeNodes ( DOMNode $parent_node, string $name ) : null
$parent_node DOMNode The parent node.
$name string The name of the children to be removed.
리턴 null

replaceFirstNodeTextValue() 공개 메소드

Store a value as a new text node.
public replaceFirstNodeTextValue ( DOMNode $node, string $value ) : null
$node DOMNode Replace the text value of this node.
$value string Text value of the new child node.
리턴 null

storeNewNodeValue() 공개 메소드

Store a value as a new text node.
public storeNewNodeValue ( DOMNode $parent_node, string $name, string $value ) : DOMNode
$parent_node DOMNode Attach the new node to this parent.
$name string Name of the new child node.
$value string Text value of the new child node.
리턴 DOMNode The new child node.

프로퍼티 상세

$_xmldoc 보호되어 있는 프로퍼티

The XML document this object works with.
protected DOMDocument $_xmldoc
리턴 DOMDocument