當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。