-
Notifications
You must be signed in to change notification settings - Fork 0
/
PusherManagerInterface.php
59 lines (49 loc) · 1.72 KB
/
PusherManagerInterface.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
<?php
/*
* This file is part of the Klipper package.
*
* (c) François Pluchino <francois.pluchino@klipper.dev>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Klipper\Component\Pusher;
use Klipper\Component\Pusher\Exception\InvalidArgumentException;
use Klipper\Component\Pusher\Pipeline\PipelineInterface;
/**
* @author François Pluchino <francois.pluchino@klipper.dev>
*/
interface PusherManagerInterface
{
/**
* @return static
*/
public function addPipeline(PipelineInterface $pipeline);
public function hasPipeline(string $name): bool;
/**
* @throws InvalidArgumentException When the pipeline does not exist
*/
public function getPipeline(string $name): PipelineInterface;
/**
* @return PipelineInterface[]
*/
public function getPipelines(): array;
/**
* @param PipelineInterface[]|string[] $pipelines The pipeline instances or names
*
* @return PipelineInterface[]
*/
public function getStackOfPipelines(array $pipelines): array;
/**
* @param PipelineInterface|string $pipeline The pipeline instance or name
*
* @throws InvalidArgumentException When the pipeline does not exist
*/
public function push($pipeline, ContextInterface $context): PushResultInterface;
/**
* @param PipelineInterface[]|string[] $pipelines The pipeline instances or names
*
* @throws InvalidArgumentException When the pipeline does not exist
*/
public function pushs(array $pipelines, ContextInterface $context, bool $stopOnError = true, ?callable $preCallback = null, ?callable $postCallback = null): PushResultListInterface;
}