99re热这里只有精品视频,7777色鬼xxxx欧美色妇,国产成人精品一区二三区在线观看,内射爽无广熟女亚洲,精品人妻av一区二区三区

CodeIgniter4 CLI Request Class

2020-08-17 17:56 更新

CLIRequest類

如果請求來自命令行調用,則請求對象實際上是 CLIRequest。它的行為與常規(guī)請求相同, 但為方便起見添加了一些訪問器方法。

其他訪問器

getSegments()

返回被視為路徑一部分的命令行參數(shù)數(shù)組:

// command line: php index.php users 21 profile -foo bar
echo $request->getSegments();  // ['users', '21', 'profile']

getPath()

以字符串形式返回重建的路徑:

// command line: php index.php users 21 profile -foo bar
echo $request->getPath();  // users/21/profile

getOptions()

返回被視為選項的命令行參數(shù)數(shù)組:

// command line: php index.php users 21 profile -foo bar
echo $request->getOptions();  // ['foo' => 'bar']

getOption($which)

返回被視為選項的特定命令行參數(shù)的值:

// command line: php index.php users 21 profile -foo bar
echo $request->getOption('foo');  // bar
echo $request->getOption('notthere'); // NULL

getOptionString()

返回選項的重構的命令行字符串:

// command line: php index.php users 21 profile -foo bar
echo $request->getOptionPath();  // -foo bar
以上內(nèi)容是否對您有幫助:
在線筆記
App下載
App下載

掃描二維碼

下載編程獅App

公眾號
微信公眾號

編程獅公眾號