public detect ( string $flag, mixed $detector = null ) : void | ||
$flag | string | The name of the detector check. Used in subsequent calls to `Request::is()`. |
$detector | mixed | Detectors can be specified in four different ways: - The name of an HTTP header or environment variable. If a string, calling the detector will check that the header or environment variable exists and is set to a non-empty value. - A two-element array containing a header/environment variable name, and a value to match against. The second element of the array must be an exact match to the header or variable value. - A two-element array containing a header/environment variable name, and a regular expression that matches against the value, as in the example above. - A closure which accepts an instance of the `Request` object and returns a boolean value. |
리턴 | void |