PHP Class Gui\Components\Object

It is base abstraction for Lazarus Object
Since: 0.1
Author: Gabriel Couto @gabrielrcouto
Inheritance: implements Gui\Components\LazarusObjectInterface
Show file Open project: gabrielrcouto/php-gui Class Usage Examples

Protected Properties

Property Type Description
$application gui\Application The application object
$eventHandlers array The array of callbacks
$lazarusClass string The lazarus class as string
$lazarusObjectId integer The communication object id
$runTimeProperties array The array of special properties

Public Methods

Method Description
__call ( string $method, array $params ) : self | mixed The special method used to do the getters/setters for special properties
__construct ( array $defaultAttributes = [], Gui\Components\ContainerObjectInterface $parent = null, Application $application = null ) : void The constructor
fire ( $eventName )
getLazarusClass ( )
getLazarusObjectId ( )
on ( $eventName, callable $eventHandler )

Protected Methods

Method Description
call ( string $method, array $params, boolean $isCommand = true ) : void This method is used to send an object command/envent to lazarus
get ( string $name ) : mixed This magic method is used to send the IPC message when a property is get
set ( string $name, mixed $value ) : void this method is used to send the IPC message when a property is set

Method Details

__call() public method

The special method used to do the getters/setters for special properties
public __call ( string $method, array $params ) : self | mixed
$method string
$params array
return self | mixed

__construct() public method

The constructor
public __construct ( array $defaultAttributes = [], Gui\Components\ContainerObjectInterface $parent = null, Application $application = null ) : void
$defaultAttributes array
$parent Gui\Components\ContainerObjectInterface
$application gui\Application
return void

call() protected method

This method is used to send an object command/envent to lazarus
protected call ( string $method, array $params, boolean $isCommand = true ) : void
$method string
$params array
$isCommand boolean
return void

fire() public method

public fire ( $eventName )

get() protected method

This magic method is used to send the IPC message when a property is get
protected get ( string $name ) : mixed
$name string Property name
return mixed

getLazarusClass() public method

public getLazarusClass ( )

getLazarusObjectId() public method

public getLazarusObjectId ( )

on() public method

public on ( $eventName, callable $eventHandler )
$eventHandler callable

set() protected method

this method is used to send the IPC message when a property is set
protected set ( string $name, mixed $value ) : void
$name string Property name
$value mixed Property value
return void

Property Details

$application protected property

The application object
protected Application,Gui $application
return gui\Application

$eventHandlers protected property

The array of callbacks
protected array $eventHandlers
return array

$lazarusClass protected property

The lazarus class as string
protected string $lazarusClass
return string

$lazarusObjectId protected property

The communication object id
protected int $lazarusObjectId
return integer

$runTimeProperties protected property

The array of special properties
protected array $runTimeProperties
return array