-
Notifications
You must be signed in to change notification settings - Fork 19
Configuration
Scaffold’s configuration is stored within parse.php. Without any configuration options, Scaffold will use its default configuration values (which are used as examples below). This means that you don’t actually need to set any configuration options at all.
$system = './';
The path to the Scaffold system folder. You’ll only need to change this if you move the parse.php file.
$config['production'] = true;
Scaffold caches the CSS is parses heavily, and it also sets the browser cache so that the user will only need to download the file once. This make development tricky, as you’re constantly changing the CSS and imported files (which might not trigger the cache to be refreshed). By setting it to false, the CSS will always be reparsed.
It’s not entirely necessary to set this to false while developing, as changes to the requested CSS file will be picked up, and recached and delivered as needed, but there may be some instances where you need the CSS recached every single time.
$config['max_age'] = false;
This sets how long a cached file stays valid for (in seconds). This doesn’t affect the headers returned to the browser. After this amount of time, Scaffold will delete the cache file and re-parse it.
Setting this to false means Scaffold will only recache the file when the original file changes, which is usually what you want.
$config['load_paths'] = array();
Scaffold can take extra paths for loading files. This will add extra paths to the $scaffold→loader object.
$config['output_compression'] = false;
Compresses the output using gzip encoding. Usually, you’ll just use the .htaccess to let the server handle this for you. However, if for some reason you can’t do this, Scaffold can handle it for you. You really shouldn’t need to enable this in most situations.
It takes a value of 1-9, or false to disable it.
$config['set_etag'] = true;
ETags are good for ensuring content is only re-downloaded when it needs to be, but when a file is delivered from many servers, like in a cluster server setup, it can actually cause files to be downloaded more than usual.
$config['enable_string'] = false;
Enables the use of strings as a CSS source
http://mysite.com/scaffold/parse.php?string=your_CSS_string_here
$config['enable_url'] = false;
Enables the use of URLs as a CSS source
http://mysite.com/scaffold/parse.php?url=http://someothersite.com/stylesheet.css
$config['extensions'] = array('MyExtension','MyOtherExtension');
This lets you enable extensions. Adding them to this list will automatically load the extension.
$config['MyExtension']['some_option'] = false;
To change options for extensions, just add a key with the extensions name, and then the option name. Refer to the documentation for the individual extension to see what options are available.