/** * 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]); }