PHP Класс gui\Application

This class is used to manipulate the application
С версии: 0.1
Автор: Gabriel Couto @gabrielrcouto
Показать файл Открыть проект Примеры использования класса

Открытые свойства

Свойство Тип Описание
$defaultApplication Application The application object
$process React\ChildProcess\Process The object responsible to manage the lazarus process

Защищенные свойства (Protected)

Свойство Тип Описание
$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

Открытые методы

Метод Описание
__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

Описание методов

__construct() публичный метод

The constructor method
public __construct ( array $defaultAttributes = [], React\EventLoop\LoopInterface $loop = null ) : void
$defaultAttributes array
$loop React\EventLoop\LoopInterface
Результат void

__unset() публичный метод

Unset the object referency from the stack
public __unset ( $objectId ) : void
$objectId
Результат void

addObject() публичный метод

Put a object to the internal objects array
public addObject ( Object $object ) : void
$object Gui\Components\Object Component Object
Результат void

alert() публичный метод

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
Результат void

destroyObject() публичный метод

Destroy a object
public destroyObject ( Object $object ) : void
$object Gui\Components\Object Component Object
Результат void

fire() публичный метод

Fire an application event
public fire ( string $eventName ) : void
$eventName string Event Name
Результат void

getLoop() публичный метод

Get the event loop
public getLoop ( ) : React\EventLoop\LoopInterface
Результат React\EventLoop\LoopInterface

getNextObjectId() публичный метод

Returns the next avaible object ID
public getNextObjectId ( ) : integer
Результат integer

getObject() публичный метод

Get a object from the internal objects array
public getObject ( integer $id ) : Object
$id integer Object ID
Результат Gui\Components\Object

getVerboseLevel() публичный метод

Returns the verbose level
public getVerboseLevel ( ) : integer
Результат integer

getWindow() публичный метод

Returns the 1st Window of the Application
public getWindow ( ) : Window
Результат Gui\Components\Window

on() публичный метод

Returns the next avaible object ID
public on ( string $eventName, callable $eventHandler ) : void
$eventName string the name of the event
$eventHandler callable the callback
Результат void

ping() публичный метод

Returns the communication time between php and lazarus
public ping ( ) : float
Результат float

run() публичный метод

Runs the application
public run ( ) : void
Результат void

sendCommand() публичный метод

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
Результат void

sendEvent() публичный метод

Send an event
public sendEvent ( string $method, array $params ) : void
$method string the method name
$params array the method params
Результат void

setVerboseLevel() публичный метод

Set the verbose level
public setVerboseLevel ( integer $verboseLevel ) : void
$verboseLevel integer
Результат void

waitCommand() публичный метод

Send a command and wait the return
public waitCommand ( string $method, array $params ) : mixed
$method string the method name
$params array the method params
Результат mixed

Описание свойств

$defaultApplication публичное статическое свойство

The application object
public static Application,gui $defaultApplication
Результат Application

$eventHandlers защищенное свойство

The internal array of all callbacks
protected array $eventHandlers
Результат array

$loop защищенное свойство

The application loop
protected LoopInterface,React\EventLoop $loop
Результат React\EventLoop\LoopInterface

$objectId защищенное свойство

The next object ID available
protected int $objectId
Результат integer

$objects защищенное свойство

The internal array of all Components Objects in this application
protected array $objects
Результат array

$process публичное свойство

The object responsible to manage the lazarus process
public Process,React\ChildProcess $process
Результат React\ChildProcess\Process

$receiver защищенное свойство

The responsible object to receive the communication messages
protected Receiver,Gui\Ipc $receiver
Результат Gui\Ipc\Receiver

$running защищенное свойство

Defines if the application is running
protected bool $running
Результат boolean

$sender защищенное свойство

The responsible object to sent the communication messages
protected Sender,Gui\Ipc $sender
Результат Gui\Ipc\Sender

$verboseLevel защищенное свойство

The verbose level
protected int $verboseLevel
Результат integer

$window защищенное свойство

The 1st Window of the Application
protected Window,Gui\Components $window
Результат Gui\Components\Window