Skip to content

Commit eeb91e4

Browse files
committed
initial
0 parents  commit eeb91e4

38 files changed

+3610
-0
lines changed

.gitignore

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
/app/bootstrap.php.cache
2+
/app/cache/*
3+
!app/cache/.gitkeep
4+
/app/config/parameters.yml
5+
/app/logs/*
6+
!app/logs/.gitkeep
7+
/app/phpunit.xml
8+
/bin/
9+
/composer.phar
10+
/vendor/
11+
/web/bundles/

README.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
DemoSp
2+
======
3+
4+
A Symfony project created on October 1, 2015, 2:44 pm.

app/.htaccess

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
<IfModule mod_authz_core.c>
2+
Require all denied
3+
</IfModule>
4+
<IfModule !mod_authz_core.c>
5+
Order deny,allow
6+
Deny from all
7+
</IfModule>

app/AppCache.php

Lines changed: 9 additions & 0 deletions
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

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
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+
20+
new LightSaml\SpBundle\LightSamlSpBundle(),
21+
22+
new AppBundle\AppBundle(),
23+
);
24+
25+
if (in_array($this->getEnvironment(), array('dev', 'test'))) {
26+
$bundles[] = new Symfony\Bundle\DebugBundle\DebugBundle();
27+
$bundles[] = new Symfony\Bundle\WebProfilerBundle\WebProfilerBundle();
28+
$bundles[] = new Sensio\Bundle\DistributionBundle\SensioDistributionBundle();
29+
$bundles[] = new Sensio\Bundle\GeneratorBundle\SensioGeneratorBundle();
30+
}
31+
32+
return $bundles;
33+
}
34+
35+
public function registerContainerConfiguration(LoaderInterface $loader)
36+
{
37+
$loader->load($this->getRootDir().'/config/config_'.$this->getEnvironment().'.yml');
38+
}
39+
}

app/Resources/views/base.html.twig

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
<!DOCTYPE html>
2+
<html>
3+
<head>
4+
<meta charset="UTF-8" />
5+
<title>{% block title %}Welcome!{% endblock %}</title>
6+
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.5/css/bootstrap.min.css">
7+
<link rel="icon" type="image/x-icon" href="{{ asset('favicon.ico') }}" />
8+
</head>
9+
<body>
10+
{% block body %}
11+
<div class="container">
12+
{% block content %}{% endblock %}
13+
</div>
14+
{% endblock %}
15+
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.5/js/bootstrap.min.js" type="text/javascript"></script>
16+
{% block javascripts %}{% endblock %}
17+
</body>
18+
</html>
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
{% extends 'base.html.twig' %}
2+
3+
{% block content %}
4+
<h1>Unsecure</h1>
5+
6+
<p><a href="{{ path('secure.home') }}">Login</a></p>
7+
{% endblock %}
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
{% extends 'base.html.twig' %}
2+
3+
{% block content %}
4+
<h1>SECURE</h1>
5+
6+
<p>Hello <b>{{ app.security.token.username }}!</b></p>
7+
<p><a href="#">Logout</a></p>
8+
{% endblock %}

0 commit comments

Comments
 (0)