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
<service id="rest.security.authentication.listener" class="Acme\TestBundle\Security\Firewall\RestListener" public="false"> | |
<argument type="service" id="security.context"/> | |
<argument type="service" id="security.authentication.manager" /> | |
<argument type="service" id="doctrine"/> | |
<argument type="service" id="event_dispatcher" /> | |
<argument type="service" id="security.authentication.success_handler" /> | |
</service> |
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\DemoBundle\DataFixtures\ORM; | |
use Doctrine\Common\Persistence\ObjectManager; | |
use Doctrine\Common\DataFixtures\AbstractFixture; | |
use Doctrine\Common\DataFixtures\OrderedFixtureInterface; | |
use Acme\DemoBundle\Entity\Product; | |
/** |
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
diff --git a/.puppet/modules/hautelook/manifests/init.pp b/.puppet/modules/hautelook/manifests/init.pp | |
index 19b88fd..46fadb1 100644 | |
--- a/.puppet/modules/hautelook/manifests/init.pp | |
+++ b/.puppet/modules/hautelook/manifests/init.pp | |
@@ -69,6 +69,21 @@ class hautelook { | |
require => Package["memcached"] | |
} | |
+ package { "mysql-server": | |
+ ensure => installed, |
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 | |
// This is just copy pasted in here. | |
class Controller { | |
public function getMemberAction($memberId) | |
{ | |
$country = $this->getDoctrine()->getRepository('HautelookApiBundle:Countries')->find('US'); | |
$serializedCountry = $this->get('serializer')->serialize($country, 'json'); |
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 | |
// ... | |
class SessionStorageChain implements \SessionHandlerInterface | |
{ | |
private $readStorageChain; | |
private $writeStorageChain; | |
private $container; |
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 | |
require_once dirname(__DIR__).'/../../../../app/AppKernel.php'; | |
/** | |
* Test case class helpful with Entity tests requiring the database interaction. | |
* For regular entity tests it's better to extend standard \PHPUnit_Framework_TestCase instead. | |
*/ | |
abstract class KernelAwareTest extends \PHPUnit_Framework_TestCase | |
{ |
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 | |
/** | |
* This function computes a hash of an integer. This can be used to not expose values to a customer, such as | |
* not giving them the id value for passing them to URLs. This algorithm is a bidirectional encryption (Feistel cipher) that maps | |
* the integer space onto itself. | |
* | |
* @link http://wiki.postgresql.org/wiki/Pseudo_encrypt Algorithm used | |
* @link http://en.wikipedia.org/wiki/Feistel_cipher Wikipedia page about Feistel ciphers | |
* @param int $value |
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 | |
// Of course you also need your Doctrine Annotations | |
class Example | |
{ | |
protected $firstName; | |
protected $lastName; | |
protected $username; | |
public function setFirstName($firstName) |
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
public function set(array $params) | |
{ | |
foreach ($params as $key => $value) { | |
$this->$key = $value; | |
} | |
} |
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
{% block choice_widget %} | |
{% spaceless %} | |
<div class="control-group"> | |
{% for child in form %} | |
{{ form_label(child) }} | |
{{ form_widget(child) }}</label> | |
{% endfor %} | |
</div> |