PHP Класс GrumPHP\Console\Helper\PathsHelper

Class PathsHelper
Наследование: extends Symfony\Component\Console\Helper\Helper
Показать файл Открыть проект

Защищенные свойства (Protected)

Свойство Тип Описание
$config GrumPHP\Configuration\GrumPHP
$fileSystem GrumPHP\Util\Filesystem

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

Метод Описание
__construct ( GrumPHP $config, Filesystem $fileSystem, ExternalCommand $externalCommandLocator, string $defaultConfigPath )
getAbsolutePath ( $path ) : mixed
getAsciiContent ( $resource ) : string Load an ascii image
getAsciiPath ( ) : string Get the path with all ascii art
getBinCommand ( $command, $forceUnix = false ) : string Search a command in the bin folder Note: the command locator is not injected because it needs the relative bin path
getBinDir ( ) : string Find the relative bin directory
getDefaultConfigPath ( ) : string
getGitDir ( ) : string Find the relative git directory
getGitHookExecutionPath ( ) : string Gets the path from where the command needs to be executed in the GIT hook.
getGitHookTemplatesDir ( ) : string The folder with all git hooks
getGitHooksDir ( ) : string Returns the directory where the git hooks are installed.
getGrumPHPPath ( ) : string Get the root path of the GrumPHP package:
getName ( )
getPathWithTrailingSlash ( string $path ) : string
getRelativePath ( $path ) : string
getRelativeProjectPath ( string $path ) : string This method will return a relative path to a file of directory if it lives in the current project.
getResourcesPath ( ) : string Get the folder which contains all resources
getWorkingDir ( ) : string This is the directory in which the cli script is initialized.

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

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

public __construct ( GrumPHP $config, Filesystem $fileSystem, ExternalCommand $externalCommandLocator, string $defaultConfigPath )
$config GrumPHP\Configuration\GrumPHP
$fileSystem GrumPHP\Util\Filesystem
$externalCommandLocator GrumPHP\Locator\ExternalCommand
$defaultConfigPath string

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

public getAbsolutePath ( $path ) : mixed
$path
Результат mixed

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

Load an ascii image
public getAsciiContent ( $resource ) : string
$resource
Результат string

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

Get the path with all ascii art
public getAsciiPath ( ) : string
Результат string

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

Search a command in the bin folder Note: the command locator is not injected because it needs the relative bin path
public getBinCommand ( $command, $forceUnix = false ) : string
$command
$forceUnix
Результат string

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

Find the relative bin directory
public getBinDir ( ) : string
Результат string

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

public getDefaultConfigPath ( ) : string
Результат string

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

Find the relative git directory
public getGitDir ( ) : string
Результат string

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

Gets the path from where the command needs to be executed in the GIT hook.
public getGitHookExecutionPath ( ) : string
Результат string

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

The folder with all git hooks
public getGitHookTemplatesDir ( ) : string
Результат string

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

Returns the directory where the git hooks are installed.
public getGitHooksDir ( ) : string
Результат string

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

Get the root path of the GrumPHP package:
public getGrumPHPPath ( ) : string
Результат string

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

public getName ( )

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

public getPathWithTrailingSlash ( string $path ) : string
$path string
Результат string

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

public getRelativePath ( $path ) : string
$path
Результат string

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

When the file is not located in the current project, the absolute path to the file is returned.
public getRelativeProjectPath ( string $path ) : string
$path string
Результат string

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

Get the folder which contains all resources
public getResourcesPath ( ) : string
Результат string

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

Normally this should be the directory where the composer.json file is located.
public getWorkingDir ( ) : string
Результат string

Описание свойств

$config защищенное свойство

protected GrumPHP,GrumPHP\Configuration $config
Результат GrumPHP\Configuration\GrumPHP

$fileSystem защищенное свойство

protected Filesystem,GrumPHP\Util $fileSystem
Результат GrumPHP\Util\Filesystem