1 | <?php |
||
27 | class ProfilerFactory |
||
28 | { |
||
29 | const OPTION_ENABLE = 'enable'; |
||
30 | const OPTION_ENVIRONMENT = 'environment'; |
||
31 | const OPTION_DATASOURCE_PROFILES_FOLDER = 'dataSourceProfilesFolders'; |
||
32 | const OPTION_DATASOURCE_CLASS = 'dataSourceClass'; |
||
33 | const OPTION_LOGGER = 'logger'; |
||
34 | const OPTION_COLLECTORS = 'collectors'; |
||
35 | |||
36 | /** |
||
37 | * @var ProfilerInterface |
||
38 | */ |
||
39 | protected static $profiler; |
||
40 | |||
41 | /** |
||
42 | * @return ProfilerInterface |
||
43 | * @throws \RuntimeException |
||
44 | */ |
||
45 | public static function getProfiler() |
||
53 | |||
54 | /** |
||
55 | * @param array $options |
||
56 | * @return Profiler|ProfilerInterface |
||
57 | * @throws \RuntimeException |
||
58 | * @throws AccessException |
||
59 | * @throws UndefinedOptionsException |
||
60 | * @throws MissingOptionsException |
||
61 | * @throws InvalidOptionsException |
||
62 | * @throws NoSuchOptionException |
||
63 | * @throws OptionDefinitionException |
||
64 | */ |
||
65 | 100 | public static function build(array $options = []) |
|
71 | |||
72 | /** |
||
73 | * @param array $options |
||
74 | * @return Profiler |
||
75 | * |
||
76 | * @throws \RuntimeException |
||
77 | * @throws AccessException |
||
78 | * @throws UndefinedOptionsException |
||
79 | * @throws MissingOptionsException |
||
80 | * @throws InvalidOptionsException |
||
81 | * @throws NoSuchOptionException |
||
82 | * @throws OptionDefinitionException |
||
83 | */ |
||
84 | 100 | public function create(array $options = []) |
|
120 | |||
121 | |||
122 | /** |
||
123 | * @param array $options |
||
124 | * @return array |
||
125 | * @throws AccessException |
||
126 | * @throws UndefinedOptionsException |
||
127 | * @throws MissingOptionsException |
||
128 | * @throws InvalidOptionsException |
||
129 | * @throws NoSuchOptionException |
||
130 | * @throws OptionDefinitionException |
||
131 | */ |
||
132 | 100 | protected function resolveOptions(array $options = []) |
|
139 | |||
140 | /** |
||
141 | * @param OptionsResolver $resolver |
||
142 | * @throws AccessException |
||
143 | * @throws UndefinedOptionsException |
||
144 | */ |
||
145 | 100 | public function configureOptions(OptionsResolver $resolver) |
|
168 | } |
||
169 |