class Shell (View source)

Methods

void
__construct()

Create a Shell instance for use CLI interface

array
arguments()

Get arguments

bool
hasArgs()

Check if using arguments

static bool
isCli()

Check if script is executed in CLI

static string|bool
input(int $length = 0)

Get input data

bool
observer(callable $callback)

Add callback event to input

Details

void __construct()

Create a Shell instance for use CLI interface

Return Value

void

array arguments()

Get arguments

Return Value

array

bool hasArgs()

Check if using arguments

Return Value

bool

static bool isCli()

Check if script is executed in CLI

Return Value

bool

static string|bool input(int $length = 0)

Get input data

Parameters

int $length

Return Value

string|bool

bool observer(callable $callback)

Add callback event to input

Parameters

callable $callback

Return Value

bool