PHP Класс Components_Helper_Root, horde

Copyright 2010-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 ( array $opts = [], Components_Component $comp = null, string $path = null ) Constructor.
getGitIgnore ( ) : string Return the contents of the gitignore file.
getPackageXml ( string $name ) : string Return the path to the package.xml for the package with the provided name.
getRoot ( ) : string Return the root position of the repository.
traverseHierarchy ( string $start ) : string | boolean Traverse the folder tree upwards to determine if a parent folder of the provided file path might be the Horde repository root.

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

Метод Описание
_determineRoot ( ) : string Try to determine the root path.
_determineRootFromComponent ( ) : string | boolean Try to determine the root path based on a component.
_determineRootFromCwd ( ) : string | boolean Try to determine the root path based on the current working directory.
_determineRootFromOptions ( ) : string | boolean Try to determine the root path based on the options.
_determineRootFromPath ( ) : string | boolean Try to determine the root path based on a fixed path.
_isValidRoot ( string $directory ) : string | boolean Test if the directory path could be the Horde repository root.

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

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

Constructor.
public __construct ( array $opts = [], Components_Component $comp = null, string $path = null )
$opts array If given the helper will try to determine the root of the Horde repository based on these options.
$comp Components_Component If given the helper will try to determine the root of the Horde repository based on this component.
$path string If given the helper will try to determine the root of the Horde repository based on this path.

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

Return the contents of the gitignore file.
public getGitIgnore ( ) : string
Результат string The information from the gitignore file.

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

Return the path to the package.xml for the package with the provided name.
public getPackageXml ( string $name ) : string
$name string The name of the package.
Результат string The path to the package.xml of the requested package.

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

Return the root position of the repository.
public getRoot ( ) : string
Результат string The root path.

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

Traverse the folder tree upwards to determine if a parent folder of the provided file path might be the Horde repository root.
public traverseHierarchy ( string $start ) : string | boolean
$start string Path to the file to start from.
Результат string | boolean The root path or false if it could not be determined.