@@ -5,21 +5,20 @@ Changing the Default Behavior
5
5
=============================
6
6
7
7
When building a command line tool, you may need to customize it to fit your needs.
8
- Probably you want to change the Default Command that the Application runs or
9
- maybe you just want to run a Single Command instead of have to pass the command
10
- name each time. Fortunately it is possible to do both.
8
+ Probably you want to change the default command that the Application runs or
9
+ maybe you just want to run a single command instead of have to pass the command
10
+ name each time. Fortunately, it is possible to do both.
11
11
12
12
Changing the Default Command
13
13
----------------------------
14
14
15
15
.. versionadded :: 2.5,
16
- The :method: `Symfony\\ Component\\ Console\\ Application::setDefaultCommand `
17
- method was introduced in version 2.5
16
+ The :method: `Symfony\\ Component\\ Console\\ Application::setDefaultCommand `
17
+ method was introduced in version 2.5.
18
18
19
19
By default the Application will always run the ListCommand. In order to change
20
20
the default command you just need to pass the command name you want to run by
21
- default to the :method: `Symfony\\ Component\\ Console\\ Application::setDefaultCommand `
22
- method::
21
+ default to the ``setDefaultCommand `` method::
23
22
24
23
#!/usr/bin/env php
25
24
<?php
@@ -103,10 +102,10 @@ it is possible to remove this need by extending the application::
103
102
}
104
103
}
105
104
106
- When calling your console script, the command ``MyCommand `` will then always
105
+ When calling your console script, the ``MyCommand `` command will then always
107
106
be used, without having to pass its name.
108
107
109
- You can also simplify how you execute the application ::
108
+ Executing the application can also be simplified ::
110
109
111
110
#!/usr/bin/env php
112
111
<?php
0 commit comments