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


PHP PEAR_ErrorStack::setDefaultCallback方法代碼示例

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


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

示例1: _initOnDebug

 /**
  * Init in Debug mode
  *
  * @return void
  */
 private static function _initOnDebug()
 {
     require_once 'Panda/Debug.php';
     require_once 'Panda/Debug/util.php';
     require_once 'Panda/Exception.php';
     include_once 'Net/Growl.php';
     ini_set('display_errors', 1);
     // アサーションを有効
     assert_options(ASSERT_ACTIVE, 1);
     assert_options(ASSERT_WARNING, 0);
     assert_options(ASSERT_QUIET_EVAL, 1);
     assert_options(ASSERT_CALLBACK, array('Panda', 'onAssert'));
     restore_error_handler();
     restore_exception_handler();
     set_exception_handler(array('Panda', 'onException'));
     if (class_exists('PEAR', false)) {
         PEAR::setErrorHandling(PEAR_ERROR_CALLBACK, array('Panda', 'onPearError'));
     }
     if (class_exists('PEAR_ErrorStack', false)) {
         PEAR_ErrorStack::setDefaultCallback(array('Panda', 'onStackError'));
     }
     set_error_handler(array('Panda', 'onDebugPhpError'));
 }
開發者ID:sssAlchemy,項目名稱:Panda,代碼行數:28,代碼來源:Panda.php

示例2: error_reporting

 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
 * POSSIBILITY OF SUCH DAMAGE.
 *
 * @package    Piece_Unity
 * @subpackage Piece_Unity_Component_KernelConfigurator
 * @copyright  2006-2008 KUBO Atsuhiro <iteman@users.sourceforge.net>
 * @license    http://www.opensource.org/licenses/bsd-license.php  BSD License (revised)
 * @version    SVN: $Id$
 * @since      File available since Release 1.0.0
 */
error_reporting(E_ALL);
if (file_exists(dirname(__FILE__) . '/../../../Piece/Unity.php')) {
    set_include_path(realpath(dirname(__FILE__) . '/../../..') . PATH_SEPARATOR . get_include_path());
}
if (file_exists(dirname(__FILE__) . '/../Piece/Unity/Plugin/KernelConfigurator.php')) {
    set_include_path(realpath(dirname(__FILE__) . '/..') . PATH_SEPARATOR . get_include_path());
}
require_once 'PEAR/ErrorStack.php';
PEAR_ErrorStack::setDefaultCallback(create_function('$error', 'var_dump($error); return ' . PEAR_ERRORSTACK_DIE . ';'));
/*
 * Local Variables:
 * mode: php
 * coding: iso-8859-1
 * tab-width: 4
 * c-basic-offset: 4
 * c-hanging-comment-ender-p: nil
 * indent-tabs-mode: nil
 * End:
 */
開發者ID:piece,項目名稱:piece-unity-component-kernelconfigurator,代碼行數:31,代碼來源:prepare.php

示例3: __construct

 /**
  * Constructor.
  */
 public function __construct()
 {
     parent::__construct('CiviCRM');
     $log = CRM_Core_Config::getLog();
     $this->setLogger($log);
     // PEAR<=1.9.0 does not declare "static" properly.
     if (!is_callable(array('PEAR', '__callStatic'))) {
         $this->setDefaultCallback(array($this, 'handlePES'));
     } else {
         PEAR_ErrorStack::setDefaultCallback(array($this, 'handlePES'));
     }
 }
開發者ID:nielosz,項目名稱:civicrm-core,代碼行數:15,代碼來源:Error.php


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