private function escapeValue($value, Escaper $escaper) { $value = $this->type->format($value); if ($this->type->isEscapeRequired()) { $value = $escaper->escape($value); } return $value; }
protected function escapeValues(array $values, Escaper $escaper) { $escapedValues = array(); foreach ($values as $value) { $formatedValue = $this->type->format($value); if ($this->type->isEscapeRequired()) { $formatedValue = $escaper->escape($formatedValue); } $escapedValues[] = $formatedValue; } return $escapedValues; }