class bbn\Shop documentation in
Shopping system main class.
Generates in a cache directory a javascript or CSS file based on the request received.
The cdn class will be using all the classes in bbn\Cdn in order to
treat a request URL, and return the appropriate content.
- First it will parse the URL and make a first configuration array out of it,
from which a hash will be calculated
- Then it will serve a cache file if it exists and create one otherwise by:
- Making a full configuration array using libraries database with all the needed file(s)
- Then it will compile these files into a single file that will be put in cache
- This file should be of type js or css
- If files are both types the content returned will be JS which will call the css files
Request can have the following forms:
Example
$cdn = new \bbn\Cdn($_SERVER['REQUEST_URI']);
$cdn->process();
if ( $cdn->check() ){
$cdn->output();
}
Shopping system main class. BBN is a suite of PHP and JS libraries and VueJS components - all open-source! bbn.io, build applications, the quick way