/** * Call the middleware * * @return void */ public function call() { if (empty($this->options)) { $this->options = $this->app->config('kraken.controller'); } if (!isset($this->options['mapping'])) { $this->next->call(); return; } if (empty($this->options['mapping'])) { $this->next->call(); return; } $mapping = $this->options['mapping']; $this->configureMapping($mapping); $this->next->call(); }
<?php require '../vendor/autoload.php'; use App\LXC\Host; $app = new \Bono\App(array('autorun' => false)); $app->get('/', function () use($app) { echo 'hello world'; }); $app->run();
* * Permission is hereby granted, free of charge, to any person obtaining * a copy of this software and associated documentation files (the * "Software"), to deal in the Software without restriction, including * without limitation the rights to use, copy, modify, merge, publish, * distribute, sublicense, and/or sell copies of the Software, and to * permit persons to whom the Software is furnished to do so, subject to * the following conditions: * * The above copyright notice and this permission notice shall be * included in all copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE * LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION * OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. * * @category PHP_Framework * @package Bono * @author Ganesha <*****@*****.**> * @copyright 2013 PT Sagara Xinix Solusitama * @license https://raw.github.com/xinix-technology/bono/master/LICENSE MIT * @version 0.10.0 * @link http://xinix.co.id/products/bono */ require '../vendor/autoload.php'; $app = new \Bono\App(array('autorun' => false, 'mode' => 'development')); $app->run();
<?php require '../vendor/autoload.php'; if (!function_exists('t')) { function t($template, array $data = []) { $templateFile = '../templates/' . $template . '.php'; if (!is_readable($templateFile)) { throw new \Exception('Unreadable template ' . $template); } ob_start(); extract($data); include $templateFile; return ob_get_clean(); } } $app = Bono\App::getInstance(); $app->run();