File tree Expand file tree Collapse file tree 2 files changed +19
-6
lines changed Expand file tree Collapse file tree 2 files changed +19
-6
lines changed Original file line number Diff line number Diff line change @@ -20,7 +20,7 @@ Using the Finder Component
2020
2121**1. ** If you're creating a new project, create a new empty directory for it.
2222
23- **2. ** Open a terminal and use Composer to grab the library.
23+ **2. ** Open a terminal, step into this directory and use Composer to grab the library.
2424
2525.. code-block :: terminal
2626
@@ -43,18 +43,26 @@ the ``vendor/autoload.php`` file that was generated by Composer. This file
4343takes care of autoloading all of the libraries so that you can use them
4444immediately::
4545
46- // File example: src/script.php
47-
48- // update this to the path to the "vendor/"
49- // directory, relative to this file
46+ // Project structure example:
47+ // my_project/
48+ // data/
49+ // ... # Some project data
50+ // src/
51+ // my_script.php # Main entry point
52+ // vendor/
53+ // autoload.php # Autoloader generated by Composer
54+ // ... # Packages downloaded by Composer
55+
56+ // File example: src/my_script.php
57+ // Autoloader relative path to this PHP file
5058 require_once __DIR__.'/../vendor/autoload.php';
5159
5260 use Symfony\Component\Finder\Finder;
5361
5462 $finder = new Finder();
5563 $finder->in('../data/');
5664
57- // ...
65+ // rest of your PHP code ...
5866
5967Now what?
6068---------
Original file line number Diff line number Diff line change @@ -74,6 +74,11 @@ as the value to the current URL:
7474
7575 http://example.com/somewhere?_switch_user=thomas
7676
77+ .. tip ::
78+
79+ Instead of adding a ``_switch_user `` query string parameter, you can pass
80+ the username in a ``HTTP_X_SWITCH_USER `` header.
81+
7782To switch back to the original user, use the special ``_exit `` username:
7883
7984.. code-block :: text
You can’t perform that action at this time.
0 commit comments