-
Notifications
You must be signed in to change notification settings - Fork 11
Expand file tree
/
Copy pathBillingRegistryBehaviorServiceInterface.php
More file actions
41 lines (33 loc) · 1.3 KB
/
Copy pathBillingRegistryBehaviorServiceInterface.php
File metadata and controls
41 lines (33 loc) · 1.3 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
38
39
40
41
<?php
declare(strict_types=1);
namespace hiqdev\php\billing\product\Application;
use Generator;
use hiqdev\php\billing\product\behavior\BehaviorInterface;
use hiqdev\php\billing\product\behavior\BehaviorNotFoundException;
use hiqdev\php\billing\product\behavior\InvalidBehaviorException;
use hiqdev\php\billing\product\price\PriceTypeDefinitionInterface;
interface BillingRegistryBehaviorServiceInterface
{
/**
* @param string $type - full type like 'overuse,lb_capacity_unit'
* @param string $behaviorClassWrapper
* @return BehaviorInterface
* @throws BehaviorNotFoundException
* @throws InvalidBehaviorException
*/
public function getBehavior(string $type, string $behaviorClassWrapper): BehaviorInterface;
/**
* Find all behaviors attached to any TariffType or PriceType by specified Behavior class.
*
* @param string $behaviorClassWrapper
* @return Generator<BehaviorInterface>
*/
public function getBehaviors(string $behaviorClassWrapper): Generator;
/**
* Find all PriceTypeDefinition in registry by specified Behavior class.
*
* @param string $behaviorClassWrapper
* @return Generator<PriceTypeDefinitionInterface>
*/
public function findPriceTypeDefinitionsByBehavior(string $behaviorClassWrapper): Generator;
}