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


PHP Phing::halt方法代码示例

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


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

示例1: characters

 /**
  * Method that gets invoked when the parser runs over CDATA.
  *
  * This method is called by PHP's internal parser functions and registered
  * in the actual parser implementation.
  *
  * It gives control to the current active handler object by calling the
  * <code>characters()</code> method. That processes the given CDATA.
  *
  * BECAUSE OF PROBLEMS WITH EXCEPTIONS BUBBLING UP THROUGH xml_parse() THIS
  * METHOD WILL CALL Phing::halt(-1) ON EXCEPTION.
  * 
  * @param resource $parser php's internal parser handle.
  * @param string $data the CDATA
  */
 function characters($parser, $data)
 {
     try {
         $this->handler->characters($data);
     } catch (Exception $e) {
         print "[Exception in XML parsing]\n";
         print $e;
         Phing::halt(-1);
     }
 }
开发者ID:Daniel-Marynicz,项目名称:symfony1-legacy,代码行数:25,代码来源:AbstractSAXParser.php

示例2: ini_set

// ---------------------------
ini_set('track_errors', 1);
/* set classpath */
if (getenv('PHP_CLASSPATH')) {
    define('PHP_CLASSPATH', getenv('PHP_CLASSPATH') . PATH_SEPARATOR . get_include_path());
    ini_set('include_path', PHP_CLASSPATH);
} else {
    define('PHP_CLASSPATH', get_include_path());
}
require_once 'phing/Phing.php';
/* Setup Phing environment */
Phing::startup();
/* 
  find phing home directory 
   -- if Phing is installed from PEAR this will probably be null,
   which is fine (I think).  Nothing uses phing.home right now.
*/
Phing::setProperty('phing.home', getenv('PHING_HOME'));
/* polish CLI arguments */
$args = isset($argv) ? $argv : $_SERVER['argv'];
// $_SERVER['argv'] seems not to work when argv is registered (PHP5b4)
array_shift($args);
// 1st arg is script name, so drop it
/* fire main application */
Phing::fire($args);
/*
 exit OO system if not already called by Phing
  -- basically we should not need this due to register_shutdown_function in Phing
*/
Phing::halt(0);
开发者ID:edmondscommerce,项目名称:XAMPP-Magento-Demo-Site,代码行数:30,代码来源:phing.php


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