sendEvent() public method

Send an event
public sendEvent ( string $method, array $params ) : void
$method string the method name
$params array the method params
return void
Example #1
0
 /**
  * This method is used to send an object command/envent to lazarus
  *
  * @param string $method
  * @param array $params
  * @param boolean $isCommand
  *
  * @return void
  */
 protected function call($method, array $params, $isCommand = true)
 {
     if ($isCommand) {
         // It's a command
         $this->application->sendCommand('callObjectMethod', [$this->lazarusObjectId, $method, $params], function ($result) {
             // Ok, the property changed
         });
         return;
     }
     // It's a event
     $this->application->sendEvent('callObjectMethod', [$this->lazarusObjectId, $method, $params]);
 }