Skip to content

Instantly share code, notes, and snippets.

View j's full-sized avatar
🏄‍♂️

Jordan Stout j

🏄‍♂️
View GitHub Profile
/etc/php.d/bcmath.ini, /etc/php.d/curl.ini, /etc/php.d/eaccelerator.ini, /etc/php.d/fileinfo.ini, /etc/php.d/gd.ini, /etc/php.d/imagick.ini, /etc/php.d/json.ini, /etc/php.d/mysql.ini, /etc/php.d/mysqli.ini, /etc/php.d/pdo.ini, /etc/php.d/pdo_mysql.ini, /etc/php.d/pdo_sqlite.ini, /etc/php.d/phar.ini, /etc/php.d/soap.ini, /etc/php.d/xdebug.ini, /etc/php.d/zip.ini
<?php
namespace JStout\MainBundle\Form\User;
use Symfony\Component\Form\Form;
class SignupHandler
{
protected $form;
<?php
namespace JStout\MainBundle\Component\Form;
use Symfony\Component\Form\Form,
Doctrine\ORM\EntityManager,
Symfony\Component\HttpFoundation\Request,
JStout\MainBundle\Component\Form\FormHandlerInterface;
class FormHandler
<?php
[...]
class SignupHandler implements FormHandlerInterface
{
protected $form;
protected $request;
protected $entityManager;
@j
j / Advertiser.php
Created June 9, 2011 23:58
User Entity
<?php
namespace JStout\MainBundle\Entity;
use Doctrine\ORM\Mapping as ORM,
Symfony\Component\Validator\Constraints as Assert;
/**
* @ORM\Entity(repositoryClass="JStout\MainBundle\Entity\AdvertiserRepository")
* @ORM\Table(name="advertiser")
<?php
[...]
// process form
if ('POST' == $this->request->getMethod()) {
// bind form data
$form->bindRequest($this->request);
// If form is valid
@j
j / SignupHandler.php
Created June 15, 2011 06:19
The Error
<?php
namespace JStout\MainBundle\Form\Vendor;
use JStout\MainBundle\Component\Form\FormHandlerInterface,
Symfony\Component\Form\Form,
Symfony\Component\HttpFoundation\Request,
Doctrine\ORM\EntityManager,
JStout\MainBundle\Entity,
Symfony\Component\Security\Acl\Domain\ObjectIdentity,
<?php
namespace JStout\MainBundle\Component\Twig\Extension;
use Twig_Extension,
Twig_Filter_Method,
Twig_Environment;
class Parser extends Twig_Extension
{
<?php
namespace JStout\MainBundle\Controller;
use Symfony\Bundle\FrameworkBundle\Controller\Controller,
Sensio\Bundle\FrameworkExtraBundle\Configuration as Extra,
Symfony\Component\HttpKernel\Exception\NotFoundHttpException,
JStout\MainBundle\Entity,
JStout\MainBundle\Form;
<?php
[...]
/**
* @Extra\Route("/offer/{offerId}/creative", name="admin_offer_creative")
* @Extra\Route("/offer/{offerId}/creative/{creativeId}", name="admin_offer_creative_edit")
* @Extra\Template()
*/
public function creativeAction($offerId = null, $creativeId = null)