Installation of symfony3
This commit is contained in:
parent
062f1d6403
commit
6176ce9735
38 changed files with 1849 additions and 48 deletions
7
src/.htaccess
Normal file
7
src/.htaccess
Normal file
|
|
@ -0,0 +1,7 @@
|
|||
<IfModule mod_authz_core.c>
|
||||
Require all denied
|
||||
</IfModule>
|
||||
<IfModule !mod_authz_core.c>
|
||||
Order deny,allow
|
||||
Deny from all
|
||||
</IfModule>
|
||||
16
src/Deblan/Bundle/ApiBundle/Controller/DefaultController.php
Normal file
16
src/Deblan/Bundle/ApiBundle/Controller/DefaultController.php
Normal file
|
|
@ -0,0 +1,16 @@
|
|||
<?php
|
||||
|
||||
namespace Deblan\Bundle\ApiBundle\Controller;
|
||||
|
||||
use Symfony\Bundle\FrameworkBundle\Controller\Controller;
|
||||
use Sensio\Bundle\FrameworkExtraBundle\Configuration\Route;
|
||||
|
||||
class DefaultController extends Controller
|
||||
{
|
||||
/**
|
||||
* @Route("/")
|
||||
*/
|
||||
public function indexAction()
|
||||
{
|
||||
}
|
||||
}
|
||||
9
src/Deblan/Bundle/ApiBundle/DeblanApiBundle.php
Normal file
9
src/Deblan/Bundle/ApiBundle/DeblanApiBundle.php
Normal file
|
|
@ -0,0 +1,9 @@
|
|||
<?php
|
||||
|
||||
namespace Deblan\Bundle\ApiBundle;
|
||||
|
||||
use Symfony\Component\HttpKernel\Bundle\Bundle;
|
||||
|
||||
class DeblanApiBundle extends Bundle
|
||||
{
|
||||
}
|
||||
|
|
@ -0,0 +1,4 @@
|
|||
services:
|
||||
# deblan_api.example:
|
||||
# class: Deblan\Bundle\ApiBundle\Example
|
||||
# arguments: ["@service_id", "plain_value", %parameter%]
|
||||
|
|
@ -0,0 +1 @@
|
|||
Hello World!
|
||||
|
|
@ -0,0 +1,17 @@
|
|||
<?php
|
||||
|
||||
namespace Deblan\Bundle\ApiBundle\Tests\Controller;
|
||||
|
||||
use Symfony\Bundle\FrameworkBundle\Test\WebTestCase;
|
||||
|
||||
class DefaultControllerTest extends WebTestCase
|
||||
{
|
||||
public function testIndex()
|
||||
{
|
||||
$client = static::createClient();
|
||||
|
||||
$crawler = $client->request('GET', '/');
|
||||
|
||||
$this->assertContains('Hello World', $client->getResponse()->getContent());
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue