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 | |
$dspec = array( | |
0 => STDIN, | |
1 => STDOUT, | |
2 => STDERR, | |
); | |
$tempfile = tempnam(sys_get_temp_dir(), 'lesstest'); |
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
namespaces: | |
orm: Doctrine\ORM\Mapping | |
val: Symfony\Component\Validator\Constraints | |
acme: Acme\Validation | |
Doctrine\Tests\ORM\Mapping\User: | |
# Support "." as namespace separator | |
# First character of the class name can be lower-cased, which feels more natural in YAML | |
# i.e.: Doctrine\ORM\Mapping\Entity | |
orm.entity: |
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
// Doctrine.Tests.ORM.Mapping.User.dcm.xml | |
<?xml version="1.0" encoding="UTF-8"?> | |
<map:class-mapping xmlns="http://doctrine-project.org/schemas/orm" | |
xmlns:map="http://doctrine-project.org/schemas/annotations/class-mapping"> | |
<map:class name="Doctrine\Tests\ORM\Mapping\User"> | |
<entity table="cms_users" /> | |
<indexes> | |
<index name="name_idx" columns="name"/> |
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 DefaultOptions extends Options | |
{ | |
setRequired() | |
setDefined() | |
resolve() | |
} |
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 Doctrine\Common\Annotations\AnnotationRegistry; | |
use Symfony\Component\Form\Extension\Validator\ValidatorExtension; | |
use Symfony\Component\Form\Forms; | |
use Symfony\Component\Validator\Constraints\Callback; | |
use Symfony\Component\Validator\Context\ExecutionContextInterface; | |
use Symfony\Component\Validator\Validation; | |
$loader = require_once __DIR__.'/vendor/autoload.php'; |
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 __DIR__.'/vendor/autoload.php'; | |
use Symfony\Component\Validator\Validation; | |
use Symfony\Component\Validator\Constraints\Length; | |
use Symfony\Component\Validator\Constraints\NotNull; | |
use Symfony\Component\Validator\Constraints\Valid; | |
use Symfony\Component\Validator\Constraints\Range; |
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 __DIR__.'/vendor/autoload.php'; | |
use Symfony\Component\Validator\Validation; | |
use Symfony\Component\Validator\Constraints\Length; | |
use Symfony\Component\Validator\Constraints\NotNull; | |
use Symfony\Component\Validator\Constraints\Range; | |
$validator = Validation::createValidatorBuilder() |
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 | |
function createTranslator(ResourceLocatorInterface $locator) { | |
$translator = new Translator('en'); | |
// add project specific resource | |
$translator->addResource('xlf', __DIR__.'/translations/en.xlf'); | |
// add all resources registered with the locator | |
$translator->consumeResources($locator); |
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 | |
// Put this file in your vendor/ directory | |
// The classes needed to make the autoloader work | |
require_once __DIR__.'/webmozart/puli/src/Locator/ResourceNotFoundException.php'; | |
require_once __DIR__.'/webmozart/puli/src/Locator/DataStorageInterface.php'; | |
require_once __DIR__.'/webmozart/puli/src/Locator/ResourceLocatorInterface.php'; | |
require_once __DIR__.'/webmozart/puli/src/Locator/AbstractResourceLocator.php'; | |
require_once __DIR__.'/webmozart/puli/src/Locator/PhpResourceLocator.php'; |