本文整理汇总了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'));
}
示例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:
*/
示例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'));
}
}