當前位置: 首頁>>代碼示例>>PHP>>正文


PHP Phing::runBuild方法代碼示例

本文整理匯總了PHP中Phing::runBuild方法的典型用法代碼示例。如果您正苦於以下問題:PHP Phing::runBuild方法的具體用法?PHP Phing::runBuild怎麽用?PHP Phing::runBuild使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在Phing的用法示例。


在下文中一共展示了Phing::runBuild方法的5個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: runBuild

 /**
  * @see Phing
  */
 public function runBuild()
 {
     // workaround for included phing 2.3 which by default loads many tasks
     // that are not needed and incompatible (eg phing.tasks.ext.FtpDeployTask)
     // by placing current directory on the include path our defaults will be loaded
     // see ticket #5054
     $includePath = get_include_path();
     set_include_path(dirname(__FILE__) . PATH_SEPARATOR . $includePath);
     parent::runBuild();
     set_include_path($includePath);
 }
開發者ID:cuongnv540,項目名稱:jobeet,代碼行數:14,代碼來源:sfPhing.class.php

示例2: start

 /**
  * Entry point allowing for more options from other front ends.
  *
  * This method encapsulates the complete build lifecycle.
  *
  * @param array $args The commandline args passed to phing shell script.
  * @param array $additionalUserProperties   Any additional properties to be passed to Phing (alternative front-end might implement this).
  *                                          These additional properties will be available using the getDefinedProperty() method and will
  *                                          be added to the project's "user" properties
  * @see execute()
  * @see runBuild()
  * @throws Exception - if there is an error during build
  */
 public static function start($args, array $additionalUserProperties = null)
 {
     try {
         $m = new Phing();
         $m->execute($args);
     } catch (Exception $exc) {
         self::handleLogfile();
         throw $exc;
     }
     if ($additionalUserProperties !== null) {
         foreach ($additionalUserProperties as $key => $value) {
             $m->setDefinedProperty($key, $value);
         }
     }
     try {
         $m->runBuild();
     } catch (Exception $exc) {
         self::handleLogfile();
         throw $exc;
     }
     // everything fine, shutdown
     self::handleLogfile();
 }
開發者ID:hkilter,項目名稱:OpenSupplyChains,代碼行數:36,代碼來源:phing.php

示例3: start

 /** 
  * Entry point allowing for more options from other front ends.
  * 
  * This method encapsulates the complete build lifecycle.
  * 
  * @param array &$args The commandline args passed to phing shell script.
  * @param array $additionalUserProperties   Any additional properties to be passed to Phing (alternative front-end might implement this).
  *                                          These additional properties will be available using the getDefinedProperty() method and will
  *                                          be added to the project's "user" properties.
  * @return void
  * @see execute()
  * @see runBuild()
  */
 public static function start(&$args, $additionalUserProperties = null)
 {
     try {
         $m = new Phing();
         $m->execute($args);
     } catch (Exception $exc) {
         $m->printMessage($exc);
         self::halt(-1);
         // Parameter error
     }
     if ($additionalUserProperties !== null) {
         $keys = $m->additionalUserProperties->keys();
         while (count($keys)) {
             $key = array_shift($keys);
             $property = $m->additionalUserProperties->getProperty($key);
             $m->setDefinedProperty($key, $property);
         }
     }
     try {
         $m->runBuild();
     } catch (Exception $exc) {
         self::halt(1);
         // Errors occured
     }
     // everything fine, shutdown
     self::halt(0);
     // no errors, everything is cake
 }
開發者ID:domenypl,項目名稱:symfony1-legacy,代碼行數:41,代碼來源:Phing.php

示例4: runPhing

 /**
  * 
  * @param string $taskName
  */
 public function runPhing($taskName)
 {
     // Copy Files
     $this->mySchemaBuilder->loadXmlFiles();
     // Create build.properties file
     $this->createBuildPropertiesFile($this->tmpDir . '/build.properties');
     // Create buildtime-conf file
     $this->createBuildTimeConfFile($this->tmpDir . '/buildtime-conf.xml');
     //
     $args = array();
     $args = $this->getPhingArguments();
     $args[] = $taskName;
     // Enable output buffering
     \Phing::setOutputStream(new \OutputStream(fopen('php://output', 'w')));
     \Phing::setErrorStream(new \OutputStream(fopen('php://output', 'w')));
     \Phing::startup();
     \Phing::setProperty('phing.home', getenv('PHING_HOME'));
     //
     $myPhing = new \Phing();
     //$returnStatus = true;
     $myPhing->execute($args);
     $myPhing->runBuild();
     /*$this->buffer = ob_get_contents();
       // Guess errors
       if (strstr($this->buffer, 'failed. Aborting.') ||
           strstr($this->buffer, 'Failed to execute') ||
           strstr($this->buffer, 'failed for the following reason:')) {
       }*/
 }
開發者ID:rk4an,項目名稱:centreon,代碼行數:33,代碼來源:PropelMigration.php

示例5: start

 /**
  * Entry point allowing for more options from other front ends.
  *
  * This method encapsulates the complete build lifecycle.
  *
  * @param  array     $args                     The commandline args passed to phing shell script.
  * @param  array     $additionalUserProperties Any additional properties to be passed to Phing (alternative front-end might implement this).
  *                                             These additional properties will be available using the getDefinedProperty() method and will
  *                                             be added to the project's "user" properties
  * @see execute()
  * @see runBuild()
  * @throws Exception - if there is an error during build
  */
 public static function start($args, array $additionalUserProperties = null)
 {
     try {
         $m = new Phing();
         $m->execute($args);
     } catch (Exception $exc) {
         self::handleLogfile();
         self::printMessage($exc);
         self::statusExit(1);
         return;
     }
     if ($additionalUserProperties !== null) {
         foreach ($additionalUserProperties as $key => $value) {
             $m->setDefinedProperty($key, $value);
         }
     }
     // expect the worst
     $exitCode = 1;
     try {
         try {
             $m->runBuild();
             $exitCode = 0;
         } catch (ExitStatusException $ese) {
             $exitCode = $ese->getCode();
             if ($exitCode != 0) {
                 self::handleLogfile();
                 throw $ese;
             }
         }
     } catch (BuildException $exc) {
         // avoid printing output twice: self::printMessage($exc);
     } catch (Exception $exc) {
         echo $exc->getTraceAsString();
         self::printMessage($exc);
     }
     // everything fine, shutdown
     self::handleLogfile();
     self::statusExit($exitCode);
 }
開發者ID:Geeklog-Japan,項目名稱:geeklog-japan,代碼行數:52,代碼來源:Phing.php


注:本文中的Phing::runBuild方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。