本文整理匯總了PHP中Piwik\SettingsPiwik::isGitDeployment方法的典型用法代碼示例。如果您正苦於以下問題:PHP SettingsPiwik::isGitDeployment方法的具體用法?PHP SettingsPiwik::isGitDeployment怎麽用?PHP SettingsPiwik::isGitDeployment使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類Piwik\SettingsPiwik
的用法示例。
在下文中一共展示了SettingsPiwik::isGitDeployment方法的4個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: isEnabled
public function isEnabled()
{
return SettingsPiwik::isGitDeployment();
}
示例2: getCurrentGitHash
private function getCurrentGitHash()
{
// we should not use 'git' executable unless we are in a git clone
if (!SettingsPiwik::isGitDeployment()) {
return 'WARN: it does not look like a Piwik repository clone - you must setup Piwik from git to proceed';
}
return trim(`git rev-parse HEAD`);
}
示例3: isEnabled
public function isEnabled()
{
return Development::isEnabled() && SettingsPiwik::isGitDeployment();
}
示例4: getCurrentGitHash
private function getCurrentGitHash()
{
// we should not use 'git' executable unless we are in a git clone
if (!SettingsPiwik::isGitDeployment()) {
return 'WARN: it does not look like a Piwik repository clone - you must setup Piwik from git to proceed';
}
$gitCmd = 'git -C ' . escapeshellarg(PIWIK_INCLUDE_PATH) . ' rev-parse HEAD';
return trim(shell_exec($gitCmd));
}