aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFilipp Lepalaan <filipp@mac.com>2011-05-12 09:33:11 +0300
committerFilipp Lepalaan <filipp@mac.com>2011-05-12 09:33:11 +0300
commit6441053a55c17832f389f4907f047d9c028ace6f (patch)
tree7d9c090f2f0210d8629edcdaafe3cdf3827b3bfd
parentf5cb46d5ffa5c46d4b1aa176d9104e8dd67b24ae (diff)
downloadmain-6441053a55c17832f389f4907f047d9c028ace6f.tar.gz
main-6441053a55c17832f389f4907f047d9c028ace6f.tar.bz2
main-6441053a55c17832f389f4907f047d9c028ace6f.zip
prettier comments and readme
-rw-r--r--MainApp.php16
-rw-r--r--MainController.php15
-rw-r--r--MainDb.php17
-rw-r--r--MainView.php16
-rw-r--r--README.md43
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
diff --git a/MainDb.php b/MainDb.php
index b8c16ce..589ce82 100644
--- a/MainDb.php
+++ b/MainDb.php
@@ -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
{
////
diff --git a/README.md b/README.md
index 158ca0f..094084e 100644
--- a/README.md
+++ b/README.md
@@ -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 ##