コード例 #1
0
 function __construct()
 {
     $this->console = FirePHP::to("page")->console();
     $this->console = $this->console->options(array('encoder.trace.offsetAdjustment' => 1));
     $this->engine = FirePHP::plugin('engine');
     $this->engine->onException($this->console);
 }
コード例 #2
0
ファイル: FirePHP.php プロジェクト: jerfowler/firephp-libs
 public function trapProblems($console = false)
 {
     if (!$console) {
         $console = FirePHP::to('page')->console('Problems');
     }
     $engine = FirePHP::plugin('engine');
     $engine->onError($console);
     $engine->onAssertionError($console);
     $engine->onException($console);
 }
コード例 #3
0
<?php

// NOTE: You must have FirePHP Companion installed (http://www.christophdorn.com/Tools/)
// See FirePHP Companion and Firebug Console for result
define('INSIGHT_CONFIG_PATH', dirname(dirname(dirname(__FILE__))) . DIRECTORY_SEPARATOR . 'package.json');
require_once 'FirePHP/Init.php';
$firephp = FirePHP::plugin("firephp");
$firephp->declareP();
p('Hey there Firebug Console', 'Variable Label');
$firephp->declareP('Ad-hock', true);
p('Hey there Ad-hock Console', 'Variable Label');
$console = FirePHP::to('request')->console('Debug');
$firephp->declareP($console, true);
p('Hey there Debug Console', 'Variable Label');
コード例 #4
0
ファイル: p.php プロジェクト: janym/angular-yii
function p($data, $label = null)
{
    FirePHP::plugin("firephp")->p($data, $label);
}
コード例 #5
0
<?php

// NOTE: You must have FirePHP Companion installed (http://www.christophdorn.com/Tools/)
// See FirePHP Companion or Firebug Console for result (depending on $_GET['target'])
define('INSIGHT_CONFIG_PATH', dirname(dirname(dirname(__FILE__))) . DIRECTORY_SEPARATOR . 'package.json');
require_once 'FirePHP/Init.php';
$console = FirePHP::to('page')->console('Problems');
if (isset($_GET['target'])) {
    // set by the drop-down in the reference
    $console = FirePHP::to($_GET['target'])->console('Problems');
    if ($_GET['target'] == 'request') {
        FirePHP::to('controller')->triggerInspect();
    }
}
$console = $console->expand();
$engine = FirePHP::plugin('engine');
$engine->onException($console);
throw new Exception('Test Exception');
コード例 #6
0
ファイル: index.php プロジェクト: janym/angular-yii
    /*i*/
}
/*i*/
define('INSIGHT_IPS', '*');
/*i*/
define('INSIGHT_AUTHKEYS', '*');
/*i*/
define('INSIGHT_PATHS', dirname(__FILE__));
/*i*/
define('INSIGHT_SERVER_PATH', './index.php');
/*i*/
require_once 'FirePHP/Init.php';
/*i*/
FirePHP::plugin('firephp')->trapProblems();
/*i*/
FirePHP::plugin('firephp')->recordEnvironment(FirePHP::to('request')->console('Environment')->on('Show Environment'));
/*i*/
FirePHP::to('request')->console('Feed')->info('Startup');
// Application Code
require_once dirname(__FILE__) . '/feed.php';
$feed = new Feed('http://www.phpdeveloper.org/feed');
$items = $feed->getItems();
echo '<p><b>See:</b> <a target="_blank" href="http://www.christophdorn.com/Blog/2010/08/24/gain-insight-into-your-cache-interaction-with-firephp-companion/">http://www.christophdorn.com/Blog/2010/08/24/gain-insight-into-your-cache-interaction-with-firephp-companion/</a></p>' . "\n";
if ($feed->didLoad()) {
    echo '<p><b>Loading feed from: ' . $feed->getUrl() . '</b></p>' . "\n";
}
foreach ($items as $item) {
    echo '<p><a href="' . $item['link'] . '">' . $item['title'] . '</a></p>' . "\n";
}
/*i*/
FirePHP::to('request')->console('Feed')->info('Shutdown');
コード例 #7
0
<?php

// NOTE: You must have FirePHP Companion installed (http://www.christophdorn.com/Tools/)
// See FirePHP Companion or Firebug Console for result (depending on $_GET['target'])
define('INSIGHT_CONFIG_PATH', dirname(dirname(dirname(__FILE__))) . DIRECTORY_SEPARATOR . 'package.json');
require_once 'FirePHP/Init.php';
$console = FirePHP::to('page')->console('Problems');
if (isset($_GET['target'])) {
    // set by the drop-down in the reference
    $console = FirePHP::to($_GET['target'])->console('Problems');
    if ($_GET['target'] == 'request') {
        FirePHP::to('controller')->triggerInspect();
    }
}
$console = $console->expand();
$engine = FirePHP::plugin('engine');
$engine->onException($console);
try {
    throw new Exception('First Test Exception');
} catch (Exception $e) {
    $engine->handleException($e);
}
try {
    throw new Exception('Second Test Exception');
} catch (Exception $e) {
    FirePHP::plugin('engine')->handleException($e);
}
コード例 #8
0
<?php

// NOTE: You must have FirePHP Companion installed (http://www.christophdorn.com/Tools/)
// See FirePHP Companion or Firebug Console for result (depending on $_GET['target'])
define('INSIGHT_CONFIG_PATH', dirname(dirname(dirname(__FILE__))) . DIRECTORY_SEPARATOR . 'package.json');
require_once 'FirePHP/Init.php';
$console = FirePHP::to('page')->console('Problems');
if (isset($_GET['target'])) {
    // set by the drop-down in the reference
    $console = FirePHP::to($_GET['target'])->console('Problems');
    if ($_GET['target'] == 'request') {
        FirePHP::to('controller')->triggerInspect();
    }
}
FirePHP::plugin("firephp")->trapProblems($console);
$var = false;
assert('$var===true');
trigger_error('Test Error');
throw new Exception("Test Exception");
コード例 #9
0
<?php

// NOTE: You must have FirePHP Companion installed (http://www.christophdorn.com/Tools/)
// See FirePHP Companion or Firebug Console for result (depending on $_GET['target'])
define('INSIGHT_CONFIG_PATH', dirname(dirname(dirname(__FILE__))) . DIRECTORY_SEPARATOR . 'package.json');
require_once 'FirePHP/Init.php';
$console = FirePHP::to('page')->console('Problems');
if (isset($_GET['target'])) {
    // set by the drop-down in the reference
    $console = FirePHP::to($_GET['target'])->console('Problems');
    if ($_GET['target'] == 'request') {
        FirePHP::to('controller')->triggerInspect();
    }
}
FirePHP::plugin("firephp")->recordEnvironment($console);
コード例 #10
0
<?php

// NOTE: You must have FirePHP Companion installed (http://www.christophdorn.com/Tools/)
// See FirePHP Companion or Firebug Console for result (depending on $_GET['target'])
define('INSIGHT_CONFIG_PATH', dirname(dirname(dirname(__FILE__))) . DIRECTORY_SEPARATOR . 'package.json');
require_once 'FirePHP/Init.php';
$console = FirePHP::to('page')->console('Problems');
if (isset($_GET['target'])) {
    // set by the drop-down in the reference
    $console = FirePHP::to($_GET['target'])->console('FirePHP');
    if ($_GET['target'] == 'request') {
        FirePHP::to('controller')->triggerInspect();
    }
}
FirePHP::plugin("firephp")->logVersion($console);