blob: 226081c75478f42a4f1e365780bdb7ddb2d35060 [file] [log] [blame]
Matthias Andreas Benkard7b2a3a12021-08-16 10:57:25 +02001<?php
2
3namespace Illuminate\Contracts\Pipeline;
4
5use Closure;
6
7interface Pipeline
8{
9 /**
10 * Set the traveler object being sent on the pipeline.
11 *
12 * @param mixed $traveler
13 * @return $this
14 */
15 public function send($traveler);
16
17 /**
18 * Set the stops of the pipeline.
19 *
20 * @param dynamic|array $stops
21 * @return $this
22 */
23 public function through($stops);
24
25 /**
26 * Set the method to call on the stops.
27 *
28 * @param string $method
29 * @return $this
30 */
31 public function via($method);
32
33 /**
34 * Run the pipeline with a final destination callback.
35 *
36 * @param \Closure $destination
37 * @return mixed
38 */
39 public function then(Closure $destination);
40}