paulgoughbooks_old
This repository has no backups
This repository's network speed is throttled to 100KB/sec
Upgrade your account to fix these warnings, or use backups.vc for automated backups
@ 2
paulgoughbooks_old / trunk / app / Config / Events.php
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 |
<?php namespace Config; use CodeIgniter\Events\Events; use CodeIgniter\Exceptions\FrameworkException; /* * -------------------------------------------------------------------- * Application Events * -------------------------------------------------------------------- * Events allow you to tap into the execution of the program without * modifying or extending core files. This file provides a central * location to define your events, though they can always be added * at run-time, also, if needed. * * You create code that can execute by subscribing to events with * the 'on()' method. This accepts any form of callable, including * Closures, that will be executed when the event is triggered. * * Example: * Events::on('create', [$myInstance, 'myMethod']); */ Events::on('pre_system', function () { if (ENVIRONMENT !== 'testing') { if (ini_get('zlib.output_compression')) { throw FrameworkException::forEnabledZlibOutputCompression(); } while (ob_get_level() > 0) { ob_end_flush(); } ob_start(function ($buffer) { return $buffer; }); } /* * -------------------------------------------------------------------- * Debug Toolbar Listeners. * -------------------------------------------------------------------- * If you delete, they will no longer be collected. */ if (ENVIRONMENT !== 'production') { Events::on('DBQuery', 'CodeIgniter\Debug\Toolbar\Collectors\Database::collect'); Services::toolbar()->respond(); } }); |
Commits for paulgoughbooks_old/trunk/app/Config/Events.php
Revision | Author | Commited | Message |
---|---|---|---|
2 | tporter | Tue 03 Nov, 2020 08:50:21 +0000 | Migration of Paul Goughs Books site to Codeignitor 4 |