Phue\Command\GetGroups::send PHP Method

send() public method

Send command
public send ( Client $client ) : Group[]
$client Phue\Client Phue Client
return Phue\Group[] List of Group objects
    public function send(Client $client)
    {
        // Get response
        $results = $client->getTransport()->sendRequest("/api/{$client->getUsername()}/groups");
        $groups = array();
        foreach ($results as $groupId => $attributes) {
            $groups[$groupId] = new Group($groupId, $attributes, $client);
        }
        return $groups;
    }
GetGroups