-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathBuildingEvent.php
More file actions
37 lines (27 loc) · 1.01 KB
/
BuildingEvent.php
File metadata and controls
37 lines (27 loc) · 1.01 KB
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
<?php
declare( strict_types = 1 );
namespace TheWebSolver\Codegarage\Container\Event;
use Psr\EventDispatcher\StoppableEventInterface;
use TheWebSolver\Codegarage\Container\Container;
use TheWebSolver\Codegarage\Container\Data\Binding;
use TheWebSolver\Codegarage\Container\Data\SharedBinding;
use TheWebSolver\Codegarage\Container\Traits\StopPropagation;
use TheWebSolver\Codegarage\Container\Interfaces\TaggableEvent;
class BuildingEvent implements StoppableEventInterface, TaggableEvent {
use StopPropagation;
private Binding|SharedBinding|null $binding = null;
public function __construct( private readonly Container $app, private readonly string $paramTypeWithName ) {}
public function app(): Container {
return $this->app;
}
public function getEntry(): string {
return $this->paramTypeWithName;
}
public function setBinding( Binding|SharedBinding $binding ): static {
$this->binding = $binding;
return $this;
}
public function getBinding(): Binding|SharedBinding|null {
return $this->binding;
}
}