PHP Class gui\Application

This class is used to manipulate the application
Since: 0.1
Author: Gabriel Couto @gabrielrcouto
Afficher le fichier Open project: gabrielrcouto/php-gui Class Usage Examples

Méthodes publiques

Свойство Type Description
$defaultApplication Application The application object
$process React\ChildProcess\Process The object responsible to manage the lazarus process

Protected Properties

Свойство Type Description
$eventHandlers array The internal array of all callbacks
$loop React\EventLoop\LoopInterface The application loop
$objectId integer The next object ID available
$objects array The internal array of all Components Objects in this application
$receiver Gui\Ipc\Receiver The responsible object to receive the communication messages
$running boolean Defines if the application is running
$sender Gui\Ipc\Sender The responsible object to sent the communication messages
$verboseLevel integer The verbose level
$window Gui\Components\Window The 1st Window of the Application

Méthodes publiques

Méthode Description
__construct ( array $defaultAttributes = [], React\EventLoop\LoopInterface $loop = null ) : void The constructor method
__unset ( $objectId ) : void Unset the object referency from the stack
addObject ( Object $object ) : void Put a object to the internal objects array
alert ( mixed $message, string $title = '' ) : void Shows an alert dialog
destroyObject ( Object $object ) : void Destroy a object
fire ( string $eventName ) : void Fire an application event
getLoop ( ) : React\EventLoop\LoopInterface Get the event loop
getNextObjectId ( ) : integer Returns the next avaible object ID
getObject ( integer $id ) : Object Get a object from the internal objects array
getVerboseLevel ( ) : integer Returns the verbose level
getWindow ( ) : Window Returns the 1st Window of the Application
on ( string $eventName, callable $eventHandler ) : void Returns the next avaible object ID
ping ( ) : float Returns the communication time between php and lazarus
run ( ) : void Runs the application
sendCommand ( string $method, array $params, callable $callback ) : void Send a command
sendEvent ( string $method, array $params ) : void Send an event
setVerboseLevel ( integer $verboseLevel ) : void Set the verbose level
waitCommand ( string $method, array $params ) : mixed Send a command and wait the return

Method Details

__construct() public méthode

The constructor method
public __construct ( array $defaultAttributes = [], React\EventLoop\LoopInterface $loop = null ) : void
$defaultAttributes array
$loop React\EventLoop\LoopInterface
Résultat void

__unset() public méthode

Unset the object referency from the stack
public __unset ( $objectId ) : void
$objectId
Résultat void

addObject() public méthode

Put a object to the internal objects array
public addObject ( Object $object ) : void
$object Gui\Components\Object Component Object
Résultat void

alert() public méthode

Shows an alert dialog
public alert ( mixed $message, string $title = '' ) : void
$message mixed Array or String message to display
$title string Title of the alert
Résultat void

destroyObject() public méthode

Destroy a object
public destroyObject ( Object $object ) : void
$object Gui\Components\Object Component Object
Résultat void

fire() public méthode

Fire an application event
public fire ( string $eventName ) : void
$eventName string Event Name
Résultat void

getLoop() public méthode

Get the event loop
public getLoop ( ) : React\EventLoop\LoopInterface
Résultat React\EventLoop\LoopInterface

getNextObjectId() public méthode

Returns the next avaible object ID
public getNextObjectId ( ) : integer
Résultat integer

getObject() public méthode

Get a object from the internal objects array
public getObject ( integer $id ) : Object
$id integer Object ID
Résultat Gui\Components\Object

getVerboseLevel() public méthode

Returns the verbose level
public getVerboseLevel ( ) : integer
Résultat integer

getWindow() public méthode

Returns the 1st Window of the Application
public getWindow ( ) : Window
Résultat Gui\Components\Window

on() public méthode

Returns the next avaible object ID
public on ( string $eventName, callable $eventHandler ) : void
$eventName string the name of the event
$eventHandler callable the callback
Résultat void

ping() public méthode

Returns the communication time between php and lazarus
public ping ( ) : float
Résultat float

run() public méthode

Runs the application
public run ( ) : void
Résultat void

sendCommand() public méthode

Send a command
public sendCommand ( string $method, array $params, callable $callback ) : void
$method string the method name
$params array the method params
$callback callable the callback
Résultat void

sendEvent() public méthode

Send an event
public sendEvent ( string $method, array $params ) : void
$method string the method name
$params array the method params
Résultat void

setVerboseLevel() public méthode

Set the verbose level
public setVerboseLevel ( integer $verboseLevel ) : void
$verboseLevel integer
Résultat void

waitCommand() public méthode

Send a command and wait the return
public waitCommand ( string $method, array $params ) : mixed
$method string the method name
$params array the method params
Résultat mixed

Property Details

$defaultApplication public_oe static_oe property

The application object
public static Application,gui $defaultApplication
Résultat Application

$eventHandlers protected_oe property

The internal array of all callbacks
protected array $eventHandlers
Résultat array

$loop protected_oe property

The application loop
protected LoopInterface,React\EventLoop $loop
Résultat React\EventLoop\LoopInterface

$objectId protected_oe property

The next object ID available
protected int $objectId
Résultat integer

$objects protected_oe property

The internal array of all Components Objects in this application
protected array $objects
Résultat array

$process public_oe property

The object responsible to manage the lazarus process
public Process,React\ChildProcess $process
Résultat React\ChildProcess\Process

$receiver protected_oe property

The responsible object to receive the communication messages
protected Receiver,Gui\Ipc $receiver
Résultat Gui\Ipc\Receiver

$running protected_oe property

Defines if the application is running
protected bool $running
Résultat boolean

$sender protected_oe property

The responsible object to sent the communication messages
protected Sender,Gui\Ipc $sender
Résultat Gui\Ipc\Sender

$verboseLevel protected_oe property

The verbose level
protected int $verboseLevel
Résultat integer

$window protected_oe property

The 1st Window of the Application
protected Window,Gui\Components $window
Résultat Gui\Components\Window