@@ -20,7 +20,7 @@ Using the Finder Component
20
20
21
21
**1. ** If you're creating a new project, create a new empty directory for it.
22
22
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.
24
24
25
25
.. code-block :: terminal
26
26
@@ -43,26 +43,36 @@ the ``vendor/autoload.php`` file that was generated by Composer. This file
43
43
takes care of autoloading all of the libraries so that you can use them
44
44
immediately::
45
45
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
50
58
require_once __DIR__.'/../vendor/autoload.php';
51
59
52
60
use Symfony\Component\Finder\Finder;
53
61
54
62
$finder = new Finder();
55
63
$finder->in('../data/');
56
64
57
- // ...
65
+ // rest of your PHP code ...
58
66
59
67
Now what?
60
68
---------
61
69
62
70
Now, the component is installed and autoloaded. Read the specific component's
63
71
documentation to find out more about how to use it.
72
+ All `Symfony Components `_ are documented here as standalone libraries.
64
73
65
74
And have fun!
66
75
67
76
.. _Composer : https://getcomposer.org
68
77
.. _Install Composer : https://getcomposer.org/download/
78
+ .. _Symfony Components : https://symfony.com/components
0 commit comments