markei / silexwebsiteframework
Quickstart building sites with Silex, Twig, Symfony Forms, Imagine and Swiftmailer
Installs: 52
Dependents: 1
Suggesters: 0
Security: 0
Stars: 0
Watchers: 2
Forks: 0
Open Issues: 0
Language:HTML
Requires
- imagine/imagine: ^0.6.3
- silex/silex: ~2.0
- swiftmailer/swiftmailer: ~5.3
- symfony/config: ^3.2
- symfony/form: ^3.2
- symfony/security-csrf: ^3.2
- symfony/translation: ^3.2
- symfony/twig-bridge: ^3.2
- symfony/validator: ^3.2
- twig/twig: ~2.0
README
The Markei.nl SilexWebsiteFramework configures all the standard vendors you need to build a site with Silex: Twig, Symfony Forms, Imagine and Swiftmailer
Quick start
Create your own Application.php and start registering your routes.
<?php
namespace Acme\AcmeWebsite;
use Markei\SilexWebsiteFramework\Application as BaseApplication;
use Symfony\Component\HttpFoundation\Request;
class Application extends BaseApplication
{
protected function getRequiredConfigurationFields()
{
return array_merge(parent::getRequiredConfigurationFields(), []);
}
protected function registerRoutes()
{
$this->get('/first-page', function (Application $app, Request $request) { return $app['controllers.page']->showPageAction($request, 'first-page'); });
$this->get('/second-page', function (Application $app, Request $request) { return $app['controllers.page']->showPageAction($request, 'second-page'); });
parent::registerRoutes();
}
protected function registerControllers()
{
parent::registerControllers();
}
}