1: <?php declare(strict_types=1);
2:
3: namespace Salient\Contract\Container;
4:
5: /**
6: * Implemented by service providers with container bindings that only apply in
7: * the context of the class
8: *
9: * @api
10: */
11: interface HasContextualBindings
12: {
13: /**
14: * Get bindings to register with a container in the context of the class
15: *
16: * Bindings returned by this method apply:
17: *
18: * - when resolving the class's dependencies
19: * - when using {@see ContainerInterface::inContextOf()} to work with a
20: * container in the context of the class
21: *
22: * @return array<class-string,class-string>
23: */
24: public static function getContextualBindings(): array;
25: }
26: