diff options
-rw-r--r-- | MainApp.php | 16 | ||||
-rw-r--r-- | MainController.php | 15 | ||||
-rw-r--r-- | MainDb.php | 17 | ||||
-rw-r--r-- | MainView.php | 16 | ||||
-rw-r--r-- | README.md | 43 |
5 files changed, 71 insertions, 36 deletions
diff --git a/MainApp.php b/MainApp.php index 0219a48..8ab3a94 100644 --- a/MainApp.php +++ b/MainApp.php @@ -1,8 +1,16 @@ <?php -//// -// main/MainApp.php -// @author Filipp Lepalaan <filipp@mekanisti.fi> -// @copyright (c) 2009 Filipp Lepalaan +/** + * main/MainApp.php + * @package main + * @author Filipp Lepalaan <f@0x00.co> + * @copyright (c) 2009-2011 Filipp Lepalaan + * @license + * This program is free software. It comes without any warranty, to + * the extent permitted by applicable law. You can redistribute it + * and/or modify it under the terms of the Do What The Fuck You Want + * To Public License, Version 2, as published by Sam Hocevar. See + * http://sam.zoy.org/wtfpl/COPYING for more details. + */ class MainApp { //// diff --git a/MainController.php b/MainController.php index 49a60b5..381e1c1 100644 --- a/MainController.php +++ b/MainController.php @@ -1,7 +1,16 @@ <?php -//// -// main/MainController.php -// @TODO: transfer boeuf.php here +/** + * main/MainController.php + * @package main + * @author Filipp Lepalaan <f@0x00.co> + * @copyright (c) 2009-2011 Filipp Lepalaan + * @license + * This program is free software. It comes without any warranty, to + * the extent permitted by applicable law. You can redistribute it + * and/or modify it under the terms of the Do What The Fuck You Want + * To Public License, Version 2, as published by Sam Hocevar. See + * http://sam.zoy.org/wtfpl/COPYING for more details. + */ class MainController { public $view; // Where to store the data to be rendered @@ -1,8 +1,17 @@ <?php -//// -// main/MainDb.php -// @author Filipp Lepalaan <filipp@mekanisti.fi> -// http://www.php.net/manual/en/language.oop5.patterns.php +/** + * main/MainDb.php + * @author Filipp Lepalaan <filipp@mekanisti.fi> + * @package main + * @author Filipp Lepalaan <f@0x00.co> + * @copyright (c) 2009-2011 Filipp Lepalaan + * @license + * This program is free software. It comes without any warranty, to + * the extent permitted by applicable law. You can redistribute it + * and/or modify it under the terms of the Do What The Fuck You Want + * To Public License, Version 2, as published by Sam Hocevar. See + * http://sam.zoy.org/wtfpl/COPYING for more details. + */ class MainDb { private static $instance = NULL; diff --git a/MainView.php b/MainView.php index b5bce86..444dceb 100644 --- a/MainView.php +++ b/MainView.php @@ -1,8 +1,16 @@ <?php -//// -// main/MainView.php -// @created 31.10.2009 -// @author Filipp Lepalaan <filipp@mac.com> +/** + * main/MainView.php + * @package main + * @author Filipp Lepalaan <f@0x00.co> + * @copyright (c) 2009-2011 Filipp Lepalaan + * @license + * This program is free software. It comes without any warranty, to + * the extent permitted by applicable law. You can redistribute it + * and/or modify it under the terms of the Do What The Fuck You Want + * To Public License, Version 2, as published by Sam Hocevar. See + * http://sam.zoy.org/wtfpl/COPYING for more details. + */ class MainView { //// @@ -16,33 +16,34 @@ site: ## index.php ## A typical index.php using Main would look like this: -<?php - - if (true) { - error_reporting(E_ALL|E_STRICT); - ini_set('display_errors', 'On'); - } + + <?php - $sysdir = realpath(dirname(__FILE__).'/../system'); + if (TRUE) { + error_reporting(E_ALL|E_STRICT); + ini_set('display_errors', 'On'); + } + + $sysdir = realpath(dirname(__FILE__).'/../system'); - set_include_path( - get_include_path() . PATH_SEPARATOR - . $sysdir . PATH_SEPARATOR - . "{$sysdir}/lib" . PATH_SEPARATOR - . "{$sysdir}/conf" . PATH_SEPARATOR - . "{$sysdir}/classes" . PATH_SEPARATOR - ); + set_include_path( + get_include_path() . PATH_SEPARATOR + . $sysdir . PATH_SEPARATOR + . "{$sysdir}/lib" . PATH_SEPARATOR + . "{$sysdir}/conf" . PATH_SEPARATOR + . "{$sysdir}/classes" . PATH_SEPARATOR + ); - require_once 'main/MainApp.php'; - require_once 'main/MainController.php'; + require_once 'main/MainApp.php'; + require_once 'main/MainController.php'; - $locale = MainApp::locale(); - setlocale(LC_ALL, $locale); - session_start(); + $locale = MainApp::locale(); + setlocale(LC_ALL, $locale); + session_start(); - MainApp::init(); + MainApp::init(); -?> + ?> ## .htaccess ## |