PHP Class Horde_Pear_Package_Xml_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.
Mostra file Open project: horde/horde Class Usage Examples

Public Methods

Method Description
__construct ( Horde_Pear_Package_Xml_Element_Directory $dir, mixed $parent ) Constructor.
addFile ( string $file, array $params ) : null Add a file to the list.
deleteFile ( string $file ) : null Delete a file from the list.
getDirectory ( ) : DOMNode Return the directory node.
getFiles ( ) : array Return the list of files in this hierarchy.
getParent ( array $tree ) : DOMNode Ensure the provided path hierarchy.

Private Methods

Method Description
_addFile ( string $file, array $params ) : null Add a file to the list.
_create ( Horde_Pear_Package_Xml_Element_Directory $element, Horde_Pear_Package_Xml_Directory $parent ) : Horde_Pear_Package_Xml_Directory Create a new directory handler.
_deleteFile ( string $file ) : null Delete a file from the list.
_deleteSubdirectory ( string $dir ) : null Delete a subdirectory from the list.
_fileOrder ( string $a, string $b ) : integer Sort order for files in the content list.
_getDirectoryInsertionPoint ( string $new ) : mixed Identify the insertion point for a new directory.
_getFileInsertionPoint ( string $new ) : mixed Identify the insertion point for a new file.
_getRoot ( ) : Horde_Pear_Package_Xml_Directory Create a new directory handler.
_prependDirectory ( string $path ) : The Prepend the directory name of this directory to the path name.
_prune ( ) : null Prune this directory if it is empty.

Method Details

__construct() public method

Constructor.
public __construct ( Horde_Pear_Package_Xml_Element_Directory $dir, mixed $parent )
$dir Horde_Pear_Package_Xml_Element_Directory The directory element.
$parent mixed The parent directory or the XML document.

addFile() public method

Add a file to the list.
public addFile ( string $file, array $params ) : null
$file string The file name.
$params array Additional file parameters.
return null

deleteFile() public method

Delete a file from the list.
public deleteFile ( string $file ) : null
$file string The file name.
return null

getDirectory() public method

Return the directory node.
public getDirectory ( ) : DOMNode
return DOMNode The directory node.

getFiles() public method

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

getParent() public method

Ensure the provided path hierarchy.
public getParent ( array $tree ) : DOMNode
$tree array The path elements that are required.
return DOMNode The parent directory for the file.