Back to JsonapiDocument class

Method setErrors

public $this
setErrors
(mixed $errors)
Set the errors array.
Parameters
  • array $errors Error array.
Returns
  • $this
Since
  • 4.0.0

Method setErrors - Source code

/**
 * Set the errors array.
 *
 * @param   array  $errors  Error array.
 *
 * @return   $this
 *
 * @since  4.0.0
 */
public function setErrors($errors)
{
    $this->document->setErrors($errors);
    return $this;
}