Skip to content

Commit 652aeda

Browse files
committed
Initial commit
0 parents  commit 652aeda

29 files changed

+2923
-0
lines changed

.gitignore

+9
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
/web/bundles/
2+
/app/bootstrap.php.cache
3+
/app/cache/*
4+
/app/config/parameters.yml
5+
/app/logs/*
6+
/build/
7+
/vendor/
8+
/bin/
9+
/composer.phar

LICENSE

+19
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
Copyright (c) 2004-2013 Fabien Potencier
2+
3+
Permission is hereby granted, free of charge, to any person obtaining a copy
4+
of this software and associated documentation files (the "Software"), to deal
5+
in the Software without restriction, including without limitation the rights
6+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
7+
copies of the Software, and to permit persons to whom the Software is furnished
8+
to do so, subject to the following conditions:
9+
10+
The above copyright notice and this permission notice shall be included in all
11+
copies or substantial portions of the Software.
12+
13+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
14+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
15+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
16+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
17+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
18+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
19+
THE SOFTWARE.

README.md

+171
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,171 @@
1+
Symfony Standard Edition
2+
========================
3+
4+
Welcome to the Symfony Standard Edition - a fully-functional Symfony2
5+
application that you can use as the skeleton for your new applications.
6+
7+
This document contains information on how to download, install, and start
8+
using Symfony. For a more detailed explanation, see the [Installation][1]
9+
chapter of the Symfony Documentation.
10+
11+
1) Installing the Standard Edition
12+
----------------------------------
13+
14+
When it comes to installing the Symfony Standard Edition, you have the
15+
following options.
16+
17+
### Use Composer (*recommended*)
18+
19+
As Symfony uses [Composer][2] to manage its dependencies, the recommended way
20+
to create a new project is to use it.
21+
22+
If you don't have Composer yet, download it following the instructions on
23+
http://getcomposer.org/ or just run the following command:
24+
25+
curl -s http://getcomposer.org/installer | php
26+
27+
Then, use the `create-project` command to generate a new Symfony application:
28+
29+
php composer.phar create-project symfony/framework-standard-edition path/to/install
30+
31+
Composer will install Symfony and all its dependencies under the
32+
`path/to/install` directory.
33+
34+
### Download an Archive File
35+
36+
To quickly test Symfony, you can also download an [archive][3] of the Standard
37+
Edition and unpack it somewhere under your web server root directory.
38+
39+
If you downloaded an archive "without vendors", you also need to install all
40+
the necessary dependencies. Download composer (see above) and run the
41+
following command:
42+
43+
php composer.phar install
44+
45+
2) Checking your System Configuration
46+
-------------------------------------
47+
48+
Before starting coding, make sure that your local system is properly
49+
configured for Symfony.
50+
51+
Execute the `check.php` script from the command line:
52+
53+
php app/check.php
54+
55+
The script returns a status code of `0` if all mandatory requirements are met,
56+
`1` otherwise.
57+
58+
Access the `config.php` script from a browser:
59+
60+
http://localhost/path/to/symfony/app/web/config.php
61+
62+
If you get any warnings or recommendations, fix them before moving on.
63+
64+
3) Browsing the Demo Application
65+
--------------------------------
66+
67+
Congratulations! You're now ready to use Symfony.
68+
69+
From the `config.php` page, click the "Bypass configuration and go to the
70+
Welcome page" link to load up your first Symfony page.
71+
72+
You can also use a web-based configurator by clicking on the "Configure your
73+
Symfony Application online" link of the `config.php` page.
74+
75+
To see a real-live Symfony page in action, access the following page:
76+
77+
web/app_dev.php/demo/hello/Fabien
78+
79+
4) Getting started with Symfony
80+
-------------------------------
81+
82+
This distribution is meant to be the starting point for your Symfony
83+
applications, but it also contains some sample code that you can learn from
84+
and play with.
85+
86+
A great way to start learning Symfony is via the [Quick Tour][4], which will
87+
take you through all the basic features of Symfony2.
88+
89+
Once you're feeling good, you can move onto reading the official
90+
[Symfony2 book][5].
91+
92+
A default bundle, `AcmeDemoBundle`, shows you Symfony2 in action. After
93+
playing with it, you can remove it by following these steps:
94+
95+
* delete the `src/Acme` directory;
96+
97+
* remove the routing entry referencing AcmeDemoBundle in `app/config/routing_dev.yml`;
98+
99+
* remove the AcmeDemoBundle from the registered bundles in `app/AppKernel.php`;
100+
101+
* remove the `web/bundles/acmedemo` directory;
102+
103+
* remove the `security.providers`, `security.firewalls.login` and
104+
`security.firewalls.secured_area` entries in the `security.yml` file or
105+
tweak the security configuration to fit your needs.
106+
107+
What's inside?
108+
---------------
109+
110+
The Symfony Standard Edition is configured with the following defaults:
111+
112+
* Twig is the only configured template engine;
113+
114+
* Doctrine ORM/DBAL is configured;
115+
116+
* Swiftmailer is configured;
117+
118+
* Annotations for everything are enabled.
119+
120+
It comes pre-configured with the following bundles:
121+
122+
* **FrameworkBundle** - The core Symfony framework bundle
123+
124+
* [**SensioFrameworkExtraBundle**][6] - Adds several enhancements, including
125+
template and routing annotation capability
126+
127+
* [**DoctrineBundle**][7] - Adds support for the Doctrine ORM
128+
129+
* [**TwigBundle**][8] - Adds support for the Twig templating engine
130+
131+
* [**SecurityBundle**][9] - Adds security by integrating Symfony's security
132+
component
133+
134+
* [**SwiftmailerBundle**][10] - Adds support for Swiftmailer, a library for
135+
sending emails
136+
137+
* [**MonologBundle**][11] - Adds support for Monolog, a logging library
138+
139+
* [**AsseticBundle**][12] - Adds support for Assetic, an asset processing
140+
library
141+
142+
* **WebProfilerBundle** (in dev/test env) - Adds profiling functionality and
143+
the web debug toolbar
144+
145+
* **SensioDistributionBundle** (in dev/test env) - Adds functionality for
146+
configuring and working with Symfony distributions
147+
148+
* [**SensioGeneratorBundle**][13] (in dev/test env) - Adds code generation
149+
capabilities
150+
151+
* **AcmeDemoBundle** (in dev/test env) - A demo bundle with some example
152+
code
153+
154+
All libraries and bundles included in the Symfony Standard Edition are
155+
released under the MIT or BSD license.
156+
157+
Enjoy!
158+
159+
[1]: http://symfony.com/doc/2.3/book/installation.html
160+
[2]: http://getcomposer.org/
161+
[3]: http://symfony.com/download
162+
[4]: http://symfony.com/doc/2.3/quick_tour/the_big_picture.html
163+
[5]: http://symfony.com/doc/2.3/index.html
164+
[6]: http://symfony.com/doc/2.3/bundles/SensioFrameworkExtraBundle/index.html
165+
[7]: http://symfony.com/doc/2.3/book/doctrine.html
166+
[8]: http://symfony.com/doc/2.3/book/templating.html
167+
[9]: http://symfony.com/doc/2.3/book/security.html
168+
[10]: http://symfony.com/doc/2.3/cookbook/email.html
169+
[11]: http://symfony.com/doc/2.3/cookbook/logging/monolog.html
170+
[12]: http://symfony.com/doc/2.3/cookbook/assetic/asset_management.html
171+
[13]: http://symfony.com/doc/2.3/bundles/SensioGeneratorBundle/index.html

app/.htaccess

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
deny from all

app/AppCache.php

+9
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
<?php
2+
3+
require_once __DIR__.'/AppKernel.php';
4+
5+
use Symfony\Bundle\FrameworkBundle\HttpCache\HttpCache;
6+
7+
class AppCache extends HttpCache
8+
{
9+
}

app/AppKernel.php

+36
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
<?php
2+
3+
use Symfony\Component\HttpKernel\Kernel;
4+
use Symfony\Component\Config\Loader\LoaderInterface;
5+
6+
class AppKernel extends Kernel
7+
{
8+
public function registerBundles()
9+
{
10+
$bundles = array(
11+
new Symfony\Bundle\FrameworkBundle\FrameworkBundle(),
12+
new Symfony\Bundle\SecurityBundle\SecurityBundle(),
13+
new Symfony\Bundle\TwigBundle\TwigBundle(),
14+
new Symfony\Bundle\MonologBundle\MonologBundle(),
15+
new Symfony\Bundle\SwiftmailerBundle\SwiftmailerBundle(),
16+
new Symfony\Bundle\AsseticBundle\AsseticBundle(),
17+
new Doctrine\Bundle\DoctrineBundle\DoctrineBundle(),
18+
new Sensio\Bundle\FrameworkExtraBundle\SensioFrameworkExtraBundle(),
19+
new Peterjmit\BlogBundle\PeterjmitBlogBundle(),
20+
);
21+
22+
if (in_array($this->getEnvironment(), array('dev', 'test'))) {
23+
$bundles[] = new Acme\DemoBundle\AcmeDemoBundle();
24+
$bundles[] = new Symfony\Bundle\WebProfilerBundle\WebProfilerBundle();
25+
$bundles[] = new Sensio\Bundle\DistributionBundle\SensioDistributionBundle();
26+
$bundles[] = new Sensio\Bundle\GeneratorBundle\SensioGeneratorBundle();
27+
}
28+
29+
return $bundles;
30+
}
31+
32+
public function registerContainerConfiguration(LoaderInterface $loader)
33+
{
34+
$loader->load(__DIR__.'/config/config_'.$this->getEnvironment().'.yml');
35+
}
36+
}

app/Resources/views/base.html.twig

+13
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
<!DOCTYPE html>
2+
<html>
3+
<head>
4+
<meta charset="UTF-8" />
5+
<title>{% block title %}Welcome!{% endblock %}</title>
6+
{% block stylesheets %}{% endblock %}
7+
<link rel="icon" type="image/x-icon" href="{{ asset('favicon.ico') }}" />
8+
</head>
9+
<body>
10+
{% block body %}{% endblock %}
11+
{% block javascripts %}{% endblock %}
12+
</body>
13+
</html>

0 commit comments

Comments
 (0)