PHP Класс 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.
Автор: Gunnar Wrobel ([email protected])
Показать файл Открыть проект Примеры использования класса

Открытые методы

Метод Описание
__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.

Приватные методы

Метод Описание
_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.

Описание методов

__construct() публичный Метод

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() публичный Метод

Add a file to the list.
public addFile ( string $file, array $params ) : null
$file string The file name.
$params array Additional file parameters.
Результат null

deleteFile() публичный Метод

Delete a file from the list.
public deleteFile ( string $file ) : null
$file string The file name.
Результат null

getDirectory() публичный Метод

Return the directory node.
public getDirectory ( ) : DOMNode
Результат DOMNode The directory node.

getFiles() публичный Метод

Return the list of files in this hierarchy.
public getFiles ( ) : array
Результат array The file list.

getParent() публичный Метод

Ensure the provided path hierarchy.
public getParent ( array $tree ) : DOMNode
$tree array The path elements that are required.
Результат DOMNode The parent directory for the file.