pai
Static Public Member Functions | List of all members
hellsh\pai Class Reference

Static Public Member Functions

static init ()
 
static isInitialized ()
 
static isWindows ()
 
static hasLine ()
 
static getLine ()
 
static awaitLine ()
 

Member Function Documentation

◆ awaitLine()

static hellsh\pai::awaitLine ( )
static

Waits until the user has submitted a line and then returns it.

Since
2.1
Exceptions
BadMethodCallExceptionif pai is not initialized
See also
pai::init()
Returns
string

◆ getLine()

static hellsh\pai::getLine ( )
static

Returns the line of text the user has submitted or null if they haven't.

Exceptions
BadMethodCallExceptionif pai is not initialized
See also
pai::init()
Returns
string|null

◆ hasLine()

static hellsh\pai::hasLine ( )
static

Returns true if the user has submitted a line of text.

Exceptions
BadMethodCallExceptionif pai is not initialized
See also
pai::init()
Returns
boolean

◆ init()

static hellsh\pai::init ( )
static

Initializes pai's input handling. After this, STDIN is in pai's hands, and there's no way out.

Exceptions
BadMethodCallExceptionif pai is already initialized.

◆ isInitialized()

static hellsh\pai::isInitialized ( )
static

Returns true if pai is already initialized.

Since
2.1
Returns
bool

◆ isWindows()

static hellsh\pai::isWindows ( )
static

Returns true if the code is running on a Windows machine.

Returns
boolean