?> plugins/breakpoints/breakpoints.js?v=v2.1.0"></script> <script src="<?php echo get_javascript_directory_uri(); ?> core/js/core.init.js?v=v2.1.0"></script> <script src="<?php echo get_javascript_directory_uri(); ?> plugins/mousetrap/mousetrap.min.js"></script> <script src="<?php echo get_javascript_directory_uri(); ?> plugins/mousetrap/shortcut.js"></script> <?php if (isset($jsArray)) { foreach ($jsArray as $js) { echo '<script type="text/javascript" src="' . get_base_url() . 'static/assets/' . $js . '"></script>' . "\n"; } } ?> <?php footer(); ?> </body> </html> <?php \PHPBenchmark\Monitor::instance()->snapshot('eduTrac SIS Fully Loaded'); print_gzipped_page();
<?php if (isset($_REQUEST['php-benchmark-test'])) { require __DIR__ . '/lib/PHPBenchmark/Monitor.php'; \PHPBenchmark\Monitor::instance()->init(!empty($_REQUEST['display-data'])); }
<?php if (isset($_GET['php-benchmark-test']) && isset($_GET['display-data'])) { // parameternya ?php-benchmark-test=1&display-data=1 include "plugin/phpbenchmark/init.php"; \PHPBenchmark\Monitor::instance()->snapshot('Bootstrap finished'); } //Mendefiniskan URL include 'config.php'; define("BASE_PATH", HOST); //Mendefiniskan basepath $path = "/" . PATH_FOLDER; //Mendapatkan inisial PATH. $url = $_SERVER['REQUEST_URI']; $url = str_replace($path, "", $url); //$url = str_replace($path, "", $url); //membuat array dari URL $array_tmp_uri = preg_split('[\\/]', $url, 3, PREG_SPLIT_NO_EMPTY); //Disini, ditentukan peran masing-masing segmen dalam URL $array_uri['controller'] = $array_tmp_uri[0]; // adalah class $array_uri['method'] = $array_tmp_uri[1]; // adalah fungsi $array_uri['var'] = preg_split('[\\/]', $array_tmp_uri[2], -1, PREG_SPLIT_NO_EMPTY); //adalah variabel/parameter //memuat base API require_once "application/base.php"; //memuat controller $application = new Application($array_uri); $application->loadController($array_uri['controller']); /*var_dump(get_included_files());*/
<?php /** * File used to initiate performance monitoring. * * @website https://github.com/victorjonsson/PHP-Benchmark/ * @package PHPBenchmark * @author Victor Jonsson (http://victorjonsson.se) * @license MIT */ // Load class loader $localAutLoaderFile = __DIR__ . '/vendor/autoload.php'; if (file_exists($localAutLoaderFile)) { require_once $localAutLoaderFile; } else { require_once __DIR__ . '/../../autoload.php'; } // Only activate monitor if query string contains "php-benchmark-test" if (empty($_GET['php-benchmark-test'])) { return; } use League\Event\Event; use PHPBenchmark\HtmlView; use PHPBenchmark\Monitor; use PHPBenchmark\MonitorInterface; Monitor::instance()->init()->addListener(Monitor::EVENT_SHUT_DOWN, function (Event $evt, MonitorInterface $monitor) { $htmlView = new HtmlView(); echo $htmlView->getView($monitor); });
/** * Bookmarking initialization function. * * @since 1.1.3 */ function benchmark_init() { if (!file_exists(BASE_PATH . 'config.php')) { return false; } if (_h(get_option('enable_benchmark')) == 1) { Monitor::instance()->init()->addListener(Monitor::EVENT_SHUT_DOWN, function (Event $evt, MonitorInterface $monitor) { $htmlView = new HtmlView(); echo $htmlView->getView($monitor); }); } }