master

laravel/framework

Last updated at: 29/12/2023 09:21

Pipeline.php

TLDR

This file defines the Pipeline interface in the Illuminate\Contracts\Pipeline namespace. It contains methods for configuring and running a pipeline.

Methods

send($traveler)

This method sets the traveler object being sent on the pipeline.

through($stops)

This method sets the stops of the pipeline.

via($method)

This method sets the method to call on the stops.

then(Closure $destination)

This method runs the pipeline with a final destination callback.

<?php

namespace Illuminate\Contracts\Pipeline;

use Closure;

interface Pipeline
{
    /**
     * Set the traveler object being sent on the pipeline.
     *
     * @param  mixed  $traveler
     * @return $this
     */
    public function send($traveler);

    /**
     * Set the stops of the pipeline.
     *
     * @param  dynamic|array  $stops
     * @return $this
     */
    public function through($stops);

    /**
     * Set the method to call on the stops.
     *
     * @param  string  $method
     * @return $this
     */
    public function via($method);

    /**
     * Run the pipeline with a final destination callback.
     *
     * @param  \Closure  $destination
     * @return mixed
     */
    public function then(Closure $destination);
}