1 | <?php |
||
6 | class DevelopingFactory |
||
7 | { |
||
8 | |||
9 | /** |
||
10 | * PHP class name (FQDN) of the DevelopingInterface instance this factory produces. |
||
11 | * |
||
12 | * @var string |
||
13 | */ |
||
14 | public $developing_php_class; |
||
15 | |||
16 | |||
17 | /** |
||
18 | * @param string|null $developing_php_class DevelopingInterface instance FQDN |
||
19 | * |
||
20 | * @throws InvalidArgumentException If FQDN does not implement DevelopingInterface |
||
21 | */ |
||
22 | 18 | public function __construct( string $developing_php_class = null ) |
|
31 | |||
32 | |||
33 | /** |
||
34 | * The factory method. |
||
35 | * |
||
36 | * Expects an array with at least elements "time", "densities", and "exposures". |
||
37 | * |
||
38 | * If no "exposures" are given, but "zones" numbers are instead, the zone numbers |
||
39 | * will be converted internally. |
||
40 | * |
||
41 | * @param array $developing |
||
42 | * @return DevelopingInterface |
||
43 | */ |
||
44 | 15 | public function __invoke( $developing ) |
|
64 | } |
||
65 |