Horde_Pear_Package_Xml_Element_Directory
in package
Handles a XML directory node in the contents list.
Tags
Table of Contents
- $_dir : DOMNode
- The directory node.
- $_level : int
- The level in the tree.
- $_name : string
- The name of this directory.
- $_path : string
- The path to this directory.
- $_xml : Horde_Pear_Package_Xml
- The package.xml handler to operate on.
- __construct() : mixed
- 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<string|int, mixed>
- Return the list of files in this directory.
- getLevel() : int
- 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<string|int, mixed>
- Return the subdirectories for this directory.
- insert() : null
- Insert the directory entry into the XML at the given point.
- insertFile() : 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() : Horde_Pear_Package_Xml_Element_Directory
- Insert a new directory entry into the XML at the given point with the specified name
- setDirectoryNode() : null
- Set the DOM node of the directory entry.
- setDocument() : null
- Set the package.xml handler to operate on.
Properties
$_dir
The directory node.
private
DOMNode
$_dir
$_level
The level in the tree.
private
int
$_level
$_name
The name of this directory.
private
string
$_name
$_path
The path to this directory.
private
string
$_path
$_xml
The package.xml handler to operate on.
private
Horde_Pear_Package_Xml
$_xml
Methods
__construct()
Constructor.
public
__construct(string $name[, Horde_Pear_Package_Xml_Element_Directory $parent = null ]) : mixed
Parameters
- $name : string
-
The name of the directory.
- $parent : Horde_Pear_Package_Xml_Element_Directory = null
-
The parent directory.
Return values
mixed —delete()
Remove the directory entry from the XML.
public
delete() : null
Return values
null —getDirectoryNode()
Get the DOM node of the directory entry.
public
getDirectoryNode() : DOMNode
Return values
DOMNode —The directory node.
getDocument()
Return the package.xml handler this element belongs to.
public
getDocument() : Horde_Pear_Package_Xml
Return values
Horde_Pear_Package_Xml —The XML handler.
getFiles()
Return the list of files in this directory.
public
getFiles() : array<string|int, mixed>
Return values
array<string|int, mixed> —The list of files.
getLevel()
Return the level of depth in the tree for this directory.
public
getLevel() : int
Return values
int —The level.
getName()
Return the name of this directory.
public
getName() : string
Return values
string —The directory name.
getPath()
Return the full path to this element.
public
getPath() : string
Return values
string —The path.
getSubdirectories()
Return the subdirectories for this directory.
public
getSubdirectories() : array<string|int, mixed>
Return values
array<string|int, mixed> —The list of subdirectories.
insert()
Insert the directory entry into the XML at the given point.
public
insert(Horde_Pear_Package_Xml_Element_Directory $parent[, DOMNode $point = null ]) : null
Parameters
- $parent : Horde_Pear_Package_Xml_Element_Directory
-
The parent.
- $point : DOMNode = null
-
Insertion point.
Return values
null —insertFile()
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 ][, array<string|int, mixed> $replace = array() ]) : Horde_Pear_Package_Xml_Element_File
Parameters
- $name : string
-
The name.
- $role : string
-
The role.
- $point : DOMNode = null
-
Insertion point.
- $replace : array<string|int, mixed> = array()
-
Replacement tasks.
Return values
Horde_Pear_Package_Xml_Element_File —The inserted element.
insertSubDirectory()
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
Parameters
- $name : string
-
The name.
- $point : DOMNode = null
-
Insertion point.
Return values
Horde_Pear_Package_Xml_Element_Directory —The inserted element.
setDirectoryNode()
Set the DOM node of the directory entry.
public
setDirectoryNode(DOMNode $directory) : null
Parameters
- $directory : DOMNode
-
The directory node.
Return values
null —setDocument()
Set the package.xml handler to operate on.
public
setDocument(Horde_Pear_Package_Xml $xml) : null
Parameters
- $xml : Horde_Pear_Package_Xml
-
The XML handler.