status() public method

The status code is an http resonse code and should be of the 4xx variety.
public status ( integer | null $value = null ) : Validation | integer
$value integer | null Pass a new status code or null to get the current code.
return Validation | integer Returns the current status code or $this for fluent sets.
Ejemplo n.º 1
0
 /**
  * Initialize an instance of the {@link ValidationException} class.
  *
  * @param Validation $validation The {@link Validation} object for the exception.
  */
 public function __construct(Validation $validation)
 {
     $this->validation = $validation;
     parent::__construct($validation->getMessage(), (int) $validation->status());
 }