public function controllerCall($application, $controller, $method) { $this->setOptions(); $kite = KITE::getInstance('kite'); $kite->set('APP', $application); $kite->set('CONTROLLER', $controller); $kite->set('METHOD', $method); $app = new $controller(); $app->{$method}(); }
public function log() { $pdo = KITE::getInstance('pdo'); $stmt = $pdo->query("SELECT * from maths"); $result = $stmt->fetchAll(PDO::FETCH_ASSOC); $basket = KITE::getInstance('basket'); foreach ($result as $key => $value) { $basket->set('a' . $key, $value); } }
<?php /* KITE - A NANO PHP MVC FRAMEWORK * package - root * file - index.php * Developer - Krishna Teja G S * Website - http://www.packetcode.com/projects/kite * license - GNU General Public License version 2 or later */ //defining a global constant to block direct access to files define('_KITE', true); // directory sperator define('DS', DIRECTORY_SEPARATOR); //check for the installation file // 'check.php' is a sample file used before installation // if the file is deleted after the installation is done if (file_exists('lib' . DS . 'installer' . DS . 'check.php')) { require_once "lib" . DS . "installer" . DS . "installer.php"; $install = new Installer(); $install->main(); } else { //load the error class and kite class require_once "lib" . DS . "error.php"; require_once "lib" . DS . "kite.php"; $kite = KITE::getInstance('kite'); $kite->kite_main(); }
public static function getModel($model) { $kite = KITE::getInstance('kite'); $app = $kite->get('APP'); $file = "apps" . DS . $app . DS . "models" . DS . $model . ".php"; //check if the model exists then load the model file if (file_exists($file)) { require_once $file; $model_obj = new $model(); return $model_obj; } else { echo "model doesnt exists"; } }
<ul class="nav"> <li class="active"><a href="../home/index">Home</a></li> <!--<li><a href="../home/buyShares">Buy/Sell</a></li>--> <li><a href="../home/showPortfolio">Portfolio</a></li> <li ><a href="../home/transactions">Transaction History</a></li> </ul> </div> <div class="col-md-10"> <?php echo '<br>'; ?> <?php KITE::app(); ?> </div> <!-- end of div class="col-md-9" for the entire content--> </div> <!-- end of div class="row" for the entire body--> <div class="footer" style="clear:both"> <div><!--KITE FRAMEWORK--> <div class="pull-right">by MSU Software Arch. Group. copyright 2015</a></div> </div> </div> </div> <!-- /container -->