public function getEvents($app, $subscribeAll = false)
    {
        $uri = 'events';
        $response = $this->client->getEndpoint()->get($uri, [
            'form_params' => [
                'app' => $app,
                'subscribeAll' => $subscribeAll,
            ]
        ]);

        $events = [];
        foreach (\GuzzleHttp\json_decode($response->getBody()) as $event) {
            $events[] = new Event($this->client, $event);
        }

        return $events;
    }
public function getEvents($app, $subscribeAll = false)
    {
        $uri = 'events';
        $response = $this->client->getEndpoint()->get($uri, [
            'form_params' => [
                'app' => $app,
                'subscribeAll' => $subscribeAll,
            ]
        ]);

        $events = [];
        foreach (\GuzzleHttp\json_decode($response->getBody()) as $event) {
            $events[] = new Event($this->client, $event);
        }

        return $events;
    }
public function getEvents ( $ app , $ subscribeAll = false ) { $ uri = 'events' ; $ response = $ this -> client -> getEndpoint ( ) -> get ( $ uri , [ 'form_params' => [ 'app' => $ app , 'subscribeAll' => $ subscribeAll , ] ] ) ; $ events = [ ] ; foreach ( \ GuzzleHttp \ json_decode ( $ response -> getBody ( ) ) as $ event ) { $ events [ ] = new Event ( $ this -> client , $ event ) ; } return $ events ; }
WebSocket connection for events.

@param string $app (required) Applications to subscribe to.  Allows comma separated values.
@param boolean $subscribeAll Subscribe to all Asterisk events. If provided, the applications listed will be subscribed to all events, effectively disabling the application specific subscriptions. Default is 'false'.
@return EventInterface[]
WebSocket connection for events .