Location: PHPKode > projects > ko > ko-framework-master/index.php
<?php 
/**
 * ko - a lightweight PHP framework using a MVC approach
 *
 * PHP Version 5
 *
 * The ko framework is released under a modified MIT license. A copy of this 
 * license has been included below. You will also find a copy in the root of 
 * this repository in a file named LICENSE. If you are unsure of anything in
 * the license, please contact me at hide@address.com to clear anything up.
 *
 * Copyright (C) 2012 Maximillien Courchesne- Mackie (hide@address.com)
 *
 * 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.
 *
 * @author	Max Mackie <hide@address.com>
 * @link	http://github.com/maxmackie/ko-framework
 */

/* --------------------------------------------------------
 *  ko Path Settings
 * --------------------------------------------------------
 * Change this if you've moved any of the default directories.
 *
 * Defaults:
 *	ko_base_path = ""
 *	ko_controller_path = "controllers/"
 *	ko_model_path = "models/"
 *	ko_views_path = "views/"
 *
 */
define("KO_BASE_PATH", "", true);
define("KO_CONTROLLER_PATH", "controllers/", true);
define("KO_MODEL_PATH", "models/", true);
define("KO_VIEW_PATH", "views/", true);
define("KO_ASSET_PATH", "views/assets/", true);

/* --------------------------------------------------------
 *  Global Includes (abstract classes & settings)
 * --------------------------------------------------------
 */
require_once KO_BASE_PATH . 'ko.php';

/* --------------------------------------------------------
 *  Bootstrap (do not edit)
 * --------------------------------------------------------
 * This class is loaded for each page request and ensures that the proper
 * controllers get loaded. 
 */
class Bootstrap 
{
	public function __construct($page = "index")
	{
		$this->bootstrap($page);
	}

	public function bootstrap($controller_name)
	{
		$path = KO_CONTROLLER_PATH . $controller_name . '.php';
		require_once $path;
        $controller = new $controller_name();
	}
}

$bootstrap = new Bootstrap();

?>
Return current item: ko