You are here

private function ExpressionValidator::getExpressionLanguage in Plug 7

File

lib/Symfony/validator/Symfony/Component/Validator/Constraints/ExpressionValidator.php, line 94

Class

ExpressionValidator
@author Fabien Potencier <fabien@symfony.com> @author Bernhard Schussek <bschussek@symfony.com>

Namespace

Symfony\Component\Validator\Constraints

Code

private function getExpressionLanguage() {
  if (null === $this->expressionLanguage) {
    if (!class_exists('Symfony\\Component\\ExpressionLanguage\\ExpressionLanguage')) {
      throw new RuntimeException('Unable to use expressions as the Symfony ExpressionLanguage component is not installed.');
    }
    $this->expressionLanguage = new ExpressionLanguage();
  }
  return $this->expressionLanguage;
}