Download the PHP package fm_ph/quark without Composer
On this page you can find all versions of the php package fm_ph/quark. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Package quark
Short Description Quark server
License MIT
Homepage https://github.com/fm-ph/quark-server
Informations about the package quark
Server part of quark
framework handling mainly the routing and templating.
Features
- Routing : Methods, regex parameters, redirect, locale.
- Templating : Twig (layouts, cache, customs extensions, filters, globals...).
- Locale : IP address detection (Geocoder with providers chain), fallback to prefered browser locale.
- User agent : Browser, engine, operating system, device, bot and old browser detection.
- Manifest : Assets hash, environment.
- Configuration : Supports PHP, INI, XML, JSON, and YAML file formats.
- Others : Error handler, function helpers.
Installation
Get Composer and run :
Note : You need at least PHP 7.x (CLI) installed on your machine to use this package (verify it with php -v
).
For OS X users, you can easily update it on https://php-osx.liip.ch/.
Usage
Basic
Get an Application
singleton instance and render matched route template.
Custom configuration
Init Application
with custom configuration.
Configuration
All configuration properties that can be passed to init()
method on an Application
instance.
Old browser
Property | Type | Description | Default |
---|---|---|---|
old_browser | array |
List of old browsers. | See Config.php |
Locale
Property | Type | Description | Default |
---|---|---|---|
locale.code | string |
Locale code fallback. | en |
locale.country | string |
Locale country fallback. | |
locale.redirectIfOne | boolean |
Router redirect to include locale in URL if only one is found. | false |
Paths
Property | Type | Description | Default |
---|---|---|---|
paths.locales | string |
Path to locale files. locale variable is replaced with the current locale. |
locales/{{locale}}.yml |
paths.routes | string |
Route file path. | routes.yml |
paths.manifest | string |
Manifest file path. | manifest.json |
Twig
Property | Type | Description | Default |
---|---|---|---|
twig.layouts | array |
Twig layouts name. | See below |
twig.layouts.default | string |
Twig default layout name to be rendered. | default |
twig.layouts.old_browser | string |
Twig old browser layout name. | old |
twig.extension | string |
Twig template file extension. | .twig |
twig.cache | string |
Twig cache path. | cache |
twig.extraData | any |
Twig extra data merged with template data. | [] |
twig.paths.views | string |
Views folder path. | views |
twig.paths.layouts | string |
Layouts folder path. | views/layouts |
twig.paths.pages | string |
Pages folder path. | views/pages |
twig.paths.components | string |
Components folder path. | views/components |
twig.extensions | array |
Twig extensions (manifest and html compress extensions are activated by default). | [] |
twig.filters | array |
Twig filters. | [] |
twig.globals | array |
Twig globals. | [] |
twig.functions | array |
Twig functions | [] |
twig.tests | array |
Twig tests. | [] |
API
See https://fm-ph.github.io/quark-server/
Testing
Install PHPUnit globally :
And run the tests with :
License
MIT Fabien Motte
All versions of quark with dependencies
fig/http-message-util Version ^1.1
filp/whoops Version ^2.1
geocoder-php/chain-provider Version ^4.0
geocoder-php/free-geoip-provider Version ^4.0
geocoder-php/geo-plugin-provider Version ^4.0
geocoder-php/host-ip-provider Version ^4.0
gpolguere/path-to-regexp-php Version dev-master
hassankhan/config Version ^0.10.0
nochso/html-compress-twig Version ^2.0
php-http/guzzle6-adapter Version ^1.1
php-http/message Version ^1.5
symfony/yaml Version ^3.2
twig/twig Version ^2.4
whichbrowser/parser Version ^2.0
willdurand/geocoder Version 4.1.0