This repository was archived by the owner on Aug 16, 2021. It is now read-only.
Releases: aeberdinelli/express-php
Releases · aeberdinelli/express-php
Less support
Now you can use Less instead of CSS if you want. An example:
use \Express\ExpressLess;
/**
* Let's say you have a /less folder on your project
* And you want every request that goes into /css to load the less file within that folder instead
*
* In this example /css/global.css will load the compiled version of /less/global.less
* Same for /css/something.css -> /less/something.less
*/
$less = new ExpressLess($express, array(
'source' => __DIR__.'/less',
'dest' => '/css'
));
// Yes, it's that simple.Cookies and QueryString support
New helpers for cookies:
$res->cookie($name, $value, $settings)- sets a cookie$res->clearCookie($name)- removes a cookie$req->cookies- gets the cookies
Querystring now supported:
$req->query- contains the querystring params
New helpers for redirections:
$res->location($url)- redirects using Location header$res->redirect($url)- redirects using 302 http code$res->redirect($url, true)- redirects using 301 (http permanent redirect code)
Also:
- Added
$res->download($path, $name)- forces the download of a file - Added
$express->getInfo()- retrieves all the info from the current request - App locals now supported in object
$express->locals
Added Mustache support
Merge pull request #3 from aeberdinelli/mustache-support Mustache support
v1.0.1
Update README and clear repo
Composer ready
v1.0 Fix code in README.md