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


PHP Phing::setDefinedProperty方法代码示例

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


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

示例1: 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

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