| 1 | <?php |
||
| 10 | class TwigSyntax extends Constraint |
||
| 11 | { |
||
| 12 | public $message = 'This value is not a valid twig template.'; |
||
| 13 | public $parse = true; |
||
| 14 | public $environment = null; |
||
| 15 | |||
| 16 | 6 | public function __construct($options = null) |
|
| 17 | { |
||
| 18 | 6 | parent::__construct($options); |
|
| 19 | |||
| 20 | 4 | if ($this->environment !== null && !$this->environment instanceof \Twig_Environment) { |
|
| 21 | 1 | throw new InvalidOptionsException(sprintf('Option "environment" must be null or a Twig_Environment instance for constraint %s', __CLASS__), array('environment')); |
|
| 22 | } |
||
| 23 | 3 | } |
|
| 24 | |||
| 25 | 1 | public function validatedBy() |
|
| 29 | } |
||
| 30 |