This file contains 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
Symfony/Component/OptionsResolver/Exception/MissingOptionsException.php | |
Symfony/Component/OptionsResolver/Exception/OptionDefinitionException.php | |
Symfony/Component/OptionsResolver/Exception/InvalidOptionsException.php | |
Symfony/Component/Serializer/Exception/InvalidArgumentException.php | |
Symfony/Component/Serializer/Exception/UnsupportedException.php | |
Symfony/Component/Serializer/Exception/UnexpectedValueException.php | |
Symfony/Component/Serializer/Exception/LogicException.php | |
Symfony/Component/Serializer/Exception/Exception.php | |
Symfony/Component/Serializer/Exception/RuntimeException.php | |
Symfony/Component/HttpKernel/Exception/MethodNotAllowedHttpException.php |
This file contains 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
Doctrine/Common/DataFixtures/Exception/CircularReferenceException.php | |
Doctrine/Common/Annotations/AnnotationException.php | |
Doctrine/Common/CommonException.php | |
Doctrine/Common/Persistence/Mapping/MappingException.php | |
Doctrine/ORM/TransactionRequiredException.php | |
Doctrine/ORM/Query/QueryException.php | |
Doctrine/ORM/Query/AST/ASTException.php | |
Doctrine/ORM/Mapping/MappingException.php | |
Doctrine/ORM/UnexpectedResultException.php | |
Doctrine/ORM/PessimisticLockException.php |
This file contains 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 initializeAction() { | |
$this->doctrine = $this->getDoctrine(); | |
$this->bundle = $this->container->getParameter("bundle"); | |
$this->entityManager = $this->doctrine->getEntityManager(); | |
$this->productRepository = $this->doctrine->getRepository($this->bundle . ':Product'); | |
$this->categoryRepository = $this->doctrine->getRepository($this->bundle . ':Category'); | |
$this->categoryModel = $categoryModel = $this->get("CategoryModel"); | |
$this->productModel = $this->get("ProductModel"); |
This file contains 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
// Vérifie qu'il y a au moins une balise h2 dans la classe "subtitle" | |
$this->assertGreaterThan(0, $crawler->filter('h2.subtitle')->count()); | |
// Vérifie qu'il y a exactement 4 balises h2 sur la page | |
$this->assertCount(4, $crawler->filter('h2')); | |
// Vérifie que l'entête "Content-Type" vaut "application/json" | |
$this->assertTrue($client->getResponse()->headers->contains('Content-Type', 'application/json')); | |
// Vérifie que le contenu retourné correspond à la regex |
This file contains 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 | |
/* | |
# ------------------------------------------------------------------------ | |
# SymfonyAsLib | |
# ------------------------------------------------------------------------ | |
# Developer : Sofiane Haddag, sofiane.haddag@yahoo.fr | |
*/ | |
use Symfony\Component\Validator\Validation; |
This file contains 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
{ | |
"require": { | |
"symfony/event-dispatcher": "2.1.0-stable" | |
} | |
} |
This file contains 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 RE\AssetBundle\Model; | |
use Knp\Bundle\GaufretteBundle\FilesystemMap; | |
use Doctrine\ORM\EntityManager; | |
use Symfony\Component\HttpFoundation\File\UploadedFile; | |
use Symfony\Component\EventDispatcher\EventDispatcher; | |
use Gaufrette\FileStream\Local; |
This file contains 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
/** | |
* Camelizes a string. | |
* | |
* @param string $id A string to camelize | |
* | |
* @return string The camelized string | |
*/ | |
public static function camelize($id) | |
{ | |
return strtr(ucwords(strtr($id, array('_' => ' ', '.' => '_ '))), array(' ' => '')); |
This file contains 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 Demo\FormBundle\Controller; | |
use Symfony\Bundle\FrameworkBundle\Controller ; | |
use Symfony\Component\HttpFoundation\Response; | |
use Symfony\Component\OptionsResolver\OptionsResolver; | |
use Symfony\Component\HttpKernel\Exception\HttpException; | |
/** |
This file contains 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 inMultiDimensionalArray($needle, $haystack, $strict = false) { | |
foreach ($haystack as $item) { | |
if (($strict ? $item === $needle : $item == $needle) || (\is_array($item) && $this->inMultidimensionalArray($needle, $item, $strict))) { | |
return true; | |
} | |
} | |
return false; | |
} |
OlderNewer