Skip to content
This repository has been archived by the owner on Sep 13, 2018. It is now read-only.

Commit

Permalink
Added HTML helper in boot and provided path to css,js,img files
Browse files Browse the repository at this point in the history
  • Loading branch information
pksunkara committed May 14, 2010
1 parent 835346b commit 01d08ab
Show file tree
Hide file tree
Showing 3 changed files with 31 additions and 16 deletions.
23 changes: 16 additions & 7 deletions index.php
Expand Up @@ -42,13 +42,22 @@
}

/**
* Include boot.php which loads all the files
* No need to go to dispatch if it is css or js or img
*/
require_once CORE.'boot.php';

/**
* Include index.php which does the main dispatching and outputing
*/
require_once WWW.'index.php';
$url = explode("/",URL);
array_shift($url);
if($url[0] == "css" || $url[0] == "js" || $url[0] == "img")
require_once WWW.implode("/",$url);
else {
/**
* Include boot.php which loads all the files
*/
require_once CORE.'boot.php';

/**
* Include index.php which does the main dispatching and outputing
*/
require_once WWW.'index.php';
}

?>
22 changes: 14 additions & 8 deletions sun/boot.php
Expand Up @@ -39,7 +39,7 @@

/**
* Basic class for using cookie variables
* Usage: "Cookie::"
* Usage: "$Cookie->"
*/
if(Configure::read('lib.cookie')) {
require_once CORE.'cookie.php';
Expand Down Expand Up @@ -79,7 +79,7 @@

/**
* Basic class for sending emails in PHP
* Usage: "Email::"
* Usage: "$Email->"
*/
if(Configure::read('lib.email')) {
require_once CORE.'email.php';
Expand All @@ -93,6 +93,12 @@
require_once CORE.'file.php';
}

/**
* Basic class for HTML helper
* Usage: "$HTML->"
*/
require_once CORE.'html.php';

/**
* Basic class for maintaining naming conventions
* Usage: "Inflector::"
Expand All @@ -109,7 +115,7 @@

/**
* Basic class for Localisation of languages
* Usage: "l10n::"
* Usage: "$l10n->"
*/
require_once CORE.'l10n.php';

Expand All @@ -131,7 +137,7 @@

/**
* Basic class for using RSS feed
* Usage: "RSS::"
* Usage: "$RSS->"
*/
if(Configure::read('lib.rss')) {
require_once CORE.'rss.php';
Expand All @@ -145,19 +151,19 @@

/**
* Basic class for sanitizing strings and conversion
* Usage: "Sanitize::"
* Usage: "$Sanitize->"
*/
require_once CORE.'sanitize.php';

/**
* Basic class for security hashing and others
* Usage: "Security::"
* Usage: "$Security->"
*/
require_once CORE.'security.php';

/**
* Basic class for using session variables
* Usage: "Session::"
* Usage: "$Session->"
*/
if(Configure::read('lib.session')) {
require_once CORE.'session.php';
Expand All @@ -183,7 +189,7 @@

/**
* Basic class for various validation techniques
* Usage: "Validation::"
* Usage: "$Validation->"
*/
require_once CORE.'validation.php';

Expand Down
2 changes: 1 addition & 1 deletion sun/view.php
Expand Up @@ -33,7 +33,7 @@ function __construct() {
*/
function render($file,$data) {
extract($data, EXTR_SKIP);
extract($help, EXTR_SKIP);
extract(self::$help, EXTR_SKIP);
ob_start();

if (file_exists($file))
Expand Down

0 comments on commit 01d08ab

Please sign in to comment.