DevToolsPathResolver
Resolves canonical paths for the DevTools package itself.
Constants
Methods
Returns the packaged DevTools binary command with a subcommand.
Returns the packaged DevTools binary path.
Returns the DevTools package directory or a path under it.
Returns the packaged resources directory or a path under it.
Detects whether the provided path belongs to an installed vendor copy of DevTools.
Detects whether the provided path belongs to the DevTools repository checkout itself.
public
string
BINARY
=
'bin/dev-tools'
Description
the relative path to the packaged DevTools binary
public
string
RESOURCES
=
'resources'
Description
the resources directory segment within the package
private
string
VENDOR_PACKAGE_PATH
=
\DIRECTORY_SEPARATOR . 'vendor' . \DIRECTORY_SEPARATOR . 'fast-forward' . \DIRECTORY_SEPARATOR . 'dev-tools'
Description
the vendor install path fragment used when DevTools runs as a dependency
Returns the packaged DevTools binary command with a subcommand.
public
static
getBinaryCommand(
string
$command) : string
Parameters
$command
:
string
Description
the DevTools subcommand to append
Return values
Returns the packaged DevTools binary path.
public
static
getBinaryPath() : string
Return values
Returns the DevTools package directory or a path under it.
public
static
getPackagePath([
string
$path = '']) : string
Parameters
$path
:
string
=
''
Description
the optional relative segment to append under the package directory
Return values
Returns the packaged resources directory or a path under it.
public
static
getResourcesPath([
string
$path = '']) : string
Parameters
$path
:
string
=
''
Description
the optional relative segment to append under resources
Return values
Detects whether the provided path belongs to an installed vendor copy of DevTools.
public
static
isInstalledAsDependency([
string
$packagePath = '']) : bool
Parameters
$packagePath
:
string
=
''
Description
an optional path within the package; defaults to the package root
Return values
Detects whether the provided path belongs to the DevTools repository checkout itself.
public
static
isRepositoryCheckout([
string
$packagePath = '']) : bool
Parameters
$packagePath
:
string
=
''
Description
an optional path within the package; defaults to the package root