Phue\Command\GetSensors::send PHP Method

send() public method

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