Skip to content

Commit 1e08e69

Browse files
authored
Merge pull request #5985 from kenjis/fix-docs-cli_request.rst
docs: improve cli_request.rst
2 parents 67a3fad + 114eae0 commit 1e08e69

File tree

3 files changed

+12
-7
lines changed

3 files changed

+12
-7
lines changed

user_guide_src/source/cli/cli_request.rst

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -10,31 +10,36 @@ but adds some accessor methods for convenience.
1010
Additional Accessors
1111
====================
1212

13-
**getSegments()**
13+
getSegments()
14+
-------------
1415

1516
Returns an array of the command line arguments deemed to be part of a path:
1617

1718
.. literalinclude:: cli_request/001.php
1819

19-
**getPath()**
20+
getPath()
21+
---------
2022

2123
Returns the reconstructed path as a string:
2224

2325
.. literalinclude:: cli_request/002.php
2426

25-
**getOptions()**
27+
getOptions()
28+
------------
2629

2730
Returns an array of the command line arguments deemed to be options:
2831

2932
.. literalinclude:: cli_request/003.php
3033

31-
**getOption($which)**
34+
getOption($which)
35+
-----------------
3236

3337
Returns the value of a specific command line argument deemed to be an option:
3438

3539
.. literalinclude:: cli_request/004.php
3640

37-
**getOptionString()**
41+
getOptionString()
42+
-----------------
3843

3944
Returns the reconstructed command line string for the options:
4045

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<?php
22

33
// command line: php index.php users 21 profile --foo bar
4-
echo $request->getOption('foo'); // bar
4+
echo $request->getOption('foo'); // bar
55
echo $request->getOption('notthere'); // null
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<?php
22

33
// php index.php user 21 --foo bar -f
4-
echo $request->getOptionString(); // -foo bar -f
4+
echo $request->getOptionString(); // -foo bar -f
55
echo $request->getOptionString(true); // --foo bar -f

0 commit comments

Comments
 (0)