1 | <?php |
||
16 | class Factory { |
||
17 | /** |
||
18 | * Create a new condition |
||
19 | * |
||
20 | * @param string|array|Closure $options |
||
21 | * @return ConditionInterface |
||
22 | */ |
||
23 | public static function make( $options ) { |
||
38 | |||
39 | /** |
||
40 | * Check if the passed argument is a registered condition type |
||
41 | * |
||
42 | * @param mixed $condition_type |
||
43 | * @return boolean |
||
44 | */ |
||
45 | protected static function conditionTypeRegistered( $condition_type ) { |
||
53 | |||
54 | /** |
||
55 | * Create a new condition from a url |
||
56 | * |
||
57 | * @param string $url |
||
58 | * @return ConditionInterface |
||
59 | */ |
||
60 | protected static function makeFromUrl( $url ) { |
||
63 | |||
64 | /** |
||
65 | * Create a new condition from a closure |
||
66 | * |
||
67 | * @param Closure $closure |
||
68 | * @return ConditionInterface |
||
69 | */ |
||
70 | protected static function makeFromClosure( Closure $closure ) { |
||
73 | |||
74 | /** |
||
75 | * Create a new condition from an array of conditions |
||
76 | * |
||
77 | * @param array $options |
||
78 | * @return ConditionInterface |
||
79 | */ |
||
80 | protected static function makeFromArrayOfConditions( $options ) { |
||
83 | |||
84 | /** |
||
85 | * Resolve the condition type and it's arguments from an options array |
||
86 | * |
||
87 | * @param array $options |
||
88 | * @return array |
||
89 | */ |
||
90 | protected static function getConditionTypeAndArguments( $options ) { |
||
108 | |||
109 | /** |
||
110 | * Create a new condition from an array |
||
111 | * |
||
112 | * @param array $options |
||
113 | * @return ConditionInterface |
||
114 | */ |
||
115 | protected static function makeFromArray( $options ) { |
||
131 | } |
||
132 |