UserCandy Documentation - Assets Helper
Assets Helper contains 3 functions that help to load css, js, and image files within the Framework.
css function loads css files based on their url. Single css file example:
Code
use Helpers\{Assets,Url};

<?=Assets::css([
Url::templatePath().'css/style.css'
])?>
Multiple css files example:
Code
use Helpers\{Assets,Url};

<?=Assets::css([
Url::templatePath().'css/style.css',
Url::templatePath().'css/style2.css',
])?>

js function loads js files based on their url. Single js file example:
Code
use Helpers\{Assets,Url};

<?=Assets::js([
Url::templatePath().'js/script.js'
])?>
Multiple js files example:
Code
use Helpers\{Assets,Url};

<?=Assets::js([
Url::templatePath().'js/script.js',
Url::templatePath().'js/script2.js'
])?>

loadFile function loads any of the following file types from the themes, assets, or templates folders in the framework. This function is called within the core of the framework to load files, and there is no need to include elsewhere within the framework. When a file is requested by a browser, the script checks to see if the file exist and is allowed file type. Once the file is good to go, the script then reads the file and writes it to the output buffer. Visit the php.net readfile documentation for more information.