本文整理匯總了PHP中GrumPHP\Configuration\GrumPHP::getBinDir方法的典型用法代碼示例。如果您正苦於以下問題:PHP GrumPHP::getBinDir方法的具體用法?PHP GrumPHP::getBinDir怎麽用?PHP GrumPHP::getBinDir使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類GrumPHP\Configuration\GrumPHP
的用法示例。
在下文中一共展示了GrumPHP::getBinDir方法的3個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: getBinDir
/**
* Find the relative bin directory
*
* @return string
*/
public function getBinDir()
{
$binDir = $this->config->getBinDir();
if (!$this->fileSystem->exists($binDir)) {
throw new RuntimeException('The configured BIN directory could not be found.');
}
return $this->getRelativePath($binDir);
}
示例2: guessBinDir
/**
* Make a guess to the bin dir
*
* @return string
*/
protected function guessBinDir()
{
$defaultBinDir = $this->config->getBinDir();
if (!$this->composer()->hasConfiguration()) {
return $defaultBinDir;
}
$config = $this->composer()->getConfiguration();
if (!$config->has('bin-dir')) {
return $defaultBinDir;
}
return $config->get('bin-dir', Config::RELATIVE_PATHS);
}
示例3: guessBinDir
/**
* Make a guess to the bin dir
*
* @return string
*/
protected function guessBinDir()
{
$defaultBinDir = $this->config->getBinDir();
$composerFile = 'composer.json';
if (!$this->filesystem->exists($composerFile)) {
return $defaultBinDir;
}
$composer = json_decode(file_get_contents('composer.json'), true);
if (isset($composer['config']['bin-dir'])) {
return $composer['config']['bin-dir'];
}
return $defaultBinDir;
}