Download the PHP package projek-xyz/slim-plates without Composer
On this page you can find all versions of the php package projek-xyz/slim-plates. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download projek-xyz/slim-plates
More information about projek-xyz/slim-plates
Files in projek-xyz/slim-plates
Package slim-plates
Short Description Slim Framework 3 view helper built on top of the Plates templating component
License MIT
Homepage http://www.projek.xyz/slim-plates
Informations about the package slim-plates
Plates Template Integration for Slim micro framework 3
Render your Slim 3 application views using Plates template engine.
Install
Via Composer
Requires Slim micro framework 3 and PHP 5.5.0 or newer.
Usage
NOTE:
- If you are using option 1 please make sure you already have
$container['settings']['view']
in your configuration file. Plates::setResponse()
is required to usePlates::render()
otherwise\LogicException
will thrown.
Custom functions
This component exposes some Slim functions to your Plates templates.
pathFor()
You can use this function to generate complete URLs to any Slim application named route. Example:
baseUrl($permalink = '')
Retrieve the base url of your Slim application. Example:
Or you can pass a permalink
basePath()
Retrieve the base url of your Slim application. Example:
uriFull()
Retrieve full request URI.
uriScheme()
Retrieve the scheme component of the URI.
uriHost()
Retrieve the host component of the URI
uriPort()
Retrieve the port component of the URI.
uriPath()
Retrieve the path component of the URI.
uriQuery()
Retrieve the query string component of the URI.
uriFragment()
Retrieve the fragment component of the URI.
Contributing
Please see CONDUCT for details.
License
This library is open-sourced software licensed under MIT license.