diff --git a/README.md b/README.md new file mode 100644 index 000000000..c5380a0f5 --- /dev/null +++ b/README.md @@ -0,0 +1,11 @@ +# InfluxDB PHP SDK +Send message to InfluxDB. + +```php +$client = new \InfluxDB\Client(); +$client->setAdapter(new \InfluxDB\Adapter\UdpAdapter()); +$client->mark("search", [ + "query" => "php" +]); +``` + diff --git a/spec/InfluxDB/Adapter/UdpSpec.php b/spec/InfluxDB/Adapter/UdpAdapterSpec.php similarity index 76% rename from spec/InfluxDB/Adapter/UdpSpec.php rename to spec/InfluxDB/Adapter/UdpAdapterSpec.php index 9f3c9f08a..1e65698b9 100644 --- a/spec/InfluxDB/Adapter/UdpSpec.php +++ b/spec/InfluxDB/Adapter/UdpAdapterSpec.php @@ -5,7 +5,7 @@ namespace spec\InfluxDB\Adapter; use PhpSpec\ObjectBehavior; use Prophecy\Argument; -class UdpSpec extends ObjectBehavior +class UdpAdapterSpec extends ObjectBehavior { function let() { @@ -14,7 +14,7 @@ class UdpSpec extends ObjectBehavior function it_is_initializable() { - $this->shouldHaveType('InfluxDB\Adapter\Udp'); + $this->shouldHaveType('InfluxDB\Adapter\UdpAdapter'); } function it_should_implement_adapter_interface() diff --git a/src/InfluxDB/Adapter/Udp.php b/src/InfluxDB/Adapter/UdpAdapter.php similarity index 95% rename from src/InfluxDB/Adapter/Udp.php rename to src/InfluxDB/Adapter/UdpAdapter.php index 5afd301fc..661e2e064 100644 --- a/src/InfluxDB/Adapter/Udp.php +++ b/src/InfluxDB/Adapter/UdpAdapter.php @@ -2,7 +2,7 @@ namespace InfluxDB\Adapter; -class Udp implements AdapterInterface +class UdpAdapter implements AdapterInterface { private $host; private $port;