1 | <?php |
||
29 | class VarnishUrlPurger extends AbstractQueueHandler implements VarnishUrlPurgerInterface |
||
30 | { |
||
31 | /** |
||
32 | * @var string |
||
33 | */ |
||
34 | private const PROCESS_TYPE = 'PURGE'; |
||
35 | |||
36 | /** |
||
37 | * @var PurgingConfigProviderInterface |
||
38 | */ |
||
39 | private $purgingConfigProvider; |
||
40 | |||
41 | /** |
||
42 | * VarnishUrlPurger constructor. |
||
43 | * @param GeneralConfigProviderInterface $configProvider |
||
44 | * @param LoggerInterface $logger |
||
45 | * @param QueueProgressLoggerInterface $queueProgressLogger |
||
46 | * @param Factory $loopFactory |
||
47 | * @param ClientFactory $clientFactory |
||
48 | * @param PurgingConfigProviderInterface $purgingConfigProvider |
||
49 | */ |
||
50 | public function __construct( |
||
61 | |||
62 | /** |
||
63 | * @param string $url |
||
64 | * @return void |
||
65 | */ |
||
66 | public function addUrlToPurge(string $url): void |
||
71 | |||
72 | /** |
||
73 | * @return void |
||
74 | */ |
||
75 | public function purge(): void |
||
79 | |||
80 | /** |
||
81 | * @return int |
||
82 | */ |
||
83 | protected function getMaxNumberOfProcesses(): int |
||
87 | |||
88 | /** |
||
89 | * @return string |
||
90 | */ |
||
91 | protected function getQueueProcessType(): string |
||
95 | |||
96 | /** |
||
97 | * |
||
98 | * @param string $url |
||
99 | * @return void |
||
100 | */ |
||
101 | protected function createRequest(string $url): void |
||
132 | |||
133 | /** |
||
134 | * @return array |
||
135 | */ |
||
136 | private function buildHeaders(): array |
||
146 | } |
||
147 |