本文整理汇总了PHP中PHPCI\Builder::getBuildProjectTitle方法的典型用法代码示例。如果您正苦于以下问题:PHP Builder::getBuildProjectTitle方法的具体用法?PHP Builder::getBuildProjectTitle怎么用?PHP Builder::getBuildProjectTitle使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类PHPCI\Builder
的用法示例。
在下文中一共展示了Builder::getBuildProjectTitle方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: execute
/**
* Connects to MySQL and runs a specified set of queries.
*/
public function execute()
{
$addresses = $this->getEmailAddresses();
// Without some email addresses in the yml file then we
// can't do anything.
if (count($addresses) == 0) {
return false;
}
$subjectTemplate = "PHPCI - %s - %s";
$projectName = $this->phpci->getBuildProjectTitle();
$logText = $this->build->getLog();
if ($this->build->isSuccessful()) {
$sendFailures = $this->sendSeparateEmails($addresses, sprintf($subjectTemplate, $projectName, "Passing Build"), sprintf("Log Output: <br><pre>%s</pre>", $logText));
} else {
$view = new View('Email/failed');
$view->build = $this->build;
$view->project = $this->build->getProject();
$emailHtml = $view->render();
$sendFailures = $this->sendSeparateEmails($addresses, sprintf($subjectTemplate, $projectName, "Failing Build"), $emailHtml);
}
// This is a success if we've not failed to send anything.
$this->phpci->log(sprintf("%d emails sent", count($addresses) - count($sendFailures)));
$this->phpci->log(sprintf("%d emails failed to send", count($sendFailures)));
return count($sendFailures) == 0;
}
示例2: __construct
/**
* Set up the plugin, configure options, etc.
* @param Builder $phpci
* @param Build $build
* @param array $options
*/
public function __construct(Builder $phpci, Build $build, array $options = array())
{
$this->phpci = $phpci;
$this->build = $build;
$this->directory = isset($options['directory']) ? $options['directory'] : $phpci->buildPath;
$title = $phpci->getBuildProjectTitle();
$this->summary = $title . '-summary.xml';
$this->pyramid = $title . '-pyramid.svg';
$this->chart = $title . '-chart.svg';
$this->location = $this->phpci->buildPath . '..' . DIRECTORY_SEPARATOR . 'pdepend';
}