PHP Class Horde_Pear_Package_Xml_Element_Directory, 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.
Show file Open project: horde/horde Class Usage Examples

Public Methods

Method Description
__construct ( string $name, Horde_Pear_Package_Xml_Element_Directory $parent = null ) Constructor.
delete ( ) : null Remove the directory entry from the XML.
getDirectoryNode ( ) : DOMNode Get the DOM node of the directory entry.
getDocument ( ) : Horde_Pear_Package_Xml Return the package.xml handler this element belongs to.
getFiles ( ) : array Return the list of files in this directory.
getLevel ( ) : integer Return the level of depth in the tree for this directory.
getName ( ) : string Return the name of this directory.
getPath ( ) : string Return the full path to this element.
getSubdirectories ( ) : array Return the subdirectories for this directory.
insertFile ( string $name, string $role, DOMNode $point = null ) : Horde_Pear_Package_Xml_Element_File Insert a new file entry into the XML at the given point with the specified name and file role.
insertSubDirectory ( string $name, DOMNode $point = null ) : Horde_Pear_Package_Xml_Element_Directory Insert a new directory entry into the XML at the given point with the specified name
setDirectoryNode ( DOMNode $directory ) : null Set the DOM node of the directory entry.
setDocument ( Horde_Pear_Package_Xml $xml ) : null Set the package.xml handler to operate on.

Private Methods

Method Description
_insert ( Horde_Pear_Package_Xml_Element_Directory $parent, DOMNode $point = null ) : null Insert the directory entry into the XML at the given point.

Method Details

__construct() public method

Constructor.
public __construct ( string $name, Horde_Pear_Package_Xml_Element_Directory $parent = null )
$name string The name of the directory.
$parent Horde_Pear_Package_Xml_Element_Directory The parent directory.

delete() public method

Remove the directory entry from the XML.
public delete ( ) : null
return null

getDirectoryNode() public method

Get the DOM node of the directory entry.
public getDirectoryNode ( ) : DOMNode
return DOMNode The directory node.

getDocument() public method

Return the package.xml handler this element belongs to.
public getDocument ( ) : Horde_Pear_Package_Xml
return Horde_Pear_Package_Xml The XML handler.

getFiles() public method

Return the list of files in this directory.
public getFiles ( ) : array
return array The list of files.

getLevel() public method

Return the level of depth in the tree for this directory.
public getLevel ( ) : integer
return integer The level.

getName() public method

Return the name of this directory.
public getName ( ) : string
return string The directory name.

getPath() public method

Return the full path to this element.
public getPath ( ) : string
return string The path.

getSubdirectories() public method

Return the subdirectories for this directory.
public getSubdirectories ( ) : array
return array The list of subdirectories.

insertFile() public method

Insert a new file entry into the XML at the given point with the specified name and file role.
public insertFile ( string $name, string $role, DOMNode $point = null ) : Horde_Pear_Package_Xml_Element_File
$name string The name.
$role string The role.
$point DOMNode Insertion point.
return Horde_Pear_Package_Xml_Element_File The inserted element.

insertSubDirectory() public method

Insert a new directory entry into the XML at the given point with the specified name
public insertSubDirectory ( string $name, DOMNode $point = null ) : Horde_Pear_Package_Xml_Element_Directory
$name string The name.
$point DOMNode Insertion point.
return Horde_Pear_Package_Xml_Element_Directory The inserted element.

setDirectoryNode() public method

Set the DOM node of the directory entry.
public setDirectoryNode ( DOMNode $directory ) : null
$directory DOMNode The directory node.
return null

setDocument() public method

Set the package.xml handler to operate on.
public setDocument ( Horde_Pear_Package_Xml $xml ) : null
$xml Horde_Pear_Package_Xml The XML handler.
return null