outcome = $outcome; $this->code = (int) $code; $this->message = (string) $message; $this->run_id = null === $run_id ? null : (int) $run_id; $this->retry_after = max( 0, (int) $retry_after ); } /** * True when the submission reached Send4 and needs no retry. * * @return bool */ public function is_final() { return in_array( $this->outcome, array( self::DELIVERED, self::DUPLICATE, self::UNROUTED ), true ); } /** * True when a later attempt could still succeed. * * @return bool */ public function is_retryable() { return self::TRANSIENT === $this->outcome; } }