The popular open-source contract for web designers and developers by Stuff & Nonsense
- Originally published: 23/12/2008
- Revised date: 15/12/2013
- Original post
<?php | |
namespace Project\WebsiteBundle\Tests; | |
use Doctrine\ORM\EntityManager; | |
use Symfony\Bundle\FrameworkBundle\Client; | |
use Symfony\Bundle\FrameworkBundle\Test\WebTestCase; | |
use Symfony\Component\Security\Core\Authentication\Token\UsernamePasswordToken; | |
use Symfony\Component\HttpFoundation\Session\Session; |
<?xml version="1.0" encoding="UTF-8"?> | |
<project name="project" default="build-parallel"> | |
<target name="build" depends="prepare,lint,phploc,pdepend,phpmd-ci,phpcs-ci,phpcpd,phpunit,behat,phpdox"/> | |
<target name="build-parallel" depends="prepare,lint,tools-parallel,phpunit,behat,phpdox"/> | |
<target name="tests" depends="prepare,phpunit,behat"/> | |
<target name="tools-parallel" description="Run tools in parallel"> | |
<parallel threadCount="4"> | |
<sequential> |
<?php | |
namespace Project\WebsiteBundle\Form\Type\Payment; | |
use Doctrine\ORM\EntityRepository; | |
use Entity\Core\Account; | |
use Symfony\Component\Form\FormBuilderInterface; | |
use Symfony\Component\Form\FormEvent; | |
use Symfony\Component\Form\FormEvents; | |
use Symfony\Component\OptionsResolver\OptionsResolverInterface; |
jms_serializer: | |
metadata: | |
directories: | |
core: | |
namespace_prefix: Entity\Core | |
path: "@ProjectApiBundle/Resources/config/serializer" | |
postfix: | |
namespace_prefix: Entity\Postfix | |
path: "@ProjectApiBundle/Resources/config/serializer" | |
nms: |
$builder->add('secretQuestion', 'entity', [ | |
'property' => 'question', | |
'class' => 'E:SecretQuestion', | |
'query_builder' => function(EntityRepository $er) { | |
return $er->createQueryBuilder('q')->orderBy('q.id', 'ASC'); | |
} | |
]); |
// ---------------------------------------------------------- | |
// A short snippet for detecting versions of IE in JavaScript | |
// without resorting to user-agent sniffing | |
// ---------------------------------------------------------- | |
// If you're not in IE (or IE version is less than 5) then: | |
// ie === undefined | |
// If you're in IE (>=5) then you can determine which version: | |
// ie === 7; // IE7 | |
// Thus, to detect IE: | |
// if (ie) {} |
var querystring = require('querystring'); | |
var http = require('http'); | |
var fs = require('fs'); | |
var requester = require('request'); | |
var postData = querystring.stringify({ | |
grant_type: "password", | |
username: "your_email", | |
password: "password", | |
client_id: "ghost-admin" |
<?php | |
namespace NationalNet\MynatnetBundle\Security\Authentication\Handler; | |
use NationalNet\MynatnetBundle\Manager\UserManager; | |
use Symfony\Component\HttpFoundation\RedirectResponse; | |
use Symfony\Component\HttpFoundation\Request; | |
use Symfony\Component\Security\Core\Authentication\Token\TokenInterface; | |
use Symfony\Component\Security\Http\Authentication\AuthenticationSuccessHandlerInterface; |