1: 2: 3: 4: 5: 6: 7: 8: 9: 10: 11: 12: 13: 14: 15: 16: 17: 18: 19: 20: 21: 22: 23: 24: 25: 26: 27: 28: 29: 30: 31: 32: 33: 34: 35: 36: 37: 38: 39: 40: 41: 42: 43: 44: 45: 46: 47: 48: 49: 50: 51: 52: 53: 54: 55: 56: 57: 58: 59: 60: 61: 62: 63: 64: 65: 66: 67: 68: 69: 70: 71: 72: 73: 74: 75: 76: 77: 78: 79: 80: 81: 82: 83: 84: 85: 86: 87: 88: 89:
<?php
namespace MvcCore\Ext\Debugs\Tracys;
class MvcCorePanel implements \Tracy\IBarPanel {
const VERSION = '5.0.0';
public function getId() {
return 'mvccore-panel';
}
public function getTab() {
return '<span title="MvcCore">'
.'<svg x="0px" y="0px" width="20px" height="20px" viewBox="0 0 20 20" enable-background="new 0 0 20 20" xml:space="preserve"><ellipse fill="#00DE1A" cx="9.998" cy="13.583" rx="6.175" ry="6.417"/><ellipse fill="#F20014" cx="6.173" cy="6.417" rx="6.175" ry="6.417"/><ellipse fill="#FFD003" cx="13.823" cy="6.418" rx="6.175" ry="6.417"/><g><linearGradient id="_1" gradientUnits="userSpaceOnUse" x1="5.3042" y1="9.1226" x2="7.5987" y2="12.8662"><stop offset="0" style="stop-color:#00DE1A"/><stop offset="1" style="stop-color:#F20014"/></linearGradient><path fill="url(#_1)" d="M9.998,11.454c-1.147-0.942-1.964-2.297-2.243-3.851c-1.958,0.794-3.43,2.596-3.825,4.794 c0.695,0.282,1.451,0.438,2.243,0.438C7.618,12.835,8.946,12.318,9.998,11.454z"/><linearGradient id="_2" gradientUnits="userSpaceOnUse" x1="12.3457" y1="12.9102" x2="14.7197" y2="9.0876"><stop offset="0" style="stop-color:#FFD003"/><stop offset="1" style="stop-color:#00DE1A"/></linearGradient><path fill="url(#_2)" d="M12.241,7.603c-0.279,1.554-1.096,2.909-2.243,3.851c1.052,0.864,2.38,1.381,3.825,1.381 c0.792,0,1.547-0.156,2.243-0.438C15.671,10.199,14.199,8.397,12.241,7.603z"/><linearGradient id="_3" gradientUnits="userSpaceOnUse" x1="7.6475" y1="4.4922" x2="12.3481" y2="4.4922"><stop offset="0" style="stop-color:#FFD003"/><stop offset="1" style="stop-color:#F20014"/></linearGradient><path fill="url(#_3)" d="M7.647,6.418c0,0.405,0.038,0.801,0.107,1.185C8.45,7.321,9.206,7.165,9.998,7.165 c0.792,0,1.548,0.156,2.243,0.438c0.069-0.384,0.107-0.78,0.107-1.186c0-2.042-0.919-3.861-2.351-5.036 C8.567,2.557,7.647,4.375,7.647,6.418z"/></g><g opacity="0.8"><path fill="#E39700" d="M9.998,11.454c-1.147-0.942-1.964-2.297-2.243-3.851c-1.958,0.794-3.43,2.596-3.825,4.794 c0.695,0.282,1.451,0.438,2.243,0.438C7.618,12.835,8.946,12.318,9.998,11.454z" /><path fill="#89FF00" d="M12.241,7.603c-0.279,1.554-1.096,2.909-2.243,3.851c1.052,0.864,2.38,1.381,3.825,1.381 c0.792,0,1.547-0.156,2.243-0.438C15.671,10.199,14.199,8.397,12.241,7.603z" /><path fill="#FFB300" d="M7.647,6.418c0,0.405,0.038,0.801,0.107,1.185C8.45,7.321,9.206,7.165,9.998,7.165 c0.792,0,1.548,0.156,2.243,0.438c0.069-0.384,0.107-0.78,0.107-1.186c0-2.042-0.919-3.861-2.351-5.036 C8.567,2.557,7.647,4.375,7.647,6.418z" /></g><path fill="#FBFF00" d="M7.754,7.603c0.279,1.554,1.096,2.909,2.243,3.851c1.147-0.942,1.964-2.297,2.243-3.851 c-0.695-0.282-1.451-0.438-2.243-0.438C9.206,7.165,8.45,7.321,7.754,7.603z"/></svg>'
.'</span>';
}
public function getPanel() {
$app = \MvcCore\Application::GetInstance();
$requestCode = \Tracy\Dumper::toHtml($app->GetRequest()->InitAll(), [
\Tracy\Dumper::LIVE => TRUE,
\Tracy\Dumper::COLLAPSE => 1,
\Tracy\Dumper::DEPTH => 4,
]);
$responseCode = \Tracy\Dumper::toHtml($app->GetResponse(), [
\Tracy\Dumper::LIVE => TRUE,
\Tracy\Dumper::COLLAPSE => 1,
\Tracy\Dumper::DEPTH => 2,
\Tracy\Dumper::TRUNCATE => 40
]);
$routerCode = \Tracy\Dumper::toHtml($app->GetRouter(), [
\Tracy\Dumper::LIVE => TRUE,
\Tracy\Dumper::COLLAPSE => 1,
\Tracy\Dumper::DEPTH => 5,
]);
$ctrlCode = \Tracy\Dumper::toHtml($app->GetController(), [
\Tracy\Dumper::LIVE => TRUE,
\Tracy\Dumper::COLLAPSE => 1,
\Tracy\Dumper::COLLAPSE_COUNT => 1,
\Tracy\Dumper::DEPTH => 3,
]);
$appCode = \Tracy\Dumper::toHtml($app, [
\Tracy\Dumper::LIVE => TRUE,
\Tracy\Dumper::COLLAPSE => 1,
\Tracy\Dumper::DEPTH => 1,
]);
$result = '<h1>MvcCore</h1>'
.'<style>#tracy-debug-panel-mvccore-panel pre.tracy-dump{display:block !important;}</style>'
.$appCode
.$requestCode
.$responseCode
.$routerCode
.$ctrlCode;
return $result;
}
}