/** * Allows the declaration of a validation error on the current entity. * @param string $attributeName The name of a model attribute * @param string $validationName A type of validation (ex: 'required') * @param string $errorMessage The error message */ public function setValidationError($attributeName, $validationName, $errorMessage) { $this->validationErrors = Hash::merge($this->getValidationErrors(), array($attributeName => array($validationName => $errorMessage))); }
protected function getMergedHeaders() { $defaults = array('Content-Type' => 'text/html; charset=UTF-8', 'X-Mailer' => "PHP " . phpversion()); return Hash::merge((array) $this->getConfig('headers'), $defaults); }