当前位置: 首页>>代码示例>>PHP>>正文


PHP Site::GetName方法代码示例

本文整理汇总了PHP中Site::GetName方法的典型用法代码示例。如果您正苦于以下问题:PHP Site::GetName方法的具体用法?PHP Site::GetName怎么用?PHP Site::GetName使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Site的用法示例。


在下文中一共展示了Site::GetName方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: send_email_to_address

function send_email_to_address($emailaddress, $emailtext, $Build, $Project)
{
    include 'config/config.php';
    include_once 'include/common.php';
    require_once 'models/site.php';
    $serverURI = get_server_URI();
    // In the case of asynchronous submission, the serverURI contains /cdash
    // we need to remove it
    if ($CDASH_BASE_URL == '' && $CDASH_ASYNCHRONOUS_SUBMISSION) {
        $serverURI = substr($serverURI, 0, strrpos($serverURI, '/'));
    }
    $messagePlainText = 'A submission to CDash for the project ' . $Project->Name . ' has ';
    $titleerrors = '(';
    $i = 0;
    foreach ($emailtext['category'] as $key => $value) {
        if ($key != 'update_errors' && $key != 'configure_errors' && $key != 'build_warnings' && $key != 'build_errors' && $key != 'test_errors' && $key != 'dynamicanalysis_errors') {
            continue;
        }
        if ($i > 0) {
            $messagePlainText .= ' and ';
            $titleerrors .= ', ';
        }
        switch ($key) {
            case 'update_errors':
                $messagePlainText .= 'update errors';
                $titleerrors .= 'u=' . $value;
                break;
            case 'configure_errors':
                $messagePlainText .= 'configure errors';
                $titleerrors .= 'c=' . $value;
                break;
            case 'build_warnings':
                $messagePlainText .= 'build warnings';
                $titleerrors .= 'w=' . $value;
                break;
            case 'build_errors':
                $messagePlainText .= 'build errors';
                $titleerrors .= 'b=' . $value;
                break;
            case 'test_errors':
                $messagePlainText .= 'failing tests';
                $titleerrors .= 't=' . $value;
                break;
            case 'dynamicanalysis_errors':
                $messagePlainText .= 'failing dynamic analysis tests';
                $titleerrors .= 'd=' . $value;
                break;
        }
        $i++;
    }
    // Nothing to send we stop
    if ($i == 0) {
        return;
    }
    // Title
    $titleerrors .= '):';
    $title = 'FAILED ' . $titleerrors . ' ' . $Project->Name;
    if ($Build->GetSubProjectName()) {
        $title .= '/' . $Build->GetSubProjectName();
    }
    $title .= ' - ' . $Build->Name . ' - ' . $Build->Type;
    //$title = "CDash [".$project_array["name"]."] - ".$site_array["name"];
    //$title .= " - ".$buildname." - ".$buildtype." - ".date(FMT_DATETIMETZ,strtotime($starttime." UTC"));
    $messagePlainText .= ".\n";
    $messagePlainText .= 'You have been identified as one of the authors who ';
    $messagePlainText .= 'have checked in changes that are part of this submission ';
    $messagePlainText .= "or you are listed in the default contact list.\n\n";
    $messagePlainText .= 'Details on the submission can be found at ';
    $messagePlainText .= $serverURI;
    $messagePlainText .= '/buildSummary.php?buildid=' . $Build->Id;
    $messagePlainText .= "\n\n";
    $messagePlainText .= 'Project: ' . $Project->Name . "\n";
    if ($Build->GetSubProjectName()) {
        $messagePlainText .= 'SubProject: ' . $Build->GetSubProjectName() . "\n";
    }
    $Site = new Site();
    $Site->Id = $Build->SiteId;
    $messagePlainText .= 'Site: ' . $Site->GetName() . "\n";
    $messagePlainText .= 'Build Name: ' . $Build->Name . "\n";
    $messagePlainText .= 'Build Time: ' . date(FMT_DATETIMETZ, strtotime($Build->StartTime . ' UTC')) . "\n";
    $messagePlainText .= 'Type: ' . $Build->Type . "\n";
    foreach ($emailtext['category'] as $key => $value) {
        switch ($key) {
            case 'update_errors':
                $messagePlainText .= "Update errors: {$value}\n";
                break;
            case 'configure_errors':
                $messagePlainText .= "Configure errors: {$value}\n";
                break;
            case 'build_warnings':
                $messagePlainText .= "Warnings: {$value}\n";
                break;
            case 'build_errors':
                $messagePlainText .= "Errors: {$value}\n";
                break;
            case 'test_errors':
                $messagePlainText .= "Tests failing: {$value}\n";
                break;
            case 'dynamicanalysis_errors':
                $messagePlainText .= "Dynamic analysis tests failing: {$value}\n";
//.........这里部分代码省略.........
开发者ID:kitware,项目名称:cdash,代码行数:101,代码来源:sendemail.php

示例2: urlencode

 $xml .= add_XML_value("name_encoded", urlencode($Project->GetName()));
 if ($buildid > 0) {
     $xml .= add_XML_value("buildid", $buildid);
 }
 $CoverageSummary = new CoverageSummary();
 $buildids = $CoverageSummary->GetBuilds($Project->Id, $beginUTCTime, $currentUTCTime);
 rsort($buildids);
 foreach ($buildids as $buildId) {
     $Build = new Build();
     $Build->Id = $buildId;
     $Build->FillFromId($Build->Id);
     $xml .= "<build>";
     $xml .= add_XML_value("id", $buildId);
     $Site = new Site();
     $Site->Id = $Build->SiteId;
     $xml .= add_XML_value("name", $Site->GetName() . "-" . $Build->GetName() . " [" . gmdate(FMT_DATETIME, strtotime($Build->StartTime)) . "]");
     if ($buildid > 0 && $buildId == $buildid) {
         $xml .= add_XML_value("selected", 1);
     }
     $xml .= "</build>";
 }
 // For now take the first one
 if ($buildid > 0) {
     // Find the files associated with the build
     $Coverage = new Coverage();
     $Coverage->BuildId = $buildid;
     $fileIds = $Coverage->GetFiles();
     $row = "0";
     sort($fileIds);
     foreach ($fileIds as $fileid) {
         $CoverageFile = new CoverageFile();
开发者ID:rpshaw,项目名称:CDash,代码行数:31,代码来源:manageCoverage.php

示例3: send_email_to_address

function send_email_to_address($emailaddress, $emailtext, $Build, $Project)
{
    include "cdash/config.php";
    include_once "cdash/common.php";
    require_once "models/site.php";
    $serverURI = get_server_URI();
    // In the case of asynchronous submission, the serverURI contains /cdash
    // we need to remove it
    if ($CDASH_BASE_URL == '' && $CDASH_ASYNCHRONOUS_SUBMISSION) {
        $serverURI = substr($serverURI, 0, strrpos($serverURI, "/"));
    }
    $messagePlainText = "A submission to CDash for the project " . $Project->Name . " has ";
    $titleerrors = "(";
    $i = 0;
    foreach ($emailtext['category'] as $key => $value) {
        if ($key != 'update_errors' && $key != 'configure_errors' && $key != 'build_warnings' && $key != 'build_errors' && $key != 'test_errors' && $key != 'dynamicanalysis_errors') {
            continue;
        }
        if ($i > 0) {
            $messagePlainText .= " and ";
            $titleerrors .= ", ";
        }
        switch ($key) {
            case 'update_errors':
                $messagePlainText .= "update errors";
                $titleerrors .= "u=" . $value;
                break;
            case 'configure_errors':
                $messagePlainText .= "configure errors";
                $titleerrors .= "c=" . $value;
                break;
            case 'build_warnings':
                $messagePlainText .= "build warnings";
                $titleerrors .= "w=" . $value;
                break;
            case 'build_errors':
                $messagePlainText .= "build errors";
                $titleerrors .= "b=" . $value;
                break;
            case 'test_errors':
                $messagePlainText .= "failing tests";
                $titleerrors .= "t=" . $value;
                break;
            case 'dynamicanalysis_errors':
                $messagePlainText .= "failing dynamic analysis tests";
                $titleerrors .= "d=" . $value;
                break;
        }
        $i++;
    }
    // Nothing to send we stop
    if ($i == 0) {
        return;
    }
    // Title
    $titleerrors .= "):";
    $title = "FAILED " . $titleerrors . " " . $Project->Name;
    if ($Build->GetSubProjectName()) {
        $title .= "/" . $Build->GetSubProjectName();
    }
    $title .= " - " . $Build->Name . " - " . $Build->Type;
    //$title = "CDash [".$project_array["name"]."] - ".$site_array["name"];
    //$title .= " - ".$buildname." - ".$buildtype." - ".date(FMT_DATETIMETZ,strtotime($starttime." UTC"));
    $messagePlainText .= ".\n";
    $messagePlainText .= "You have been identified as one of the authors who ";
    $messagePlainText .= "have checked in changes that are part of this submission ";
    $messagePlainText .= "or you are listed in the default contact list.\n\n";
    $messagePlainText .= "Details on the submission can be found at ";
    $messagePlainText .= $serverURI;
    $messagePlainText .= "/buildSummary.php?buildid=" . $Build->Id;
    $messagePlainText .= "\n\n";
    $messagePlainText .= "Project: " . $Project->Name . "\n";
    if ($Build->GetSubProjectName()) {
        $messagePlainText .= "SubProject: " . $Build->GetSubProjectName() . "\n";
    }
    $Site = new Site();
    $Site->Id = $Build->SiteId;
    $messagePlainText .= "Site: " . $Site->GetName() . "\n";
    $messagePlainText .= "Build Name: " . $Build->Name . "\n";
    $messagePlainText .= "Build Time: " . date(FMT_DATETIMETZ, strtotime($Build->StartTime . " UTC")) . "\n";
    $messagePlainText .= "Type: " . $Build->Type . "\n";
    foreach ($emailtext['category'] as $key => $value) {
        switch ($key) {
            case 'update_errors':
                $messagePlainText .= "Update errors: {$value}\n";
                break;
            case 'configure_errors':
                $messagePlainText .= "Configure errors: {$value}\n";
                break;
            case 'build_warnings':
                $messagePlainText .= "Warnings: {$value}\n";
                break;
            case 'build_errors':
                $messagePlainText .= "Errors: {$value}\n";
                break;
            case 'test_errors':
                $messagePlainText .= "Tests failing: {$value}\n";
                break;
            case 'dynamicanalysis_errors':
                $messagePlainText .= "Dynamic analysis tests failing: {$value}\n";
//.........这里部分代码省略.........
开发者ID:rpshaw,项目名称:CDash,代码行数:101,代码来源:sendemail.php

示例4: date

}
$xml = begin_XML_for_XSLT();
$xml .= get_cdash_dashboard_xml(get_project_name($projectid), $date);
$db = pdo_connect("{$CDASH_DB_HOST}", "{$CDASH_DB_LOGIN}", "{$CDASH_DB_PASS}");
pdo_select_db("{$CDASH_DB_NAME}", $db);
$xml .= add_XML_value("title", "CDash - Uploaded files");
$xml .= add_XML_value("menutitle", "CDash");
$xml .= add_XML_value("menusubtitle", "Uploaded files");
$xml .= "<hostname>" . $_SERVER['SERVER_NAME'] . "</hostname>";
$xml .= "<date>" . date("r") . "</date>";
$xml .= "<backurl>index.php</backurl>";
$xml .= "<buildid>{$buildid}</buildid>";
$xml .= '<buildname>' . $Build->Name . '</buildname>';
$xml .= '<buildstarttime>' . $Build->StartTime . '</buildstarttime>';
$xml .= '<siteid>' . $Site->Id . '</siteid>';
$xml .= '<sitename>' . $Site->GetName() . '</sitename>';
$uploadFilesOrURLs = $Build->GetUploadedFilesOrUrls();
foreach ($uploadFilesOrURLs as $uploadFileOrURL) {
    if (!$uploadFileOrURL->IsUrl) {
        $xml .= '<uploadfile>';
        $xml .= '<id>' . $uploadFileOrURL->Id . '</id>';
        $xml .= '<href>' . $CDASH_DOWNLOAD_RELATIVE_URL . '/' . $uploadFileOrURL->Sha1Sum . '/' . $uploadFileOrURL->Filename . '</href>';
        $xml .= '<sha1sum>' . $uploadFileOrURL->Sha1Sum . '</sha1sum>';
        $xml .= '<filename>' . $uploadFileOrURL->Filename . '</filename>';
        $xml .= '<filesize>' . $uploadFileOrURL->Filesize . '</filesize>';
        $filesize = $uploadFileOrURL->Filesize;
        $ext = "b";
        if ($filesize > 1024) {
            $filesize /= 1024;
            $ext = "Kb";
        }
开发者ID:rpshaw,项目名称:CDash,代码行数:31,代码来源:viewFiles.php


注:本文中的Site::GetName方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。