configure() public méthode

public configure ( $name, array $params = [] )
$params array
 public function testSettingTemplates()
 {
     $x = new ValidationException();
     $x->configure('bar');
     $x->setTemplate('foo');
     $this->assertEquals('foo', $x->getTemplate());
 }
Exemple #2
0
 private function overwriteExceptionParams(ValidationException $exception)
 {
     $params = [];
     foreach ($exception->getParams() as $key => $value) {
         if (in_array($key, ['template', 'translator'])) {
             continue;
         }
         $params[$key] = $this->baseKey;
     }
     $exception->configure($this->comparedKey, $params);
     return $exception;
 }