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


PHP Builder::interpolate方法代码示例

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


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

示例1: __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())
 {
     $path = $phpci->buildPath;
     $this->phpci = $phpci;
     $this->build = $build;
     $this->directory = isset($options['directory']) ? $this->phpci->interpolate($options['directory']) : $path;
 }
开发者ID:ntoniazzi,项目名称:PHPCI,代码行数:13,代码来源:Wipe.php

示例2: execute

 /**
  * Connects to PgSQL and runs a specified set of queries.
  * @return boolean
  */
 public function execute()
 {
     try {
         $opts = array(PDO::ATTR_ERRMODE => PDO::ERRMODE_EXCEPTION);
         $pdo = new PDO('pgsql:host=' . $this->host, $this->user, $this->pass, $opts);
         foreach ($this->queries as $query) {
             $pdo->query($this->phpci->interpolate($query));
         }
     } catch (\Exception $ex) {
         $this->phpci->logFailure($ex->getMessage());
         return false;
     }
     return true;
 }
开发者ID:nelsonyang0710,项目名称:PHPCI,代码行数:18,代码来源:Pgsql.php

示例3: execute

 /**
  * Runs the shell command.
  */
 public function execute()
 {
     if (!defined('ENABLE_SHELL_PLUGIN') || !ENABLE_SHELL_PLUGIN) {
         throw new \Exception('The shell plugin is not enabled.');
     }
     $success = true;
     foreach ($this->commands as $command) {
         $command = $this->phpci->interpolate($command);
         if (!$this->phpci->executeCommand($command)) {
             $success = false;
         }
     }
     return $success;
 }
开发者ID:kukupigs,项目名称:PHPCI,代码行数:17,代码来源:Shell.php

示例4: executeFile

 /**
  * @param string $query
  * @return boolean
  * @throws \Exception
  */
 protected function executeFile($query)
 {
     if (!isset($query['file'])) {
         throw new \Exception(Lang::get('import_file_key'));
     }
     $import_file = $this->phpci->buildPath . $this->phpci->interpolate($query['file']);
     if (!is_readable($import_file)) {
         throw new \Exception(Lang::get('cannot_open_import', $import_file));
     }
     $database = isset($query['database']) ? $this->phpci->interpolate($query['database']) : null;
     $import_command = $this->getImportCommand($import_file, $database);
     if (!$this->phpci->executeCommand($import_command)) {
         throw new \Exception(Lang::get('unable_to_execute'));
     }
     return true;
 }
开发者ID:seshurajup,项目名称:PHPCI,代码行数:21,代码来源:Pgsql.php

示例5: executeFile

 /**
  * @param string $query
  * @return boolean
  * @throws \Exception
  */
 protected function executeFile($query)
 {
     if (!isset($query['file'])) {
         throw new \Exception("Import statement must contain a 'file' key");
     }
     $import_file = $this->phpci->buildPath . $this->phpci->interpolate($query['file']);
     if (!is_readable($import_file)) {
         throw new \Exception("Cannot open SQL import file: {$import_file}");
     }
     $database = isset($query['database']) ? $this->phpci->interpolate($query['database']) : null;
     $import_command = $this->getImportCommand($import_file, $database);
     if (!$this->phpci->executeCommand($import_command)) {
         throw new \Exception("Unable to execute SQL file");
     }
     return true;
 }
开发者ID:kukupigs,项目名称:PHPCI,代码行数:21,代码来源:Mysql.php


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