PHP 클래스 gui\Application

This class is used to manipulate the application
부터: 0.1
저자: Gabriel Couto @gabrielrcouto
파일 보기 프로젝트 열기: gabrielrcouto/php-gui 1 사용 예제들

공개 프로퍼티들

프로퍼티 타입 설명
$defaultApplication Application The application object
$process React\ChildProcess\Process The object responsible to manage the lazarus process

보호된 프로퍼티들

프로퍼티 타입 설명
$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