This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# app/config/config.yml | |
doctrine: | |
orm: | |
entity_managers: | |
default: | |
dql: | |
numeric_functions: | |
char_length: Acme\DemoBundle\Extension\Doctrine\Query\Mysql\CharLength |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
use Symfony\Bundle\FrameworkBundle\Controller\Controller, | |
Symfony\Component\HttpFoundation\Request, | |
Sensio\Bundle\FrameworkExtraBundle\Configuration\Method, | |
Sensio\Bundle\FrameworkExtraBundle\Configuration\Route, | |
Sensio\Bundle\FrameworkExtraBundle\Configuration\Template, | |
Pagerfanta\Pagerfanta, | |
Pagerfanta\Adapter\DoctrineORMAdapter, | |
Pagerfanta\Exception\NotValidCurrentPageException; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
namespace Acme\AcmeBundle\Controller; | |
use Symfony\Component\HttpFoundation\Response; | |
class SomeController | |
{ | |
public function testAction() | |
{ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
namespace Acme\UserBundle\Listener; | |
use Symfony\Component\Security\Http\Event\InteractiveLoginEvent; | |
use Symfony\Component\Security\Core\SecurityContext; | |
use Doctrine\Bundle\DoctrineBundle\Registry as Doctrine; // for Symfony 2.1.0+ | |
// use Symfony\Bundle\DoctrineBundle\Registry as Doctrine; // for Symfony 2.0.x | |
/** |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
services: | |
login_listener: | |
class: 'Acme\UserBundle\Listener\LoginListener' | |
arguments: ['@security.context', '@doctrine'] | |
tags: | |
- { name: 'kernel.event_listener', event: 'security.interactive_login' } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
public function someAction() | |
{ | |
$this->getResponse()->setContent("This is some text."); | |
return sfView::NONE; | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
public function someAction() | |
{ | |
$response = $this->get("response"); | |
$response->setContent("This is some text."); | |
return $response; | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$connectionParams = array( | |
"dbname" => "CHANGEME", | |
"user" => "CHANGEME", | |
"password" => "CHANGEME", | |
"host" => "localhost", | |
"driver" => "pdo_mysql" | |
); |
NewerOlder