diff --git a/docs/classes/DB.html b/docs/classes/DB.html index 94cb665..a602b03 100644 --- a/docs/classes/DB.html +++ b/docs/classes/DB.html @@ -1583,7 +1583,7 @@ for complex select queries
+ generated on 2012-05-07T11:27:03-04:00.
diff --git a/docs/classes/DB_PDO.html b/docs/classes/DB_PDO.html index c0d6c79..c4abd25 100644 --- a/docs/classes/DB_PDO.html +++ b/docs/classes/DB_PDO.html @@ -679,7 +679,7 @@ the connection/database
+ generated on 2012-05-07T11:27:03-04:00.
diff --git a/docs/classes/DB_Reg.html b/docs/classes/DB_Reg.html index a21dc3d..a927da9 100644 --- a/docs/classes/DB_Reg.html +++ b/docs/classes/DB_Reg.html @@ -152,7 +152,7 @@ and organizes database connections

+ generated on 2012-05-07T11:27:03-04:00.
diff --git a/docs/classes/DB_SQL.html b/docs/classes/DB_SQL.html index 2478ef6..2e69274 100644 --- a/docs/classes/DB_SQL.html +++ b/docs/classes/DB_SQL.html @@ -269,7 +269,7 @@
+ generated on 2012-05-07T11:27:03-04:00.
diff --git a/docs/classes/DB_Util.html b/docs/classes/DB_Util.html index 5a12c7a..7c65a05 100644 --- a/docs/classes/DB_Util.html +++ b/docs/classes/DB_Util.html @@ -209,7 +209,7 @@
+ generated on 2012-05-07T11:27:03-04:00.
diff --git a/docs/classes/Firebird.html b/docs/classes/Firebird.html index eadb5bd..4a81138 100644 --- a/docs/classes/Firebird.html +++ b/docs/classes/Firebird.html @@ -833,7 +833,7 @@ the last query executed
+ generated on 2012-05-07T11:27:03-04:00.
diff --git a/docs/classes/Firebird_Result.html b/docs/classes/Firebird_Result.html index 74a1a91..70daefb 100644 --- a/docs/classes/Firebird_Result.html +++ b/docs/classes/Firebird_Result.html @@ -504,7 +504,7 @@ the query
+ generated on 2012-05-07T11:27:03-04:00.
diff --git a/docs/classes/Firebird_SQL.html b/docs/classes/Firebird_SQL.html index a1f3931..e674aea 100644 --- a/docs/classes/Firebird_SQL.html +++ b/docs/classes/Firebird_SQL.html @@ -297,7 +297,7 @@
+ generated on 2012-05-07T11:27:03-04:00.
diff --git a/docs/classes/Firebird_Util.html b/docs/classes/Firebird_Util.html index 1933846..680a3a1 100644 --- a/docs/classes/Firebird_Util.html +++ b/docs/classes/Firebird_Util.html @@ -212,7 +212,7 @@
+ generated on 2012-05-07T11:27:03-04:00.
diff --git a/docs/classes/MM.html b/docs/classes/MM.html index 5ce7c43..85fd8cf 100644 --- a/docs/classes/MM.html +++ b/docs/classes/MM.html @@ -434,7 +434,7 @@ dynamic methods
+ generated on 2012-05-07T11:27:03-04:00.
diff --git a/docs/classes/MM_Controller.html b/docs/classes/MM_Controller.html index c576b68..5235b69 100644 --- a/docs/classes/MM_Controller.html +++ b/docs/classes/MM_Controller.html @@ -760,7 +760,7 @@
+ generated on 2012-05-07T11:27:03-04:00.
diff --git a/docs/classes/MM_Model.html b/docs/classes/MM_Model.html index b898fe2..f557bf9 100644 --- a/docs/classes/MM_Model.html +++ b/docs/classes/MM_Model.html @@ -724,7 +724,7 @@
+ generated on 2012-05-07T11:27:03-04:00.
diff --git a/docs/classes/MM_Output.html b/docs/classes/MM_Output.html index 0b6bcdb..0fe0ab8 100644 --- a/docs/classes/MM_Output.html +++ b/docs/classes/MM_Output.html @@ -640,7 +640,7 @@ Used for outputing HTML
+ generated on 2012-05-07T11:27:03-04:00.
diff --git a/docs/classes/MM_Page.html b/docs/classes/MM_Page.html index cc726a1..d0188ce 100644 --- a/docs/classes/MM_Page.html +++ b/docs/classes/MM_Page.html @@ -972,7 +972,7 @@ supports

+ generated on 2012-05-07T11:27:03-04:00.
diff --git a/docs/classes/MM_Session.html b/docs/classes/MM_Session.html index 6b9d41d..1b389b5 100644 --- a/docs/classes/MM_Session.html +++ b/docs/classes/MM_Session.html @@ -144,7 +144,7 @@
+ generated on 2012-05-07T11:27:03-04:00.
diff --git a/docs/classes/MySQL.html b/docs/classes/MySQL.html index f4e3b38..d34985e 100644 --- a/docs/classes/MySQL.html +++ b/docs/classes/MySQL.html @@ -869,7 +869,7 @@ the connection/database
+ generated on 2012-05-07T11:27:03-04:00.
diff --git a/docs/classes/MySQL_SQL.html b/docs/classes/MySQL_SQL.html index 54b1f5f..f6e640a 100644 --- a/docs/classes/MySQL_SQL.html +++ b/docs/classes/MySQL_SQL.html @@ -281,7 +281,7 @@
+ generated on 2012-05-07T11:27:03-04:00.
diff --git a/docs/classes/MySQL_Util.html b/docs/classes/MySQL_Util.html index 188d7ec..e4644f2 100644 --- a/docs/classes/MySQL_Util.html +++ b/docs/classes/MySQL_Util.html @@ -208,7 +208,7 @@
+ generated on 2012-05-07T11:27:03-04:00.
diff --git a/docs/classes/ODBC.html b/docs/classes/ODBC.html index b8835dc..89c920e 100644 --- a/docs/classes/ODBC.html +++ b/docs/classes/ODBC.html @@ -871,7 +871,7 @@ the connection/database
+ generated on 2012-05-07T11:27:03-04:00.
diff --git a/docs/classes/ODBC_SQL.html b/docs/classes/ODBC_SQL.html index 7c3ac8c..69c3dda 100644 --- a/docs/classes/ODBC_SQL.html +++ b/docs/classes/ODBC_SQL.html @@ -281,7 +281,7 @@
+ generated on 2012-05-07T11:27:03-04:00.
diff --git a/docs/classes/ODBC_Util.html b/docs/classes/ODBC_Util.html index 349c147..32713cf 100644 --- a/docs/classes/ODBC_Util.html +++ b/docs/classes/ODBC_Util.html @@ -203,7 +203,7 @@
+ generated on 2012-05-07T11:27:03-04:00.
diff --git a/docs/classes/PgSQL.html b/docs/classes/PgSQL.html index 69507c9..24593b8 100644 --- a/docs/classes/PgSQL.html +++ b/docs/classes/PgSQL.html @@ -871,7 +871,7 @@ the connection/database
+ generated on 2012-05-07T11:27:03-04:00.
diff --git a/docs/classes/PgSQL_SQL.html b/docs/classes/PgSQL_SQL.html index 314e931..4de955d 100644 --- a/docs/classes/PgSQL_SQL.html +++ b/docs/classes/PgSQL_SQL.html @@ -297,7 +297,7 @@
+ generated on 2012-05-07T11:27:03-04:00.
diff --git a/docs/classes/PgSQL_Util.html b/docs/classes/PgSQL_Util.html index 04e36b4..1779500 100644 --- a/docs/classes/PgSQL_Util.html +++ b/docs/classes/PgSQL_Util.html @@ -208,7 +208,7 @@
+ generated on 2012-05-07T11:27:03-04:00.
diff --git a/docs/classes/Query_Builder.html b/docs/classes/Query_Builder.html index 34e562a..4e19e3b 100644 --- a/docs/classes/Query_Builder.html +++ b/docs/classes/Query_Builder.html @@ -1222,7 +1222,7 @@ for complex select queries
+ generated on 2012-05-07T11:27:03-04:00.
diff --git a/docs/classes/SQLite.html b/docs/classes/SQLite.html index 965574d..8b2f5cd 100644 --- a/docs/classes/SQLite.html +++ b/docs/classes/SQLite.html @@ -886,7 +886,7 @@ method if the database does not support 'TRUNCATE';
+ generated on 2012-05-07T11:27:03-04:00.
diff --git a/docs/classes/SQLite_SQL.html b/docs/classes/SQLite_SQL.html index c9f28c8..439eddb 100644 --- a/docs/classes/SQLite_SQL.html +++ b/docs/classes/SQLite_SQL.html @@ -281,7 +281,7 @@
+ generated on 2012-05-07T11:27:03-04:00.
diff --git a/docs/classes/SQLite_Util.html b/docs/classes/SQLite_Util.html index 3479397..68a5c11 100644 --- a/docs/classes/SQLite_Util.html +++ b/docs/classes/SQLite_Util.html @@ -208,7 +208,7 @@
+ generated on 2012-05-07T11:27:03-04:00.
diff --git a/docs/classes/Settings.html b/docs/classes/Settings.html index 7c891c7..0e42203 100644 --- a/docs/classes/Settings.html +++ b/docs/classes/Settings.html @@ -244,7 +244,7 @@ directly - the settings should be safe!
+ generated on 2012-05-07T11:27:03-04:00.
diff --git a/docs/classes/Welcome.html b/docs/classes/Welcome.html index b101111..e6cddf8 100644 --- a/docs/classes/Welcome.html +++ b/docs/classes/Welcome.html @@ -902,7 +902,7 @@
+ generated on 2012-05-07T11:27:03-04:00.
diff --git a/docs/classes/Welcome_Model.html b/docs/classes/Welcome_Model.html index cfc4d27..ef6ec03 100644 --- a/docs/classes/Welcome_Model.html +++ b/docs/classes/Welcome_Model.html @@ -842,7 +842,7 @@
+ generated on 2012-05-07T11:27:03-04:00.
diff --git a/docs/classes/miniMVC.html b/docs/classes/miniMVC.html index 1795506..615161d 100644 --- a/docs/classes/miniMVC.html +++ b/docs/classes/miniMVC.html @@ -611,7 +611,7 @@
+ generated on 2012-05-07T11:27:03-04:00.
diff --git a/docs/deprecated.html b/docs/deprecated.html index cbf68ee..e1deff8 100644 --- a/docs/deprecated.html +++ b/docs/deprecated.html @@ -67,7 +67,7 @@
+ generated on 2012-05-07T11:27:03-04:00.
diff --git a/docs/errors.html b/docs/errors.html index 07eb11b..b9031d5 100644 --- a/docs/errors.html +++ b/docs/errors.html @@ -107,7 +107,7 @@
+ generated on 2012-05-07T11:27:03-04:00.
diff --git a/docs/graph_class.html b/docs/graph_class.html index 406bd50..5bf45a6 100644 --- a/docs/graph_class.html +++ b/docs/graph_class.html @@ -64,7 +64,7 @@
+ generated on 2012-05-07T11:27:03-04:00.
diff --git a/docs/index.html b/docs/index.html index 210e736..5cadc84 100644 --- a/docs/index.html +++ b/docs/index.html @@ -80,7 +80,7 @@
+ generated on 2012-05-07T11:27:03-04:00.
diff --git a/docs/markers.html b/docs/markers.html index ed44f2d..edb35b5 100644 --- a/docs/markers.html +++ b/docs/markers.html @@ -69,7 +69,7 @@
+ generated on 2012-05-07T11:27:03-04:00.
diff --git a/docs/namespaces/default.html b/docs/namespaces/default.html index 24f893e..2c20f61 100644 --- a/docs/namespaces/default.html +++ b/docs/namespaces/default.html @@ -96,17 +96,10 @@

-

Constructor for creating the objects

-
__construct(array $members) : void
+

Protected constructor for creating the one instance

+
__construct() 
-
-

-

Parameters

-
-

$members

-array -
-
+

PHP magic method that is called when an object is treated as a function

@@ -709,7 +702,7 @@ instantiates the specific db driver

+ generated on 2012-05-07T11:27:03-04:00.
diff --git a/docs/packages/.html b/docs/packages/.html index 3a6d26e..a2d00ca 100644 --- a/docs/packages/.html +++ b/docs/packages/.html @@ -67,7 +67,7 @@
+ generated on 2012-05-07T11:27:03-04:00.
diff --git a/docs/packages/Default.html b/docs/packages/Default.html index 0e0c0e4..c73922a 100644 --- a/docs/packages/Default.html +++ b/docs/packages/Default.html @@ -185,7 +185,7 @@
+ generated on 2012-05-07T11:27:03-04:00.
diff --git a/docs/packages/Query.Drivers.html b/docs/packages/Query.Drivers.html index fed4f07..ec01ebc 100644 --- a/docs/packages/Query.Drivers.html +++ b/docs/packages/Query.Drivers.html @@ -211,7 +211,7 @@ data-fetching methods

+ generated on 2012-05-07T11:27:03-04:00.
diff --git a/docs/packages/Query.Helper Classes.html b/docs/packages/Query.Helper Classes.html index 6a7d225..9fae29b 100644 --- a/docs/packages/Query.Helper Classes.html +++ b/docs/packages/Query.Helper Classes.html @@ -97,7 +97,7 @@
+ generated on 2012-05-07T11:27:03-04:00.
diff --git a/docs/packages/Query.Query.html b/docs/packages/Query.Query.html index 296c1d7..c7d59c4 100644 --- a/docs/packages/Query.Query.html +++ b/docs/packages/Query.Query.html @@ -115,7 +115,7 @@ instantiates the specific db driver

+ generated on 2012-05-07T11:27:03-04:00.
diff --git a/docs/packages/Query.html b/docs/packages/Query.html index 6a4951a..da06713 100644 --- a/docs/packages/Query.html +++ b/docs/packages/Query.html @@ -316,7 +316,7 @@ instantiates the specific db driver

+ generated on 2012-05-07T11:27:03-04:00.
diff --git a/docs/packages/miniMVC.App.html b/docs/packages/miniMVC.App.html index 9507dd5..e03d5a0 100644 --- a/docs/packages/miniMVC.App.html +++ b/docs/packages/miniMVC.App.html @@ -139,7 +139,7 @@
+ generated on 2012-05-07T11:27:03-04:00.
diff --git a/docs/packages/miniMVC.Libraries.html b/docs/packages/miniMVC.Libraries.html index 4f34130..dc6cd4b 100644 --- a/docs/packages/miniMVC.Libraries.html +++ b/docs/packages/miniMVC.Libraries.html @@ -89,7 +89,7 @@
+ generated on 2012-05-07T11:27:03-04:00.
diff --git a/docs/packages/miniMVC.System.html b/docs/packages/miniMVC.System.html index bdbbd33..55e66f4 100644 --- a/docs/packages/miniMVC.System.html +++ b/docs/packages/miniMVC.System.html @@ -137,7 +137,7 @@
+ generated on 2012-05-07T11:27:03-04:00.
diff --git a/docs/packages/miniMVC.html b/docs/packages/miniMVC.html index f7bab80..671c746 100644 --- a/docs/packages/miniMVC.html +++ b/docs/packages/miniMVC.html @@ -74,7 +74,7 @@ Functions
  • PHP magic method to facilitate dynamic methods
    __call
  • Magic function called when cloning an object
    __clone
  • -
  • Constructor for creating the objects
    __construct
  • +
  • Protected constructor for creating the one instance
    __construct
  • PHP magic method that is called when an object is treated as a function
    __invoke
  • Prints out the contents of the object when used as a string
    __toString
  • Returns routable methods for the specified controller class
    controller_methods
  • @@ -130,17 +130,10 @@ display them cleanly
    shutdown

    -

    Constructor for creating the objects

    -
    __construct(array $members) : void
    +

    Protected constructor for creating the one instance

    +
    __construct() 
    -
    -

    -

    Parameters

    -
    -

    $members

    -array -
    -
    +

    PHP magic method that is called when an object is treated as a function

    @@ -495,7 +488,7 @@ display them cleanly
    + generated on 2012-05-07T11:27:03-04:00.
    diff --git a/docs/structure.xml b/docs/structure.xml index 6b3f6ce..456a724 100644 --- a/docs/structure.xml +++ b/docs/structure.xml @@ -5385,7 +5385,7 @@ the last query executed]]> - + Convention-based micro-framework for PHP

    ]]>
    @@ -5395,24 +5395,13 @@ the last query executed]]>
    - + __construct function - - + + - - array - - - void - - - $members - - - __call @@ -5449,204 +5438,204 @@ the last query executed]]> - + __invoke function - + - + array - + \self - + $params - + get_instance function - + - + \self - + __clone function - + - + MM \MM \ArrayObject - + - - + + - + __construct function - + - + - + $members - + __call function - + - + string - + array - + mixed - + $name - + $params - + miniMVC \miniMVC \MM - + - - + + - + $output - + - + \MM_Output - + __construct function - + - + array - + $members - + __call function - + - + string - + array - + $name - + $args - + load_class function - + - + string - + void - + $name - + unload function - + - + string - + $name - + load_config function - + - + string - + $name @@ -6555,7 +6544,7 @@ Used for outputing HTML]]>
    - + Convention-based micro-framework for PHP

    ]]>
    @@ -6565,12 +6554,6 @@ Used for outputing HTML]]>
    - - db/autoload.php - - - core/miniMVC.php - shutdown function @@ -6673,157 +6656,157 @@ display them cleanly]]> - + is_like_array function - + - + mixed - + bool - + $var - + show_404 function - + - + void - + show_error function - + - + string - + int - + $message - + $status_code - + controller_methods function - + - + string - + array - + $controller - + route function - + - + void - + site_url function - + - + string - + string - + $segment - + to_string function - + - + \object/array - + string - + string - + $data - + $method - + do_include function - + - + string - + void - + $path
    - + Convention-based micro-framework for PHP

    ]]>
    @@ -6839,6 +6822,12 @@ display them cleanly]]> common.php + + db/autoload.php + + + core/miniMVC.php + ENVIRONMENT diff --git a/index.php b/index.php index 1f3f195..bfe86e3 100644 --- a/index.php +++ b/index.php @@ -42,7 +42,7 @@ define('MM_SYS_PATH', __DIR__.'/sys/'); define('MM_APP_PATH', __DIR__.'/app/'); define('MM_MOD_PATH', MM_APP_PATH.'modules/'); - +// Determine the default site url $ri = $_SERVER['REQUEST_URI']; $ind_pos = stripos($ri, "index.php"); $default_path = ($ind_pos !== FALSE) ? substr($ri, 0, $ind_pos) : $ri; @@ -54,6 +54,13 @@ require(MM_APP_PATH.'config/config.php'); // Require the most important files require(MM_SYS_PATH . "common.php"); +// Load Database classes +require_once(MM_SYS_PATH.'db/autoload.php'); + +// Load system libraries +require_once(MM_SYS_PATH.'core/miniMVC.php'); +array_map('do_include', glob(MM_SYS_PATH.'core/*.php')); + // Catch fatal errors, don't show them error_reporting((-1) & ~(E_ERROR | E_PARSE)); register_shutdown_function('shutdown'); diff --git a/sys/common.php b/sys/common.php index df9cf7e..99a9d05 100644 --- a/sys/common.php +++ b/sys/common.php @@ -111,6 +111,7 @@ function on_error($severity, $message, $filepath, $line) */ function on_exception($exception) { + // This is passed to the error template $message = $exception->getMessage(); // Contain the content for buffering @@ -155,6 +156,7 @@ function show_404() // Contain the content for buffering ob_start(); + // This is passed to the error template $message = '404 Not Found'; include(MM_APP_PATH.'/errors/error_404.php'); @@ -316,6 +318,7 @@ function route() if (in_array($func, $methods)) { + // Define the name of the current module for file loading define('MM_MOD', $module); $class = new $controller(); @@ -392,11 +395,4 @@ function do_include($path) require_once($path); } -// Load Database classes -require_once(MM_SYS_PATH.'db/autoload.php'); - -// Load system libraries -require_once(MM_SYS_PATH.'core/miniMVC.php'); -array_map('do_include', glob(MM_SYS_PATH.'core/*.php')); - // End of common.php \ No newline at end of file diff --git a/sys/core/miniMVC.php b/sys/core/miniMVC.php index 90c0863..a870bb6 100644 --- a/sys/core/miniMVC.php +++ b/sys/core/miniMVC.php @@ -136,6 +136,11 @@ trait Singleton { * @var self */ protected static $instance; + + /** + * Protected constructor for creating the one instance + */ + abstract protected function __construct(); /** * PHP magic method that is called when an object is treated as a function