Skip to content

Commit 1038fb8

Browse files
committed
Removed duplicated stuff
1 parent 39e8094 commit 1038fb8

File tree

1 file changed

+2
-85
lines changed

1 file changed

+2
-85
lines changed

book/internals.rst

Lines changed: 2 additions & 85 deletions
Original file line numberDiff line numberDiff line change
@@ -620,91 +620,8 @@ As the profiler adds some overhead, you might want to enable it only under
620620
certain circumstances in the production environment. The ``only-exceptions``
621621
settings limits profiling to 500 pages, but what if you want to get
622622
information when the client IP comes from a specific address, or for a limited
623-
portion of the website? You can use a request matcher:
624-
625-
.. configuration-block::
626-
627-
.. code-block:: yaml
628-
629-
# enables the profiler only for request coming for the 192.168.0.0 network
630-
framework:
631-
profiler:
632-
matcher: { ip: 192.168.0.0/24 }
633-
634-
# enables the profiler only for the /admin URLs
635-
framework:
636-
profiler:
637-
matcher: { path: "^/admin/" }
638-
639-
# combine rules
640-
framework:
641-
profiler:
642-
matcher: { ip: 192.168.0.0/24, path: "^/admin/" }
643-
644-
# use a custom matcher instance defined in the "custom_matcher" service
645-
framework:
646-
profiler:
647-
matcher: { service: custom_matcher }
648-
649-
.. code-block:: xml
650-
651-
<!-- enables the profiler only for request coming for the 192.168.0.0 network -->
652-
<framework:config>
653-
<framework:profiler>
654-
<framework:matcher ip="192.168.0.0/24" />
655-
</framework:profiler>
656-
</framework:config>
657-
658-
<!-- enables the profiler only for the /admin URLs -->
659-
<framework:config>
660-
<framework:profiler>
661-
<framework:matcher path="^/admin/" />
662-
</framework:profiler>
663-
</framework:config>
664-
665-
<!-- combine rules -->
666-
<framework:config>
667-
<framework:profiler>
668-
<framework:matcher ip="192.168.0.0/24" path="^/admin/" />
669-
</framework:profiler>
670-
</framework:config>
671-
672-
<!-- use a custom matcher instance defined in the "custom_matcher" service -->
673-
<framework:config>
674-
<framework:profiler>
675-
<framework:matcher service="custom_matcher" />
676-
</framework:profiler>
677-
</framework:config>
678-
679-
.. code-block:: php
680-
681-
// enables the profiler only for request coming for the 192.168.0.0 network
682-
$container->loadFromExtension('framework', array(
683-
'profiler' => array(
684-
'matcher' => array('ip' => '192.168.0.0/24'),
685-
),
686-
));
687-
688-
// enables the profiler only for the /admin URLs
689-
$container->loadFromExtension('framework', array(
690-
'profiler' => array(
691-
'matcher' => array('path' => '^/admin/'),
692-
),
693-
));
694-
695-
// combine rules
696-
$container->loadFromExtension('framework', array(
697-
'profiler' => array(
698-
'matcher' => array('ip' => '192.168.0.0/24', 'path' => '^/admin/'),
699-
),
700-
));
701-
702-
# use a custom matcher instance defined in the "custom_matcher" service
703-
$container->loadFromExtension('framework', array(
704-
'profiler' => array(
705-
'matcher' => array('service' => 'custom_matcher'),
706-
),
707-
));
623+
portion of the website? You can use a Profiler Matcher, learn more about that
624+
in ":doc:`/cookbook/profiler/matchers`".
708625

709626
Learn more from the Cookbook
710627
----------------------------

0 commit comments

Comments
 (0)