@@ -90,76 +90,11 @@ $profiler->save($profiler_data);
9090
9191## Config
9292
93- Here's a reference config of what can be configured.
93+ Reference config of what can be configured:
9494
95- ``` php
96- <?php
97- $config = array(
98- // If defined, use specific profiler
99- // otherwise use any profiler that's found
100- 'profiler' => \Xhgui\Profiler\Profiler::PROFILER_TIDEWAYS_XHPROF,
101-
102- // This allows to configure, what profiling data to capture
103- 'profiler.flags' => array(
104- \Xhgui\Profiler\ProfilingFlags::CPU,
105- \Xhgui\Profiler\ProfilingFlags::MEMORY,
106- \Xhgui\Profiler\ProfilingFlags::NO_BUILTINS,
107- \Xhgui\Profiler\ProfilingFlags::NO_SPANS,
108- ),
109-
110- // Saver to use.
111- // Please note that 'pdo' and 'mongo' savers are deprecated
112- // Prefer 'upload' or 'file' saver.
113- 'save.handler' => \Xhgui\Profiler\Profiler::SAVER_UPLOAD,
114-
115- // Environment variables to exclude from profiling data
116- 'profiler.exclude-env' => array(
117- 'APP_DATABASE_PASSWORD',
118- 'PATH',
119- ),
95+ - [ examples/autoload.php] ( examples/autoload.php )
12096
121- 'profiler.options' => array(
122- ),
123-
124- /**
125- * Determine whether the profiler should run.
126- * This default implementation profiles every request.
127- * Override this with your custom logic in your config.
128- *
129- * @see https://github.com/perftools/php-profiler#configure-profiling-rate
130- * @return bool
131- */
132- 'profiler.enable' => function () {
133- return true;
134- },
135-
136- /**
137- * Creates a simplified URL given a standard URL.
138- * Does the following transformations:
139- *
140- * - Remove numeric values after "=" in query string.
141- *
142- * @param string $url
143- * @return string
144- */
145- 'profiler.simple_url' => function($url) {
146- return preg_replace('/=\d+/', '', $url);
147- },
148-
149- /**
150- * Enable this to clean up the url before submitting it to XHGui.
151- * This way it is possible to remove sensitive data or discard any other data from the url or command line.
152- *
153- * The URL argument is the `REQUEST_URI` or `argv` value.
154- *
155- * @param string $url
156- * @return string
157- */
158- 'profiler.replace_url' => function($url) {
159- return str_replace('token', '', $url);
160- },
161- );
162- ```
97+ It includes all configiration optioms and inline documentation about the options.
16398
16499## Savers
165100
0 commit comments