update generated docs
This commit is contained in:
parent
9da461d135
commit
134d1091a9
@ -159,7 +159,7 @@
|
||||
<div class="row"><footer class="span12">
|
||||
Template is built using <a href="http://twitter.github.com/bootstrap/">Twitter Bootstrap 2</a> and icons provided by <a href="http://glyphicons.com/">Glyphicons</a>.<br>
|
||||
Documentation is powered by <a href="http://www.phpdoc.org/">phpDocumentor 2.0.0a2</a> and<br>
|
||||
generated on 2012-05-16T16:47:16-04:00.<br></footer></div>
|
||||
generated on 2012-05-18T08:03:49-04:00.<br></footer></div>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
|
@ -433,7 +433,7 @@ dynamic methods</h2>
|
||||
<div class="row"><footer class="span12">
|
||||
Template is built using <a href="http://twitter.github.com/bootstrap/">Twitter Bootstrap 2</a> and icons provided by <a href="http://glyphicons.com/">Glyphicons</a>.<br>
|
||||
Documentation is powered by <a href="http://www.phpdoc.org/">phpDocumentor 2.0.0a2</a> and<br>
|
||||
generated on 2012-05-16T16:47:16-04:00.<br></footer></div>
|
||||
generated on 2012-05-18T08:03:49-04:00.<br></footer></div>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
|
@ -757,7 +757,7 @@ dynamic methods</h2>
|
||||
<div class="row"><footer class="span12">
|
||||
Template is built using <a href="http://twitter.github.com/bootstrap/">Twitter Bootstrap 2</a> and icons provided by <a href="http://glyphicons.com/">Glyphicons</a>.<br>
|
||||
Documentation is powered by <a href="http://www.phpdoc.org/">phpDocumentor 2.0.0a2</a> and<br>
|
||||
generated on 2012-05-16T16:47:16-04:00.<br></footer></div>
|
||||
generated on 2012-05-18T08:03:49-04:00.<br></footer></div>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
|
@ -199,7 +199,7 @@ of the singleton</h2>
|
||||
<div class="row"><footer class="span12">
|
||||
Template is built using <a href="http://twitter.github.com/bootstrap/">Twitter Bootstrap 2</a> and icons provided by <a href="http://glyphicons.com/">Glyphicons</a>.<br>
|
||||
Documentation is powered by <a href="http://www.phpdoc.org/">phpDocumentor 2.0.0a2</a> and<br>
|
||||
generated on 2012-05-16T16:47:16-04:00.<br></footer></div>
|
||||
generated on 2012-05-18T08:03:49-04:00.<br></footer></div>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
|
@ -710,7 +710,7 @@ dynamic methods</h2>
|
||||
<div class="row"><footer class="span12">
|
||||
Template is built using <a href="http://twitter.github.com/bootstrap/">Twitter Bootstrap 2</a> and icons provided by <a href="http://glyphicons.com/">Glyphicons</a>.<br>
|
||||
Documentation is powered by <a href="http://www.phpdoc.org/">phpDocumentor 2.0.0a2</a> and<br>
|
||||
generated on 2012-05-16T16:47:16-04:00.<br></footer></div>
|
||||
generated on 2012-05-18T08:03:49-04:00.<br></footer></div>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
|
@ -639,7 +639,7 @@ Used for outputing HTML</h2>
|
||||
<div class="row"><footer class="span12">
|
||||
Template is built using <a href="http://twitter.github.com/bootstrap/">Twitter Bootstrap 2</a> and icons provided by <a href="http://glyphicons.com/">Glyphicons</a>.<br>
|
||||
Documentation is powered by <a href="http://www.phpdoc.org/">phpDocumentor 2.0.0a2</a> and<br>
|
||||
generated on 2012-05-16T16:47:16-04:00.<br></footer></div>
|
||||
generated on 2012-05-18T08:03:49-04:00.<br></footer></div>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
|
@ -1174,7 +1174,7 @@ supports</p></p>
|
||||
<div class="row"><footer class="span12">
|
||||
Template is built using <a href="http://twitter.github.com/bootstrap/">Twitter Bootstrap 2</a> and icons provided by <a href="http://glyphicons.com/">Glyphicons</a>.<br>
|
||||
Documentation is powered by <a href="http://www.phpdoc.org/">phpDocumentor 2.0.0a2</a> and<br>
|
||||
generated on 2012-05-16T16:47:16-04:00.<br></footer></div>
|
||||
generated on 2012-05-18T08:03:49-04:00.<br></footer></div>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
|
@ -143,7 +143,7 @@
|
||||
<div class="row"><footer class="span12">
|
||||
Template is built using <a href="http://twitter.github.com/bootstrap/">Twitter Bootstrap 2</a> and icons provided by <a href="http://glyphicons.com/">Glyphicons</a>.<br>
|
||||
Documentation is powered by <a href="http://www.phpdoc.org/">phpDocumentor 2.0.0a2</a> and<br>
|
||||
generated on 2012-05-16T16:47:16-04:00.<br></footer></div>
|
||||
generated on 2012-05-18T08:03:49-04:00.<br></footer></div>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
|
@ -608,7 +608,7 @@ dynamic methods</h2>
|
||||
<div class="row"><footer class="span12">
|
||||
Template is built using <a href="http://twitter.github.com/bootstrap/">Twitter Bootstrap 2</a> and icons provided by <a href="http://glyphicons.com/">Glyphicons</a>.<br>
|
||||
Documentation is powered by <a href="http://www.phpdoc.org/">phpDocumentor 2.0.0a2</a> and<br>
|
||||
generated on 2012-05-16T16:47:16-04:00.<br></footer></div>
|
||||
generated on 2012-05-18T08:03:49-04:00.<br></footer></div>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
|
@ -66,7 +66,7 @@
|
||||
<div class="row"><footer class="span12">
|
||||
Template is built using <a href="http://twitter.github.com/bootstrap/">Twitter Bootstrap 2</a> and icons provided by <a href="http://glyphicons.com/">Glyphicons</a>.<br>
|
||||
Documentation is powered by <a href="http://www.phpdoc.org/">phpDocumentor 2.0.0a2</a> and<br>
|
||||
generated on 2012-05-16T16:47:16-04:00.<br></footer></div>
|
||||
generated on 2012-05-18T08:03:49-04:00.<br></footer></div>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
|
@ -81,7 +81,7 @@
|
||||
<div class="row"><footer class="span12">
|
||||
Template is built using <a href="http://twitter.github.com/bootstrap/">Twitter Bootstrap 2</a> and icons provided by <a href="http://glyphicons.com/">Glyphicons</a>.<br>
|
||||
Documentation is powered by <a href="http://www.phpdoc.org/">phpDocumentor 2.0.0a2</a> and<br>
|
||||
generated on 2012-05-16T16:47:16-04:00.<br></footer></div>
|
||||
generated on 2012-05-18T08:03:49-04:00.<br></footer></div>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
|
@ -63,7 +63,7 @@
|
||||
</script><div class="row"><footer class="span12">
|
||||
Template is built using <a href="http://twitter.github.com/bootstrap/">Twitter Bootstrap 2</a> and icons provided by <a href="http://glyphicons.com/">Glyphicons</a>.<br>
|
||||
Documentation is powered by <a href="http://www.phpdoc.org/">phpDocumentor 2.0.0a2</a> and<br>
|
||||
generated on 2012-05-16T16:47:16-04:00.<br></footer></div>
|
||||
generated on 2012-05-18T08:03:49-04:00.<br></footer></div>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
|
@ -78,7 +78,7 @@
|
||||
<div class="row"><footer class="span12">
|
||||
Template is built using <a href="http://twitter.github.com/bootstrap/">Twitter Bootstrap 2</a> and icons provided by <a href="http://glyphicons.com/">Glyphicons</a>.<br>
|
||||
Documentation is powered by <a href="http://www.phpdoc.org/">phpDocumentor 2.0.0a2</a> and<br>
|
||||
generated on 2012-05-16T16:47:16-04:00.<br></footer></div>
|
||||
generated on 2012-05-18T08:03:49-04:00.<br></footer></div>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
|
@ -68,7 +68,7 @@
|
||||
<div class="row"><footer class="span12">
|
||||
Template is built using <a href="http://twitter.github.com/bootstrap/">Twitter Bootstrap 2</a> and icons provided by <a href="http://glyphicons.com/">Glyphicons</a>.<br>
|
||||
Documentation is powered by <a href="http://www.phpdoc.org/">phpDocumentor 2.0.0a2</a> and<br>
|
||||
generated on 2012-05-16T16:47:16-04:00.<br></footer></div>
|
||||
generated on 2012-05-18T08:03:49-04:00.<br></footer></div>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
|
@ -184,23 +184,6 @@
|
||||
<div class="subelement response"><code>bool</code></div>
|
||||
</div></div>
|
||||
</div>
|
||||
<a name="load_file" id="load_file"></a><div class="element clickable function load_file" data-toggle="collapse" data-target=".load_file .collapse">
|
||||
<h2>Function to search through the tree to find the necessary file</h2>
|
||||
<pre>load_file(string $file, string $curr_path) : void</pre>
|
||||
<div class="labels"></div>
|
||||
<div class="row collapse"><div class="span8">
|
||||
<p class="long_description"></p>
|
||||
<h3>Parameters</h3>
|
||||
<div class="subelement argument">
|
||||
<h4>$file</h4>
|
||||
<code>string</code>
|
||||
</div>
|
||||
<div class="subelement argument">
|
||||
<h4>$curr_path</h4>
|
||||
<code>string</code>
|
||||
</div>
|
||||
</div></div>
|
||||
</div>
|
||||
<a name="on_error" id="on_error"></a><div class="element clickable function on_error" data-toggle="collapse" data-target=".on_error .collapse">
|
||||
<h2>Custom error handler</h2>
|
||||
<pre>on_error(int $severity, string $message, string $filepath, int $line) : <a href="http://php.net/manual/en/class.errorexception.php">\ErrorException</a></pre>
|
||||
@ -421,19 +404,13 @@ display them cleanly</h2>
|
||||
<div class="labels"></div>
|
||||
<div class="row collapse"><div class="span8"><p class="long_description"></p></div></div>
|
||||
</div>
|
||||
<a name="Unknown" id="Unknown"> </a><div class="element clickable constant Unknown" data-toggle="collapse" data-target=".Unknown .collapse">
|
||||
<h2>Define a session id to namespace sessions</h2>
|
||||
<pre>Unknown </pre>
|
||||
<div class="labels"></div>
|
||||
<div class="row collapse"><div class="span8"><p class="long_description"></p></div></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row"><footer class="span12">
|
||||
Template is built using <a href="http://twitter.github.com/bootstrap/">Twitter Bootstrap 2</a> and icons provided by <a href="http://glyphicons.com/">Glyphicons</a>.<br>
|
||||
Documentation is powered by <a href="http://www.phpdoc.org/">phpDocumentor 2.0.0a2</a> and<br>
|
||||
generated on 2012-05-16T16:47:16-04:00.<br></footer></div>
|
||||
generated on 2012-05-18T08:03:49-04:00.<br></footer></div>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
|
@ -66,7 +66,7 @@
|
||||
<div class="row"><footer class="span12">
|
||||
Template is built using <a href="http://twitter.github.com/bootstrap/">Twitter Bootstrap 2</a> and icons provided by <a href="http://glyphicons.com/">Glyphicons</a>.<br>
|
||||
Documentation is powered by <a href="http://www.phpdoc.org/">phpDocumentor 2.0.0a2</a> and<br>
|
||||
generated on 2012-05-16T16:47:16-04:00.<br></footer></div>
|
||||
generated on 2012-05-18T08:03:49-04:00.<br></footer></div>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
|
@ -65,7 +65,6 @@
|
||||
<li class="constant "><a href="#MM_BASE_PATH" title="MM_BASE_PATH :: "><span class="description">MM_BASE_PATH</span><pre>MM_BASE_PATH</pre></a></li>
|
||||
<li class="constant "><a href="#MM_MOD_PATH" title="MM_MOD_PATH :: "><span class="description">MM_MOD_PATH</span><pre>MM_MOD_PATH</pre></a></li>
|
||||
<li class="constant "><a href="#MM_SYS_PATH" title="MM_SYS_PATH :: "><span class="description">MM_SYS_PATH</span><pre>MM_SYS_PATH</pre></a></li>
|
||||
<li class="constant "><a href="#Unknown" title="Unknown :: Define a session id to namespace sessions"><span class="description">Define a session id to namespace sessions</span><pre>Unknown</pre></a></li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="span8 package-contents">
|
||||
@ -102,19 +101,13 @@
|
||||
<div class="labels"></div>
|
||||
<div class="row collapse"><div class="span8"><p class="long_description"></p></div></div>
|
||||
</div>
|
||||
<a name="Unknown" id="Unknown"> </a><div class="element clickable constant Unknown" data-toggle="collapse" data-target=".Unknown .collapse">
|
||||
<h2>Define a session id to namespace sessions</h2>
|
||||
<pre>Unknown </pre>
|
||||
<div class="labels"></div>
|
||||
<div class="row collapse"><div class="span8"><p class="long_description"></p></div></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row"><footer class="span12">
|
||||
Template is built using <a href="http://twitter.github.com/bootstrap/">Twitter Bootstrap 2</a> and icons provided by <a href="http://glyphicons.com/">Glyphicons</a>.<br>
|
||||
Documentation is powered by <a href="http://www.phpdoc.org/">phpDocumentor 2.0.0a2</a> and<br>
|
||||
generated on 2012-05-16T16:47:16-04:00.<br></footer></div>
|
||||
generated on 2012-05-18T08:03:49-04:00.<br></footer></div>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
|
@ -99,7 +99,7 @@
|
||||
<div class="row"><footer class="span12">
|
||||
Template is built using <a href="http://twitter.github.com/bootstrap/">Twitter Bootstrap 2</a> and icons provided by <a href="http://glyphicons.com/">Glyphicons</a>.<br>
|
||||
Documentation is powered by <a href="http://www.phpdoc.org/">phpDocumentor 2.0.0a2</a> and<br>
|
||||
generated on 2012-05-16T16:47:16-04:00.<br></footer></div>
|
||||
generated on 2012-05-18T08:03:49-04:00.<br></footer></div>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
|
@ -96,7 +96,7 @@
|
||||
<div class="row"><footer class="span12">
|
||||
Template is built using <a href="http://twitter.github.com/bootstrap/">Twitter Bootstrap 2</a> and icons provided by <a href="http://glyphicons.com/">Glyphicons</a>.<br>
|
||||
Documentation is powered by <a href="http://www.phpdoc.org/">phpDocumentor 2.0.0a2</a> and<br>
|
||||
generated on 2012-05-16T16:47:16-04:00.<br></footer></div>
|
||||
generated on 2012-05-18T08:03:49-04:00.<br></footer></div>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
|
@ -136,7 +136,7 @@
|
||||
<div class="row"><footer class="span12">
|
||||
Template is built using <a href="http://twitter.github.com/bootstrap/">Twitter Bootstrap 2</a> and icons provided by <a href="http://glyphicons.com/">Glyphicons</a>.<br>
|
||||
Documentation is powered by <a href="http://www.phpdoc.org/">phpDocumentor 2.0.0a2</a> and<br>
|
||||
generated on 2012-05-16T16:47:16-04:00.<br></footer></div>
|
||||
generated on 2012-05-18T08:03:49-04:00.<br></footer></div>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
|
@ -81,7 +81,6 @@
|
||||
<li class="function "><a href="#get_instance" title="get_instance :: Singleton getter function"><span class="description">Singleton getter function</span><pre>get_instance</pre></a></li>
|
||||
<li class="function "><a href="#init" title="init :: Load required classes for bootstraping"><span class="description">Load required classes for bootstraping</span><pre>init</pre></a></li>
|
||||
<li class="function "><a href="#is_like_array" title="is_like_array :: Utility function to check if a variable is set, and is an array or object"><span class="description">Utility function to check if a variable is set, and is an array or object</span><pre>is_like_array</pre></a></li>
|
||||
<li class="function "><a href="#load_file" title="load_file :: Function to search through the tree to find the necessary file"><span class="description">Function to search through the tree to find the necessary file</span><pre>load_file</pre></a></li>
|
||||
<li class="function "><a href="#on_error" title="on_error :: Custom error handler"><span class="description">Custom error handler</span><pre>on_error</pre></a></li>
|
||||
<li class="function "><a href="#on_exception" title="on_exception :: Custom exception handlererror_get_last"><span class="description">Custom exception handlererror_get_last</span><pre>on_exception</pre></a></li>
|
||||
<li class="function "><a href="#route" title="route :: Calls the appropriate module/controller/function based on the url"><span class="description">Calls the appropriate module/controller/function based on the url</span><pre>route</pre></a></li>
|
||||
@ -219,23 +218,6 @@ display them cleanly</span><pre>shutdown</pre></a></li>
|
||||
<div class="subelement response"><code>bool</code></div>
|
||||
</div></div>
|
||||
</div>
|
||||
<a name="load_file" id="load_file"></a><div class="element clickable function load_file" data-toggle="collapse" data-target=".load_file .collapse">
|
||||
<h2>Function to search through the tree to find the necessary file</h2>
|
||||
<pre>load_file(string $file, string $curr_path) : void</pre>
|
||||
<div class="labels"></div>
|
||||
<div class="row collapse"><div class="span8">
|
||||
<p class="long_description"></p>
|
||||
<h3>Parameters</h3>
|
||||
<div class="subelement argument">
|
||||
<h4>$file</h4>
|
||||
<code>string</code>
|
||||
</div>
|
||||
<div class="subelement argument">
|
||||
<h4>$curr_path</h4>
|
||||
<code>string</code>
|
||||
</div>
|
||||
</div></div>
|
||||
</div>
|
||||
<a name="on_error" id="on_error"></a><div class="element clickable function on_error" data-toggle="collapse" data-target=".on_error .collapse">
|
||||
<h2>Custom error handler</h2>
|
||||
<pre>on_error(int $severity, string $message, string $filepath, int $line) : <a href="http://php.net/manual/en/class.errorexception.php">\ErrorException</a></pre>
|
||||
@ -467,7 +449,7 @@ display them cleanly</h2>
|
||||
<div class="row"><footer class="span12">
|
||||
Template is built using <a href="http://twitter.github.com/bootstrap/">Twitter Bootstrap 2</a> and icons provided by <a href="http://glyphicons.com/">Glyphicons</a>.<br>
|
||||
Documentation is powered by <a href="http://www.phpdoc.org/">phpDocumentor 2.0.0a2</a> and<br>
|
||||
generated on 2012-05-16T16:47:16-04:00.<br></footer></div>
|
||||
generated on 2012-05-18T08:03:49-04:00.<br></footer></div>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
|
@ -1,6 +1,6 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<project version="2.0.0a2" title="miniMVC">
|
||||
<file path="sys/core/model.php" hash="5f2aa5ce784a74986e60ef1d75c1c0c6" package="miniMVC">
|
||||
<file path="sys/core/model.php" hash="39687cc8fc2db1f95da481f88474543b" package="miniMVC">
|
||||
<docblock line="2">
|
||||
<description><![CDATA[MiniMVC]]></description>
|
||||
<long-description><![CDATA[<p>Convention-based micro-framework for PHP</p>]]></long-description>
|
||||
@ -41,7 +41,7 @@
|
||||
</method>
|
||||
</class>
|
||||
</file>
|
||||
<file path="sys/core/db.php" hash="388ee87f5e490b140bf63f342cde085d" package="miniMVC">
|
||||
<file path="sys/core/db.php" hash="ce45be72460ec058f1b097fdcc4190de" package="miniMVC">
|
||||
<docblock line="2">
|
||||
<description><![CDATA[MiniMVC]]></description>
|
||||
<long-description><![CDATA[<p>Convention-based micro-framework for PHP</p>]]></long-description>
|
||||
@ -155,7 +155,7 @@
|
||||
</method>
|
||||
</class>
|
||||
</file>
|
||||
<file path="sys/core/traits.php" hash="31b716d9af4d97d256d85c4d75324dbe" package="miniMVC">
|
||||
<file path="sys/core/traits.php" hash="180c0974066474e12347bed21c471073" package="miniMVC">
|
||||
<docblock line="2">
|
||||
<description><![CDATA[MiniMVC]]></description>
|
||||
<long-description><![CDATA[<p>Convention-based micro-framework for PHP</p>]]></long-description>
|
||||
@ -336,7 +336,7 @@
|
||||
</method>
|
||||
</class>
|
||||
</file>
|
||||
<file path="sys/core/page.php" hash="4d0b31c524dc800d5d5d02e8385801d7" package="miniMVC">
|
||||
<file path="sys/core/page.php" hash="13ce20f0ca0bbb2f287fe10e91e0ef88" package="miniMVC">
|
||||
<docblock line="2">
|
||||
<description><![CDATA[MiniMVC]]></description>
|
||||
<long-description><![CDATA[<p>Convention-based micro-framework for PHP</p>]]></long-description>
|
||||
@ -967,7 +967,7 @@ dynamic methods]]></description>
|
||||
</method>
|
||||
</class>
|
||||
</file>
|
||||
<file path="sys/core/controller.php" hash="04d74f84fc24b2a7440f48f44214cc38" package="miniMVC">
|
||||
<file path="sys/core/controller.php" hash="ee59441b55721d586c536f30372daa36" package="miniMVC">
|
||||
<docblock line="2">
|
||||
<description><![CDATA[MiniMVC]]></description>
|
||||
<long-description><![CDATA[<p>Convention-based micro-framework for PHP</p>]]></long-description>
|
||||
@ -1073,7 +1073,7 @@ dynamic methods]]></description>
|
||||
</method>
|
||||
</class>
|
||||
</file>
|
||||
<file path="sys/core/output.php" hash="22c578973d2a335045740f7f8627f73a" package="Default">
|
||||
<file path="sys/core/output.php" hash="46a60c21d86af7f52aee6371b09c1d32" package="Default">
|
||||
<docblock line="2">
|
||||
<description><![CDATA[MiniMVC]]></description>
|
||||
<long-description><![CDATA[<p>Convention-based micro-framework for PHP</p>]]></long-description>
|
||||
@ -1203,7 +1203,7 @@ Used for outputing HTML]]></description>
|
||||
</method>
|
||||
</class>
|
||||
</file>
|
||||
<file path="sys/libraries/data_store.php" hash="574fd813db37e3eb35727e618ac96a50" package="miniMVC">
|
||||
<file path="sys/libraries/data_store.php" hash="dcef82fa82c3d0513e7d776df22e4944" package="miniMVC">
|
||||
<docblock line="2">
|
||||
<description><![CDATA[MiniMVC]]></description>
|
||||
<long-description><![CDATA[<p>Convention-based micro-framework for PHP</p>]]></long-description>
|
||||
@ -1348,7 +1348,7 @@ of the singleton]]></description>
|
||||
</method>
|
||||
</class>
|
||||
</file>
|
||||
<file path="sys/libraries/session.php" hash="120128c3b65c9a6d9ba91707a1a509c4" package="miniMVC">
|
||||
<file path="sys/libraries/session.php" hash="10a8c36a92f05af78d327b2390bb955b" package="miniMVC">
|
||||
<docblock line="2">
|
||||
<description><![CDATA[MiniMVC]]></description>
|
||||
<long-description><![CDATA[<p>Convention-based micro-framework for PHP</p>]]></long-description>
|
||||
@ -1358,103 +1358,95 @@ of the singleton]]></description>
|
||||
<tag line="2" name="link" description="https://github.com/timw4mail/miniMVC" link="https://github.com/timw4mail/miniMVC"/>
|
||||
<tag line="2" name="license" description="http://philsturgeon.co.uk/code/dbad-license"/>
|
||||
</docblock>
|
||||
<constant namespace="default" line="18" package="Default">
|
||||
<name>Unknown</name>
|
||||
<value><![CDATA[]]></value>
|
||||
<docblock line="15">
|
||||
<description><![CDATA[Define a session id to namespace sessions]]></description>
|
||||
<long-description><![CDATA[]]></long-description>
|
||||
</docblock>
|
||||
</constant>
|
||||
<class final="false" abstract="false" namespace="default" line="27" package="miniMVC\Libraries">
|
||||
<class final="false" abstract="false" namespace="default" line="22" package="miniMVC\Libraries">
|
||||
<name>MM_Session</name>
|
||||
<full_name>\MM_Session</full_name>
|
||||
<extends/>
|
||||
<docblock line="21">
|
||||
<docblock line="16">
|
||||
<description><![CDATA[Class to improve handling of PHP sessions]]></description>
|
||||
<long-description><![CDATA[]]></long-description>
|
||||
<tag line="21" name="package" description="miniMVC"/>
|
||||
<tag line="21" name="subpackage" description="Libraries"/>
|
||||
<tag line="16" name="package" description="miniMVC"/>
|
||||
<tag line="16" name="subpackage" description="Libraries"/>
|
||||
</docblock>
|
||||
<property final="false" static="false" visibility="protected" line="42" package="Default">
|
||||
<property final="false" static="false" visibility="protected" line="37" package="Default">
|
||||
<name>$sess</name>
|
||||
<default><![CDATA[[]]]></default>
|
||||
<docblock line="37">
|
||||
<docblock line="32">
|
||||
<description><![CDATA[Reference to session superglobal]]></description>
|
||||
<long-description><![CDATA[]]></long-description>
|
||||
<tag line="37" name="var" description="" type="array">
|
||||
<tag line="32" name="var" description="" type="array">
|
||||
<type by_reference="false">array</type>
|
||||
</tag>
|
||||
</docblock>
|
||||
</property>
|
||||
<method final="false" abstract="false" static="false" visibility="protected" namespace="default" line="47" package="">
|
||||
<method final="false" abstract="false" static="false" visibility="protected" namespace="default" line="42" package="">
|
||||
<name>__construct</name>
|
||||
<type>function</type>
|
||||
<docblock line="44">
|
||||
<docblock line="39">
|
||||
<description><![CDATA[Start a session]]></description>
|
||||
<long-description><![CDATA[]]></long-description>
|
||||
</docblock>
|
||||
</method>
|
||||
<method final="false" abstract="false" static="false" visibility="public" namespace="default" line="65" package="">
|
||||
<method final="false" abstract="false" static="false" visibility="public" namespace="default" line="60" package="">
|
||||
<name>__set</name>
|
||||
<type>function</type>
|
||||
<docblock line="58">
|
||||
<docblock line="53">
|
||||
<description><![CDATA[Set a session value]]></description>
|
||||
<long-description><![CDATA[]]></long-description>
|
||||
<tag line="58" name="param" description="" type="string" variable="$key">
|
||||
<tag line="53" name="param" description="" type="string" variable="$key">
|
||||
<type by_reference="false">string</type>
|
||||
</tag>
|
||||
<tag line="58" name="param" description="" type="mixed" variable="$val">
|
||||
<tag line="53" name="param" description="" type="mixed" variable="$val">
|
||||
<type by_reference="false">mixed</type>
|
||||
</tag>
|
||||
<tag line="58" name="return" description="" type="void">
|
||||
<tag line="53" name="return" description="" type="void">
|
||||
<type by_reference="false">void</type>
|
||||
</tag>
|
||||
</docblock>
|
||||
<argument line="65">
|
||||
<argument line="60">
|
||||
<name>$key</name>
|
||||
<default><![CDATA[]]></default>
|
||||
<type/>
|
||||
</argument>
|
||||
<argument line="65">
|
||||
<argument line="60">
|
||||
<name>$val</name>
|
||||
<default><![CDATA[]]></default>
|
||||
<type/>
|
||||
</argument>
|
||||
</method>
|
||||
<method final="false" abstract="false" static="false" visibility="public" namespace="default" line="78" package="">
|
||||
<method final="false" abstract="false" static="false" visibility="public" namespace="default" line="73" package="">
|
||||
<name>__get</name>
|
||||
<type>function</type>
|
||||
<docblock line="72">
|
||||
<docblock line="67">
|
||||
<description><![CDATA[Retreive a session value]]></description>
|
||||
<long-description><![CDATA[]]></long-description>
|
||||
<tag line="72" name="param" description="" type="string" variable="$key">
|
||||
<tag line="67" name="param" description="" type="string" variable="$key">
|
||||
<type by_reference="false">string</type>
|
||||
</tag>
|
||||
<tag line="72" name="return" description="" type="mixed">
|
||||
<tag line="67" name="return" description="" type="mixed">
|
||||
<type by_reference="false">mixed</type>
|
||||
</tag>
|
||||
</docblock>
|
||||
<argument line="78">
|
||||
<argument line="73">
|
||||
<name>$key</name>
|
||||
<default><![CDATA[]]></default>
|
||||
<type/>
|
||||
</argument>
|
||||
</method>
|
||||
<method final="false" abstract="false" static="false" visibility="public" namespace="default" line="90" package="">
|
||||
<method final="false" abstract="false" static="false" visibility="public" namespace="default" line="85" package="">
|
||||
<name>destroy</name>
|
||||
<type>function</type>
|
||||
<docblock line="85">
|
||||
<docblock line="80">
|
||||
<description><![CDATA[Destroy a session]]></description>
|
||||
<long-description><![CDATA[]]></long-description>
|
||||
<tag line="85" name="return" description="" type="void">
|
||||
<tag line="80" name="return" description="" type="void">
|
||||
<type by_reference="false">void</type>
|
||||
</tag>
|
||||
</docblock>
|
||||
</method>
|
||||
</class>
|
||||
</file>
|
||||
<file path="sys/common.php" hash="48438a8d54cc55b706e1bbffd840e4c4" package="miniMVC">
|
||||
<file path="sys/common.php" hash="2576c63ab465aa07cf44610dbc316270" package="miniMVC">
|
||||
<docblock line="2">
|
||||
<description><![CDATA[MiniMVC]]></description>
|
||||
<long-description><![CDATA[<p>Convention-based micro-framework for PHP</p>]]></long-description>
|
||||
@ -1464,270 +1456,243 @@ of the singleton]]></description>
|
||||
<tag line="2" name="link" description="https://github.com/timw4mail/miniMVC" link="https://github.com/timw4mail/miniMVC"/>
|
||||
<tag line="2" name="license" description="http://philsturgeon.co.uk/code/dbad-license"/>
|
||||
</docblock>
|
||||
<function namespace="default" line="32" package="miniMVC">
|
||||
<function namespace="default" line="34" package="miniMVC">
|
||||
<name>shutdown</name>
|
||||
<type>function</type>
|
||||
<docblock line="25">
|
||||
<docblock line="27">
|
||||
<description><![CDATA[Function to run on script shutdown
|
||||
-used to catch most fatal errors, and
|
||||
display them cleanly]]></description>
|
||||
<long-description><![CDATA[]]></long-description>
|
||||
<tag line="25" name="return" description="" type="void">
|
||||
<tag line="27" name="return" description="" type="void">
|
||||
<type by_reference="false">void</type>
|
||||
</tag>
|
||||
</docblock>
|
||||
</function>
|
||||
<function namespace="default" line="64" package="miniMVC">
|
||||
<name>load_file</name>
|
||||
<type>function</type>
|
||||
<docblock line="57">
|
||||
<description><![CDATA[Function to search through the tree to find the necessary file]]></description>
|
||||
<long-description><![CDATA[]]></long-description>
|
||||
<tag line="57" name="param" description="" type="string" variable="$file">
|
||||
<type by_reference="false">string</type>
|
||||
</tag>
|
||||
<tag line="57" name="param" description="" type="string" variable="$curr_path">
|
||||
<type by_reference="false">string</type>
|
||||
</tag>
|
||||
<tag line="57" name="return" description="" type="void">
|
||||
<type by_reference="false">void</type>
|
||||
</tag>
|
||||
</docblock>
|
||||
<argument line="64">
|
||||
<name>$file</name>
|
||||
<default><![CDATA[]]></default>
|
||||
<type/>
|
||||
</argument>
|
||||
<argument line="64">
|
||||
<name>$curr_path</name>
|
||||
<default><![CDATA[""]]></default>
|
||||
<type/>
|
||||
</argument>
|
||||
</function>
|
||||
<function namespace="default" line="99" package="miniMVC">
|
||||
<function namespace="default" line="67" package="miniMVC">
|
||||
<name>on_error</name>
|
||||
<type>function</type>
|
||||
<docblock line="90">
|
||||
<docblock line="58">
|
||||
<description><![CDATA[Custom error handler]]></description>
|
||||
<long-description><![CDATA[]]></long-description>
|
||||
<tag line="90" name="param" description="" type="int" variable="$severity">
|
||||
<tag line="58" name="param" description="" type="int" variable="$severity">
|
||||
<type by_reference="false">int</type>
|
||||
</tag>
|
||||
<tag line="90" name="param" description="" type="string" variable="$message">
|
||||
<tag line="58" name="param" description="" type="string" variable="$message">
|
||||
<type by_reference="false">string</type>
|
||||
</tag>
|
||||
<tag line="90" name="param" description="" type="string" variable="$filepath">
|
||||
<tag line="58" name="param" description="" type="string" variable="$filepath">
|
||||
<type by_reference="false">string</type>
|
||||
</tag>
|
||||
<tag line="90" name="param" description="" type="int" variable="$line">
|
||||
<tag line="58" name="param" description="" type="int" variable="$line">
|
||||
<type by_reference="false">int</type>
|
||||
</tag>
|
||||
<tag line="90" name="return" description="" type="\ErrorException">
|
||||
<tag line="58" name="return" description="" type="\ErrorException">
|
||||
<type by_reference="false">\ErrorException</type>
|
||||
</tag>
|
||||
</docblock>
|
||||
<argument line="99">
|
||||
<argument line="67">
|
||||
<name>$severity</name>
|
||||
<default><![CDATA[]]></default>
|
||||
<type/>
|
||||
</argument>
|
||||
<argument line="99">
|
||||
<argument line="67">
|
||||
<name>$message</name>
|
||||
<default><![CDATA[]]></default>
|
||||
<type/>
|
||||
</argument>
|
||||
<argument line="99">
|
||||
<argument line="67">
|
||||
<name>$filepath</name>
|
||||
<default><![CDATA[]]></default>
|
||||
<type/>
|
||||
</argument>
|
||||
<argument line="99">
|
||||
<argument line="67">
|
||||
<name>$line</name>
|
||||
<default><![CDATA[]]></default>
|
||||
<type/>
|
||||
</argument>
|
||||
</function>
|
||||
<function namespace="default" line="112" package="miniMVC">
|
||||
<function namespace="default" line="80" package="miniMVC">
|
||||
<name>on_exception</name>
|
||||
<type>function</type>
|
||||
<docblock line="106">
|
||||
<docblock line="74">
|
||||
<description><![CDATA[Custom exception handlererror_get_last]]></description>
|
||||
<long-description><![CDATA[]]></long-description>
|
||||
<tag line="106" name="param" description="" type="\Exception" variable="$exception">
|
||||
<tag line="74" name="param" description="" type="\Exception" variable="$exception">
|
||||
<type by_reference="false">\Exception</type>
|
||||
</tag>
|
||||
<tag line="106" name="return" description="" type="void">
|
||||
<tag line="74" name="return" description="" type="void">
|
||||
<type by_reference="false">void</type>
|
||||
</tag>
|
||||
</docblock>
|
||||
<argument line="112">
|
||||
<argument line="80">
|
||||
<name>$exception</name>
|
||||
<default><![CDATA[]]></default>
|
||||
<type/>
|
||||
</argument>
|
||||
</function>
|
||||
<function namespace="default" line="135" package="miniMVC">
|
||||
<name>is_like_array</name>
|
||||
<type>function</type>
|
||||
<docblock line="129">
|
||||
<description><![CDATA[Utility function to check if a variable is set, and is an array or object]]></description>
|
||||
<long-description><![CDATA[]]></long-description>
|
||||
<tag line="129" name="param" description="" type="mixed" variable="$var">
|
||||
<type by_reference="false">mixed</type>
|
||||
</tag>
|
||||
<tag line="129" name="return" description="" type="bool">
|
||||
<type by_reference="false">bool</type>
|
||||
</tag>
|
||||
</docblock>
|
||||
<argument line="135">
|
||||
<name>$var</name>
|
||||
<default><![CDATA[]]></default>
|
||||
<type/>
|
||||
</argument>
|
||||
</function>
|
||||
<function namespace="default" line="152" package="miniMVC">
|
||||
<function namespace="default" line="102" package="miniMVC">
|
||||
<name>show_404</name>
|
||||
<type>function</type>
|
||||
<docblock line="147">
|
||||
<docblock line="97">
|
||||
<description><![CDATA[General 404 function]]></description>
|
||||
<long-description><![CDATA[]]></long-description>
|
||||
<tag line="147" name="return" description="" type="void">
|
||||
<tag line="97" name="return" description="" type="void">
|
||||
<type by_reference="false">void</type>
|
||||
</tag>
|
||||
</docblock>
|
||||
</function>
|
||||
<function namespace="default" line="177" package="miniMVC">
|
||||
<function namespace="default" line="127" package="miniMVC">
|
||||
<name>show_error</name>
|
||||
<type>function</type>
|
||||
<docblock line="171">
|
||||
<docblock line="121">
|
||||
<description><![CDATA[Fatal Error page function]]></description>
|
||||
<long-description><![CDATA[]]></long-description>
|
||||
<tag line="171" name="param" description="" type="string" variable="$message">
|
||||
<tag line="121" name="param" description="" type="string" variable="$message">
|
||||
<type by_reference="false">string</type>
|
||||
</tag>
|
||||
<tag line="171" name="param" description="" type="int" variable="$status_code">
|
||||
<tag line="121" name="param" description="" type="int" variable="$status_code">
|
||||
<type by_reference="false">int</type>
|
||||
</tag>
|
||||
</docblock>
|
||||
<argument line="177">
|
||||
<argument line="127">
|
||||
<name>$message</name>
|
||||
<default><![CDATA[]]></default>
|
||||
<type/>
|
||||
</argument>
|
||||
<argument line="177">
|
||||
<argument line="127">
|
||||
<name>$status_code</name>
|
||||
<default><![CDATA[null]]></default>
|
||||
<type/>
|
||||
</argument>
|
||||
</function>
|
||||
<function namespace="default" line="202" package="miniMVC">
|
||||
<function namespace="default" line="154" package="miniMVC">
|
||||
<name>is_like_array</name>
|
||||
<type>function</type>
|
||||
<docblock line="148">
|
||||
<description><![CDATA[Utility function to check if a variable is set, and is an array or object]]></description>
|
||||
<long-description><![CDATA[]]></long-description>
|
||||
<tag line="148" name="param" description="" type="mixed" variable="$var">
|
||||
<type by_reference="false">mixed</type>
|
||||
</tag>
|
||||
<tag line="148" name="return" description="" type="bool">
|
||||
<type by_reference="false">bool</type>
|
||||
</tag>
|
||||
</docblock>
|
||||
<argument line="154">
|
||||
<name>$var</name>
|
||||
<default><![CDATA[]]></default>
|
||||
<type/>
|
||||
</argument>
|
||||
</function>
|
||||
<function namespace="default" line="172" package="miniMVC">
|
||||
<name>controller_methods</name>
|
||||
<type>function</type>
|
||||
<docblock line="196">
|
||||
<docblock line="166">
|
||||
<description><![CDATA[Returns routable methods for the specified controller class]]></description>
|
||||
<long-description><![CDATA[]]></long-description>
|
||||
<tag line="196" name="param" description="" type="string" variable="$controller">
|
||||
<tag line="166" name="param" description="" type="string" variable="$controller">
|
||||
<type by_reference="false">string</type>
|
||||
</tag>
|
||||
<tag line="196" name="return" description="" type="array">
|
||||
<tag line="166" name="return" description="" type="array">
|
||||
<type by_reference="false">array</type>
|
||||
</tag>
|
||||
</docblock>
|
||||
<argument line="202">
|
||||
<argument line="172">
|
||||
<name>$controller</name>
|
||||
<default><![CDATA[]]></default>
|
||||
<type/>
|
||||
</argument>
|
||||
</function>
|
||||
<function namespace="default" line="220" package="miniMVC">
|
||||
<name>route</name>
|
||||
<type>function</type>
|
||||
<docblock line="215">
|
||||
<description><![CDATA[Calls the appropriate module/controller/function based on the url]]></description>
|
||||
<long-description><![CDATA[]]></long-description>
|
||||
<tag line="215" name="return" description="" type="void">
|
||||
<type by_reference="false">void</type>
|
||||
</tag>
|
||||
</docblock>
|
||||
</function>
|
||||
<function namespace="default" line="353" package="miniMVC">
|
||||
<function namespace="default" line="191" package="miniMVC">
|
||||
<name>site_url</name>
|
||||
<type>function</type>
|
||||
<docblock line="347">
|
||||
<docblock line="185">
|
||||
<description><![CDATA[Returns a full url from a url segment]]></description>
|
||||
<long-description><![CDATA[]]></long-description>
|
||||
<tag line="347" name="param" description="" type="string" variable="$segment">
|
||||
<tag line="185" name="param" description="" type="string" variable="$segment">
|
||||
<type by_reference="false">string</type>
|
||||
</tag>
|
||||
<tag line="347" name="return" description="" type="string">
|
||||
<tag line="185" name="return" description="" type="string">
|
||||
<type by_reference="false">string</type>
|
||||
</tag>
|
||||
</docblock>
|
||||
<argument line="353">
|
||||
<argument line="191">
|
||||
<name>$segment</name>
|
||||
<default><![CDATA[]]></default>
|
||||
<type/>
|
||||
</argument>
|
||||
</function>
|
||||
<function namespace="default" line="367" package="miniMVC">
|
||||
<function namespace="default" line="205" package="miniMVC">
|
||||
<name>to_string</name>
|
||||
<type>function</type>
|
||||
<docblock line="360">
|
||||
<docblock line="198">
|
||||
<description><![CDATA[Prints out the contents of the object]]></description>
|
||||
<long-description><![CDATA[]]></long-description>
|
||||
<tag line="360" name="param" description="" type="\object/array" variable="$data">
|
||||
<tag line="198" name="param" description="" type="\object/array" variable="$data">
|
||||
<type by_reference="false">\object/array</type>
|
||||
</tag>
|
||||
<tag line="360" name="param" description="" type="string" variable="$method">
|
||||
<tag line="198" name="param" description="" type="string" variable="$method">
|
||||
<type by_reference="false">string</type>
|
||||
</tag>
|
||||
<tag line="360" name="return" description="" type="string">
|
||||
<tag line="198" name="return" description="" type="string">
|
||||
<type by_reference="false">string</type>
|
||||
</tag>
|
||||
</docblock>
|
||||
<argument line="367">
|
||||
<argument line="205">
|
||||
<name>$data</name>
|
||||
<default><![CDATA[]]></default>
|
||||
<type/>
|
||||
</argument>
|
||||
<argument line="367">
|
||||
<argument line="205">
|
||||
<name>$method</name>
|
||||
<default><![CDATA['print_r']]></default>
|
||||
<type/>
|
||||
</argument>
|
||||
</function>
|
||||
<function namespace="default" line="401" package="miniMVC">
|
||||
<function namespace="default" line="239" package="miniMVC">
|
||||
<name>do_include</name>
|
||||
<type>function</type>
|
||||
<docblock line="395">
|
||||
<docblock line="233">
|
||||
<description><![CDATA[Array_map callback to load a folder of classes at once]]></description>
|
||||
<long-description><![CDATA[]]></long-description>
|
||||
<tag line="395" name="param" description="" type="string" variable="$path">
|
||||
<tag line="233" name="param" description="" type="string" variable="$path">
|
||||
<type by_reference="false">string</type>
|
||||
</tag>
|
||||
<tag line="395" name="return" description="" type="void">
|
||||
<tag line="233" name="return" description="" type="void">
|
||||
<type by_reference="false">void</type>
|
||||
</tag>
|
||||
</docblock>
|
||||
<argument line="401">
|
||||
<argument line="239">
|
||||
<name>$path</name>
|
||||
<default><![CDATA[]]></default>
|
||||
<type/>
|
||||
</argument>
|
||||
</function>
|
||||
<function namespace="default" line="413" package="miniMVC">
|
||||
<function namespace="default" line="253" package="miniMVC">
|
||||
<name>init</name>
|
||||
<type>function</type>
|
||||
<docblock line="408">
|
||||
<docblock line="248">
|
||||
<description><![CDATA[Load required classes for bootstraping]]></description>
|
||||
<long-description><![CDATA[]]></long-description>
|
||||
<tag line="408" name="return" description="" type="void">
|
||||
<tag line="248" name="return" description="" type="void">
|
||||
<type by_reference="false">void</type>
|
||||
</tag>
|
||||
</docblock>
|
||||
</function>
|
||||
<function namespace="default" line="283" package="miniMVC">
|
||||
<name>route</name>
|
||||
<type>function</type>
|
||||
<docblock line="278">
|
||||
<description><![CDATA[Calls the appropriate module/controller/function based on the url]]></description>
|
||||
<long-description><![CDATA[]]></long-description>
|
||||
<tag line="278" name="return" description="" type="void">
|
||||
<type by_reference="false">void</type>
|
||||
</tag>
|
||||
</docblock>
|
||||
</function>
|
||||
</file>
|
||||
<file path="index.php" hash="7cd9f43d62c56f7e06a84f9841567d59" package="miniMVC">
|
||||
<file path="index.php" hash="c9ccc99b190c39d963cff565d272a99c" package="miniMVC">
|
||||
<docblock line="2">
|
||||
<description><![CDATA[MiniMVC]]></description>
|
||||
<long-description><![CDATA[<p>Convention-based micro-framework for PHP</p>]]></long-description>
|
||||
@ -1737,10 +1702,10 @@ display them cleanly]]></description>
|
||||
<tag line="2" name="link" description="https://github.com/timw4mail/miniMVC" link="https://github.com/timw4mail/miniMVC"/>
|
||||
<tag line="2" name="license" description="http://philsturgeon.co.uk/code/dbad-license"/>
|
||||
</docblock>
|
||||
<include line="52" type="Require" package="Default">
|
||||
<include line="46" type="Require" package="Default">
|
||||
<name>config/config.php</name>
|
||||
</include>
|
||||
<include line="55" type="Require" package="Default">
|
||||
<include line="49" type="Require" package="Default">
|
||||
<name>common.php</name>
|
||||
</include>
|
||||
<constant namespace="default" line="28" package="miniMVC\App">
|
||||
|
278
sys/common.php
278
sys/common.php
@ -21,6 +21,8 @@
|
||||
*/
|
||||
|
||||
// --------------------------------------------------------------------------
|
||||
// ! Error handling / messages
|
||||
// --------------------------------------------------------------------------
|
||||
|
||||
/**
|
||||
* Function to run on script shutdown
|
||||
@ -42,49 +44,15 @@ function shutdown()
|
||||
{
|
||||
$file = str_replace(MM_BASE_PATH, "", $error['file']);
|
||||
|
||||
$err_msg = <<<TXT
|
||||
<h2>Fatal Error: </h2>
|
||||
{$error['message']}<br /><br />
|
||||
<strong>File:</strong> {$file}<br /><br />
|
||||
<strong>Line:</strong> {$error['line']}
|
||||
TXT;
|
||||
$err_msg = "<h2>Fatal Error: </h2>
|
||||
{$error['message']}<br /><br />
|
||||
<strong>File:</strong> {$file}<br /><br />
|
||||
<strong>Line:</strong> {$error['line']}";
|
||||
|
||||
show_error($err_msg);
|
||||
}
|
||||
}
|
||||
|
||||
// --------------------------------------------------------------------------
|
||||
|
||||
/**
|
||||
* Function to search through the tree to find the necessary file
|
||||
*
|
||||
* @param string $file
|
||||
* @param string $curr_path
|
||||
* @return void
|
||||
*/
|
||||
function load_file($file, $curr_path="")
|
||||
{
|
||||
$path = "";
|
||||
|
||||
if ($curr_path === "app")
|
||||
{
|
||||
$path = MM_APP_PATH."{$file}.php";
|
||||
}
|
||||
else if ($curr_path === "sys")
|
||||
{
|
||||
$path = MM_SYS_PATH."{$file}.php";
|
||||
}
|
||||
else
|
||||
{
|
||||
$path = MM_MOD_PATH."{$curr_path}/{$file}.php";
|
||||
}
|
||||
|
||||
if (is_file($path))
|
||||
{
|
||||
require_once($path);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// --------------------------------------------------------------------------
|
||||
|
||||
/**
|
||||
@ -117,7 +85,7 @@ function on_exception($exception)
|
||||
// Contain the content for buffering
|
||||
ob_start();
|
||||
|
||||
include(MM_APP_PATH.'/views/errors/error_php_exception.php');
|
||||
include(MM_APP_PATH . '/views/errors/error_php_exception.php');
|
||||
|
||||
$buffer = ob_get_contents();
|
||||
ob_end_clean();
|
||||
@ -126,24 +94,6 @@ function on_exception($exception)
|
||||
|
||||
// --------------------------------------------------------------------------
|
||||
|
||||
/**
|
||||
* Utility function to check if a variable is set, and is an array or object
|
||||
*
|
||||
* @param mixed $var
|
||||
* @return bool
|
||||
*/
|
||||
function is_like_array(&$var)
|
||||
{
|
||||
if ( ! isset($var))
|
||||
{
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
return (is_array($var) OR is_object($var)) && ( ! empty($var));
|
||||
}
|
||||
|
||||
// --------------------------------------------------------------------------
|
||||
|
||||
/**
|
||||
* General 404 function
|
||||
*
|
||||
@ -159,7 +109,7 @@ function show_404()
|
||||
// This is passed to the error template
|
||||
$message = '404 Not Found';
|
||||
|
||||
include(MM_APP_PATH.'/views/errors/error_404.php');
|
||||
include(MM_APP_PATH . '/views/errors/error_404.php');
|
||||
|
||||
$buffer = ob_get_contents();
|
||||
ob_end_clean();
|
||||
@ -184,13 +134,33 @@ function show_error($message, $status_code=null)
|
||||
// Contain the content for buffering
|
||||
ob_start();
|
||||
|
||||
include(MM_APP_PATH.'/views/errors/error_general.php');
|
||||
include(MM_APP_PATH . '/views/errors/error_general.php');
|
||||
|
||||
$buffer = ob_get_contents();
|
||||
ob_end_clean();
|
||||
die($buffer);
|
||||
}
|
||||
|
||||
// --------------------------------------------------------------------------
|
||||
// ! Utility Functions
|
||||
// --------------------------------------------------------------------------
|
||||
|
||||
/**
|
||||
* Utility function to check if a variable is set, and is an array or object
|
||||
*
|
||||
* @param mixed $var
|
||||
* @return bool
|
||||
*/
|
||||
function is_like_array(&$var)
|
||||
{
|
||||
if ( ! isset($var))
|
||||
{
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
return (is_array($var) OR is_object($var)) && ( ! empty($var));
|
||||
}
|
||||
|
||||
// --------------------------------------------------------------------------
|
||||
|
||||
/**
|
||||
@ -212,6 +182,99 @@ function controller_methods($controller)
|
||||
|
||||
// --------------------------------------------------------------------------
|
||||
|
||||
/**
|
||||
* Returns a full url from a url segment
|
||||
*
|
||||
* @param string $segment
|
||||
* @return string
|
||||
*/
|
||||
function site_url($segment)
|
||||
{
|
||||
return $url = BASEURL . URL_INDEX_FILE . $segment;
|
||||
}
|
||||
|
||||
// --------------------------------------------------------------------------
|
||||
|
||||
/**
|
||||
* Prints out the contents of the object
|
||||
*
|
||||
* @param object/array $data
|
||||
* @param string $method
|
||||
* @return string
|
||||
*/
|
||||
function to_string($data, $method='print_r')
|
||||
{
|
||||
$output = '<pre>';
|
||||
|
||||
if ($method == "var_dump")
|
||||
{
|
||||
ob_start();
|
||||
var_dump($data);
|
||||
$output .= ob_get_contents();
|
||||
ob_end_clean();
|
||||
}
|
||||
else if ($method == "var_export")
|
||||
{
|
||||
ob_start();
|
||||
var_export($data);
|
||||
$output .= ob_get_contents();
|
||||
ob_end_clean();
|
||||
}
|
||||
else
|
||||
{
|
||||
$output .= print_r($data, TRUE);
|
||||
}
|
||||
|
||||
return $output . '</pre>';
|
||||
}
|
||||
|
||||
// --------------------------------------------------------------------------
|
||||
|
||||
/**
|
||||
* Array_map callback to load a folder of classes at once
|
||||
*
|
||||
* @param string $path
|
||||
* @return void
|
||||
*/
|
||||
function do_include($path)
|
||||
{
|
||||
require_once($path);
|
||||
}
|
||||
|
||||
// --------------------------------------------------------------------------
|
||||
// ! Bootstrap functions
|
||||
// --------------------------------------------------------------------------
|
||||
|
||||
/**
|
||||
* Load required classes for bootstraping
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
function init()
|
||||
{
|
||||
// Catch fatal errors, don't show them
|
||||
error_reporting((-1) & ~(E_ERROR | E_PARSE));
|
||||
register_shutdown_function('shutdown');
|
||||
|
||||
//Set error handlers
|
||||
set_error_handler('on_error');
|
||||
set_exception_handler('on_exception');
|
||||
|
||||
// Load Database classes
|
||||
require_once(MM_SYS_PATH . 'db/autoload.php');
|
||||
|
||||
// Load system libraries
|
||||
require_once(MM_SYS_PATH . 'core/traits.php');
|
||||
require_once(MM_SYS_PATH . 'core/MM.php');
|
||||
require_once(MM_SYS_PATH . 'core/miniMVC.php');
|
||||
array_map('do_include', glob(MM_SYS_PATH . 'core/*.php'));
|
||||
|
||||
// Map to the appropriate module/controller/function
|
||||
route();
|
||||
}
|
||||
|
||||
// --------------------------------------------------------------------------
|
||||
|
||||
/**
|
||||
* Calls the appropriate module/controller/function based on the url
|
||||
*
|
||||
@ -234,7 +297,7 @@ function route()
|
||||
}
|
||||
|
||||
// Load the routes config file
|
||||
$routes = require_once(MM_APP_PATH.'config/routes.php');
|
||||
$routes = require_once(MM_APP_PATH . 'config/routes.php');
|
||||
|
||||
// Set the default route
|
||||
$module = $routes['default_module'];
|
||||
@ -315,7 +378,7 @@ function route()
|
||||
}
|
||||
}
|
||||
|
||||
$path = MM_MOD_PATH."{$module}/controllers/{$controller}.php";
|
||||
$path = MM_MOD_PATH . "{$module}/controllers/{$controller}.php";
|
||||
|
||||
if (is_file($path))
|
||||
{
|
||||
@ -342,95 +405,4 @@ function route()
|
||||
show_404();
|
||||
}
|
||||
|
||||
// --------------------------------------------------------------------------
|
||||
|
||||
/**
|
||||
* Returns a full url from a url segment
|
||||
*
|
||||
* @param string $segment
|
||||
* @return string
|
||||
*/
|
||||
function site_url($segment)
|
||||
{
|
||||
return $url = BASEURL . URL_INDEX_FILE . $segment;
|
||||
}
|
||||
|
||||
// --------------------------------------------------------------------------
|
||||
|
||||
/**
|
||||
* Prints out the contents of the object
|
||||
*
|
||||
* @param object/array $data
|
||||
* @param string $method
|
||||
* @return string
|
||||
*/
|
||||
function to_string($data, $method='print_r')
|
||||
{
|
||||
$output = '<pre>';
|
||||
|
||||
if ($method == "var_dump")
|
||||
{
|
||||
ob_start();
|
||||
var_dump($data);
|
||||
$output .= ob_get_contents();
|
||||
ob_end_clean();
|
||||
}
|
||||
else if ($method == "var_export")
|
||||
{
|
||||
ob_start();
|
||||
var_export($data);
|
||||
$output .= ob_get_contents();
|
||||
ob_end_clean();
|
||||
}
|
||||
else
|
||||
{
|
||||
$output .= print_r($data, TRUE);
|
||||
}
|
||||
|
||||
return $output . '</pre>';
|
||||
}
|
||||
|
||||
// --------------------------------------------------------------------------
|
||||
|
||||
/**
|
||||
* Array_map callback to load a folder of classes at once
|
||||
*
|
||||
* @param string $path
|
||||
* @return void
|
||||
*/
|
||||
function do_include($path)
|
||||
{
|
||||
require_once($path);
|
||||
}
|
||||
|
||||
// --------------------------------------------------------------------------
|
||||
|
||||
/**
|
||||
* Load required classes for bootstraping
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
function init()
|
||||
{
|
||||
// Catch fatal errors, don't show them
|
||||
error_reporting((-1) & ~(E_ERROR | E_PARSE));
|
||||
register_shutdown_function('shutdown');
|
||||
|
||||
//Set error handlers
|
||||
set_error_handler('on_error');
|
||||
set_exception_handler('on_exception');
|
||||
|
||||
// Load Database classes
|
||||
require_once(MM_SYS_PATH.'db/autoload.php');
|
||||
|
||||
// Load system libraries
|
||||
require_once(MM_SYS_PATH.'core/traits.php');
|
||||
require_once(MM_SYS_PATH.'core/MM.php');
|
||||
require_once(MM_SYS_PATH.'core/miniMVC.php');
|
||||
array_map('do_include', glob(MM_SYS_PATH.'core/*.php'));
|
||||
|
||||
// Map to the appropriate module/controller/function
|
||||
route();
|
||||
}
|
||||
|
||||
// End of common.php
|
Loading…
Reference in New Issue
Block a user