CodeIgniter v4.5 API

InputOutput
in package

Input and Output for CLI.

Table of Contents

Properties

$readlineSupport  : bool
Is the readline library on the system?

Methods

__construct()  : mixed
fwrite()  : void
While the library is intended for use on CLI commands, commands can be called from controllers and elsewhere so we need a way to allow them to still work.
input()  : string
Get input from the shell, using readline or the standard STDIN

Properties

$readlineSupport read-only

Is the readline library on the system?

private bool $readlineSupport

Methods

fwrite()

While the library is intended for use on CLI commands, commands can be called from controllers and elsewhere so we need a way to allow them to still work.

public fwrite(resource $handle, string $string) : void

For now, just echo the content, but look into a better solution down the road.

Parameters
$handle : resource
$string : string

input()

Get input from the shell, using readline or the standard STDIN

public input([string|null $prefix = null ]) : string

Named options must be in the following formats: php index.php user -v --v -name=John --name=John

Parameters
$prefix : string|null = null

You may specify a string with which to prompt the user.

Return values
string

        
On this page

Search results