a tiny mvc framework for php using php-activerecord
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

add support for loading post-activerecord code in config/application.php

+15 -2
+4
lib/halfmoon.php
··· 76 76 if (defined("PHP_ACTIVERECORD_ROOT")) 77 77 HalfMoon\Config::initialize_activerecord(); 78 78 79 + /* bring in any post-framework but pre-route code */ 80 + if (file_exists($f = HALFMOON_ROOT . "/config/application.php")) 81 + require_once($f); 82 + 79 83 /* bring in the route table and route our request */ 80 84 if (file_exists(HALFMOON_ROOT . "/config/routes.php")) 81 85 HalfMoon\Router::initialize(function($router) {
+6
skel/config/application.php
··· 1 + <?php 2 + /* 3 + post-framework initialization code, after everything is fully loaded 4 + but just before the requests is routed 5 + */ 6 + ?>
+5 -2
skel/config/boot.php
··· 1 1 <?php 2 2 /* 3 - site-wide settings, loaded after framework 3 + early initialization of site-wide settings, loaded after halfmoon framework 4 + but before activerecord is initialized. 4 5 5 - should do per-environment setup like logging, tweaking php settings, etc. 6 + per-environment setup like logging, tweaking php settings, etc. can be done 7 + here. any code requiring activerecord or needing to be done after 8 + everything is initialized should be done in config/application.php. 6 9 */ 7 10 8 11 /* session settings, change according to your application requirements */