Yaf_Request_Abstract::isCli
PHP Manual
PHP Manual»Yaf_Request_Abstract»Yaf_Request_Abstract::isCli

Yaf_Request_Abstract::isCli

(Yaf >=1.0.0)

Yaf_Request_Abstract::isCli — Determine if the request is a CLI request

Açıklama

public function Yaf_Request_Abstract::isCli(): bool

Checks whether the request was sent with the CLI method.

Bağımsız Değişkenler

Bu işlevin bağımsız değişkeni yoktur.

Dönen Değerler

Returns true if the request was made on the command line, false otherwise.

Örnekler

Örnek 1 Yaf_Request_Abstract::isCli() example

<?php
// cron.php, executed with "php cron.php" from a crontab
$request = new Yaf_Request_Simple("CLI", "Index", "Cron", "Cleanup");

var_dump($request->isCli());
?>

Yukarıdaki örnek şuna benzer bir çıktı üretir:

bool(true)

Ayrıca Bakınız

To Top