Phue\Command\GetLights::send PHP Method

send() public method

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