PHP 클래스 GrumPHP\Console\Helper\PathsHelper

Class PathsHelper
상속: extends Symfony\Component\Console\Helper\Helper
파일 보기 프로젝트 열기: phpro/grumphp

보호된 프로퍼티들

프로퍼티 타입 설명
$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