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


PHP Builder::getConfig方法代码示例

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


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

示例1: extendSvnCommandFromConfig

 /**
  * @param Builder $builder
  *
  * @return void
  */
 protected function extendSvnCommandFromConfig(Builder $builder)
 {
     $cmd = $this->svnCommand;
     $svn = $builder->getConfig('svn');
     if ($svn) {
         foreach ($svn as $key => $value) {
             $cmd .= " --{$key} {$value} ";
         }
     }
     $depth = $builder->getConfig('clone_depth');
     if (!is_null($depth)) {
         $cmd .= ' --depth ' . intval($depth) . ' ';
     }
     $this->svnCommand = $cmd;
 }
开发者ID:zeus911,项目名称:PHPCI,代码行数:20,代码来源:SubversionBuild.php

示例2: __construct

 public function __construct(Builder $phpci, Build $build, array $options = array())
 {
     $this->phpci = $phpci;
     $this->build = $build;
     $buildSettings = $phpci->getConfig('build_settings');
     if (isset($buildSettings['redmine'])) {
         $redmine = $buildSettings['redmine'];
         $this->server = $redmine['server'];
         $this->apiKey = $redmine['api_key'];
     }
     if (isset($options['enabled'])) {
         $this->enabled = $options['enabled'];
     }
     if (isset($options['status'])) {
         $this->status = $options['status'];
     }
     if (isset($options['prev_status'])) {
         $this->prevStatus = $options['prev_status'];
     }
     if (isset($options['percent'])) {
         $this->percent = $options['percent'];
     }
     if (isset($options['lang'])) {
         $this->lang = $options['lang'];
     }
     if (isset($options['issue_regexp'])) {
         $this->issueRegexp = $options['issue_regexp'];
     }
     $parser = new YamlParser();
     $config = (array) $parser->parse(file_get_contents(__DIR__ . '/messages.yml'));
     $this->messages = $config[$this->lang];
 }
开发者ID:intaro,项目名称:phpci-redmine-plugin,代码行数:32,代码来源:Redmine.php

示例3: cloneBySsh

 /**
  * Use an SSH-based git clone.
  */
 protected function cloneBySsh(Builder $builder, $cloneTo)
 {
     $keyFile = $this->writeSshKey($cloneTo);
     if (!IS_WIN) {
         $gitSshWrapper = $this->writeSshWrapper($cloneTo, $keyFile);
     }
     // Do the git clone:
     $cmd = 'git clone --recursive ';
     $depth = $builder->getConfig('clone_depth');
     if (!is_null($depth)) {
         $cmd .= ' --depth ' . intval($depth) . ' ';
     }
     $cmd .= ' -b %s %s "%s"';
     if (!IS_WIN) {
         $cmd = 'export GIT_SSH="' . $gitSshWrapper . '" && ' . $cmd;
     }
     $success = $builder->executeCommand($cmd, $this->getBranch(), $this->getCloneUrl(), $cloneTo);
     if ($success) {
         $success = $this->postCloneSetup($builder, $cloneTo);
     }
     // Remove the key file and git wrapper:
     unlink($keyFile);
     if (!IS_WIN) {
         unlink($gitSshWrapper);
     }
     return $success;
 }
开发者ID:SendiMyrkr,项目名称:PHPCI,代码行数:30,代码来源:RemoteGitBuild.php

示例4: __construct

 /**
  * @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->queries = $options;
     $buildSettings = $phpci->getConfig('build_settings');
     if (isset($buildSettings['sqlite'])) {
         $sql = $buildSettings['sqlite'];
         $this->path = $sql['path'];
     }
 }
开发者ID:mrudtf,项目名称:PHPCI,代码行数:16,代码来源:Sqlite.php

示例5: __construct

 /**
  * @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->queries = $options;
     $buildSettings = $phpci->getConfig('build_settings');
     if (isset($buildSettings['pgsql'])) {
         $sql = $buildSettings['pgsql'];
         $this->host = $sql['host'];
         $this->user = $sql['user'];
         $this->pass = $sql['pass'];
     }
 }
开发者ID:nelsonyang0710,项目名称:PHPCI,代码行数:18,代码来源:Pgsql.php

示例6: __construct

 /**
  * Standard Constructor
  *
  * $options['directory'] Output Directory. Default: %BUILDPATH%
  * $options['filename']  Phar Filename. Default: build.phar
  * $options['regexp']    Regular Expression Filename Capture. Default: /\.php$/
  * $options['stub']      Stub Content. No Default Value
  *
  * @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->message = $options['message'];
     $buildSettings = $phpci->getConfig('build_settings');
     if (isset($buildSettings['irc'])) {
         $irc = $buildSettings['irc'];
         $this->server = $irc['server'];
         $this->port = $irc['port'];
         $this->room = $irc['room'];
         $this->nick = $irc['nick'];
     }
 }
开发者ID:ntoniazzi,项目名称:PHPCI,代码行数:26,代码来源:Irc.php

示例7: cloneBySsh

 /**
  * Use an SSH-based git clone.
  */
 protected function cloneBySsh(Builder $builder, $cloneTo)
 {
     // Do the git clone:
     $cmd = 'git clone ';
     $depth = $builder->getConfig('clone_depth');
     if (!is_null($depth)) {
         $cmd .= ' --depth ' . intval($depth) . ' ';
     }
     $cmd .= ' -b %s %s "%s"';
     $success = $builder->executeCommand($cmd, $this->getBranch(), $this->getCloneUrl(), $cloneTo);
     if ($success) {
         $success = $this->postCloneSetup($builder, $cloneTo);
     }
     return $success;
 }
开发者ID:bztrn,项目名称:PHPCI,代码行数:18,代码来源:RemoteGitBuild.php

示例8: __construct

 /**
  * Set up the plugin, configure options, etc.
  * @param Builder $phpci
  * @param Build $build
  * @param array $options
  * @throws \Exception
  */
 public function __construct(Builder $phpci, Build $build, array $options = array())
 {
     $this->phpci = $phpci;
     $this->build = $build;
     $this->message = $options['message'];
     $this->userAgent = "PHPCI/1.0 (+http://www.phptesting.org/)";
     $this->cookie = "phpcicookie";
     $buildSettings = $phpci->getConfig('build_settings');
     if (isset($buildSettings['campfire'])) {
         $campfire = $buildSettings['campfire'];
         $this->url = $campfire['url'];
         $this->authToken = $campfire['authToken'];
         $this->roomId = $campfire['roomId'];
     } else {
         throw new \Exception(Lang::get('no_campfire_settings'));
     }
 }
开发者ID:nelsonyang0710,项目名称:PHPCI,代码行数:24,代码来源:Campfire.php

示例9: __construct

 /**
  * @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->queries = $options;
     $config = \b8\Database::getConnection('write')->getDetails();
     $this->host = defined('PHPCI_DB_HOST') ? PHPCI_DB_HOST : null;
     $this->user = $config['user'];
     $this->pass = $config['pass'];
     $buildSettings = $phpci->getConfig('build_settings');
     if (!isset($buildSettings['mysql'])) {
         return;
     }
     if (!empty($buildSettings['mysql']['host'])) {
         $this->host = $this->phpci->interpolate($buildSettings['mysql']['host']);
     }
     if (!empty($buildSettings['mysql']['user'])) {
         $this->user = $this->phpci->interpolate($buildSettings['mysql']['user']);
     }
     if (array_key_exists('pass', $buildSettings['mysql'])) {
         $this->pass = $buildSettings['mysql']['pass'];
     }
 }
开发者ID:mrudtf,项目名称:PHPCI,代码行数:28,代码来源:Mysql.php


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