Exponential 5.x Kernel 7.5.40 Exponential New Stack (Symfony-based) Kernel — PHP Class Reference

GeneralSlotFactory.php
Go to the documentation of this file.
1 <?php
2
7 namespace eZ\Publish\Core\SignalSlot\SlotFactory;
8
9 use eZ\Publish\Core\SignalSlot\Slot;
10 use eZ\Publish\Core\SignalSlot\SlotFactory;
11 use eZ\Publish\Core\Base\Exceptions\NotFoundException;
12
18 class GeneralSlotFactory extends SlotFactory
19 {
21 protected $slots = [];
22
26 public function __construct(array $slots = [])
27 {
28 $this->slots = $slots;
29 }
30
40 public function getSlot($slotIdentifier)
41 {
42 if (!isset($this->slots[$slotIdentifier])) {
43 throw new NotFoundException('slot', $slotIdentifier);
44 }
45
46 return $this->slots[$slotIdentifier];
47 }
48 }
eZ\Publish\Core\Base\Exceptions\NotFoundException
Not Found Exception implementation.
Definition: Core/Base/Exceptions/NotFoundException.php:21
eZ\Publish\Core\SignalSlot\SlotFactory\GeneralSlotFactory
Slot factory that is able to lookup slots based on identifier.
Definition: GeneralSlotFactory.php:19
eZ\Publish\Core\SignalSlot\SlotFactory\GeneralSlotFactory\__construct
__construct(array $slots=[])
Definition: GeneralSlotFactory.php:26
eZ\Publish\Core\SignalSlot\SlotFactory\GeneralSlotFactory\getSlot
getSlot($slotIdentifier)
Returns a Slot with the given $slotIdentifier.
Definition: GeneralSlotFactory.php:40
eZ\Publish\Core\SignalSlot\SlotFactory\GeneralSlotFactory\$slots
$slots
Definition: GeneralSlotFactory.php:21
eZ\Publish\Core\SignalSlot\SlotFactory
Fetches (creates) Slots by their identifier.
Definition: SlotFactory.php:15
eZ\Publish\Core\SignalSlot\Slot
A Slot can be assigned to receive a certain Signal.
Definition: SignalSlot/Slot.php:13
eZ\Publish\Core\SignalSlot\SlotFactory
Definition: GeneralSlotFactory.php:7
Copyright © 1998 – 2026 7x. All rights reserved. Licensed under the GNU GPLv2+.