mirror of
https://github.com/librenms/librenms.git
synced 2024-10-07 16:52:45 +00:00
Changed namespace to \\InfluxDB
This commit is contained in:
@@ -12,7 +12,7 @@ Initialize a new client object:
|
||||
|
||||
```php
|
||||
|
||||
$client = new Leaseweb\InfluxDB\Client($host, $port);
|
||||
$client = new InfluxDB\Client($host, $port);
|
||||
|
||||
|
||||
```
|
||||
|
||||
@@ -22,12 +22,12 @@
|
||||
},
|
||||
"autoload": {
|
||||
"psr-4" : {
|
||||
"Leaseweb\\InfluxDB\\": "src/Leaseweb/InfluxDB"
|
||||
"InfluxDB\\": "src/InfluxDB"
|
||||
}
|
||||
},
|
||||
"autoload-dev": {
|
||||
"psr-4": {
|
||||
"Leaseweb\\InfluxDB\\Test\\": "tests"
|
||||
"InfluxDB\\Test\\": "tests"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
2
composer.lock
generated
2
composer.lock
generated
@@ -4,7 +4,7 @@
|
||||
"Read more about it at http://getcomposer.org/doc/01-basic-usage.md#composer-lock-the-lock-file",
|
||||
"This file is @generated automatically"
|
||||
],
|
||||
"hash": "d4cd96b7a6d552bb16ed5847dd32d4e3",
|
||||
"hash": "ef84333e4b0fdb96255d8f56a4d42e3b",
|
||||
"packages": [
|
||||
{
|
||||
"name": "guzzlehttp/guzzle",
|
||||
|
||||
@@ -3,16 +3,16 @@
|
||||
* @author Stephen "TheCodeAssassin" Hoogendijk
|
||||
*/
|
||||
|
||||
namespace Leaseweb\InfluxDB;
|
||||
namespace InfluxDB;
|
||||
|
||||
|
||||
use GuzzleHttp\Client as httpClient;
|
||||
use Leaseweb\InfluxDB\Client\Exception as ClientException;
|
||||
use InfluxDB\Client\Exception as ClientException;
|
||||
|
||||
/**
|
||||
* Class Client
|
||||
*
|
||||
* @package Leaseweb\InfluxDB
|
||||
* @package InfluxDB
|
||||
*/
|
||||
class Client
|
||||
{
|
||||
13
src/InfluxDB/Client/Exception.php
Normal file
13
src/InfluxDB/Client/Exception.php
Normal file
@@ -0,0 +1,13 @@
|
||||
<?php
|
||||
|
||||
namespace InfluxDB\Client;
|
||||
|
||||
/**
|
||||
* Class Exception
|
||||
*
|
||||
* @package InfluxDB\Client
|
||||
*/
|
||||
class Exception extends \InfluxDB\Exception
|
||||
{
|
||||
|
||||
}
|
||||
@@ -3,18 +3,18 @@
|
||||
* @author Stephen "TheCodeAssassin" Hoogendijk
|
||||
*/
|
||||
|
||||
namespace Leaseweb\InfluxDB;
|
||||
namespace InfluxDB;
|
||||
|
||||
use Leaseweb\InfluxDB\Database\RetentionPolicy;
|
||||
use Leaseweb\InfluxDB\Query\Builder as QueryBuilder;
|
||||
use Leaseweb\InfluxDB\Database\Exception as DatabaseException;
|
||||
use InfluxDB\Database\RetentionPolicy;
|
||||
use InfluxDB\Query\Builder as QueryBuilder;
|
||||
use InfluxDB\Database\Exception as DatabaseException;
|
||||
|
||||
/**
|
||||
* Class Database
|
||||
*
|
||||
* @todo admin functionality
|
||||
*
|
||||
* @package Leaseweb\InfluxDB
|
||||
* @package InfluxDB
|
||||
*/
|
||||
class Database
|
||||
{
|
||||
12
src/InfluxDB/Database/Exception.php
Normal file
12
src/InfluxDB/Database/Exception.php
Normal file
@@ -0,0 +1,12 @@
|
||||
<?php
|
||||
/**
|
||||
* @author Stephen "TheCodeAssassin" Hoogendijk
|
||||
*/
|
||||
|
||||
namespace InfluxDB\Database;
|
||||
|
||||
|
||||
class Exception extends \InfluxDB\Exception
|
||||
{
|
||||
|
||||
}
|
||||
@@ -3,12 +3,12 @@
|
||||
* @author Stephen "TheCodeAssassin" Hoogendijk
|
||||
*/
|
||||
|
||||
namespace Leaseweb\InfluxDB\Database;
|
||||
namespace InfluxDB\Database;
|
||||
|
||||
/**
|
||||
* Class RetentionPolicy
|
||||
*
|
||||
* @package Leaseweb\InfluxDB\Database
|
||||
* @package InfluxDB\Database
|
||||
*/
|
||||
class RetentionPolicy
|
||||
{
|
||||
@@ -3,7 +3,7 @@
|
||||
* @author Stephen "TheCodeAssassin" Hoogendijk
|
||||
*/
|
||||
|
||||
namespace Leaseweb\InfluxDB;
|
||||
namespace InfluxDB;
|
||||
|
||||
|
||||
class Exception extends \Exception
|
||||
@@ -1,11 +1,11 @@
|
||||
<?php
|
||||
|
||||
namespace Leaseweb\InfluxDB;
|
||||
namespace InfluxDB;
|
||||
|
||||
/**
|
||||
* Class Point
|
||||
*
|
||||
* @package Leaseweb\InfluxDB
|
||||
* @package InfluxDB
|
||||
*/
|
||||
class Point
|
||||
{
|
||||
@@ -3,10 +3,10 @@
|
||||
* @author Stephen "TheCodeAssassin" Hoogendijk <s.hoogendijk@tech.leaseweb.com>
|
||||
*/
|
||||
|
||||
namespace Leaseweb\InfluxDB\Query;
|
||||
namespace InfluxDB\Query;
|
||||
|
||||
use Leaseweb\InfluxDB\Database;
|
||||
use Leaseweb\InfluxDB\ResultSet;
|
||||
use InfluxDB\Database;
|
||||
use InfluxDB\ResultSet;
|
||||
|
||||
/**
|
||||
* Class Builder
|
||||
@@ -20,7 +20,7 @@ use Leaseweb\InfluxDB\ResultSet;
|
||||
*
|
||||
* $series->select('*')->from('*')->getResult();
|
||||
*
|
||||
* @package Leaseweb\InfluxDB\Query
|
||||
* @package InfluxDB\Query
|
||||
*/
|
||||
class Builder
|
||||
{
|
||||
12
src/InfluxDB/Query/Exception.php
Normal file
12
src/InfluxDB/Query/Exception.php
Normal file
@@ -0,0 +1,12 @@
|
||||
<?php
|
||||
/**
|
||||
* @author Stephen "TheCodeAssassin" Hoogendijk
|
||||
*/
|
||||
|
||||
namespace InfluxDB\Query;
|
||||
|
||||
|
||||
class Exception extends \InfluxDB\Exception
|
||||
{
|
||||
|
||||
}
|
||||
@@ -3,14 +3,14 @@
|
||||
* @author Stephen "TheCodeAssassin" Hoogendijk
|
||||
*/
|
||||
|
||||
namespace Leaseweb\InfluxDB;
|
||||
namespace InfluxDB;
|
||||
|
||||
use Leaseweb\InfluxDB\Client\Exception as ClientException;
|
||||
use InfluxDB\Client\Exception as ClientException;
|
||||
|
||||
/**
|
||||
* Class ResultSet
|
||||
*
|
||||
* @package Leaseweb\InfluxDB
|
||||
* @package InfluxDB
|
||||
*/
|
||||
class ResultSet
|
||||
{
|
||||
@@ -1,13 +0,0 @@
|
||||
<?php
|
||||
|
||||
namespace Leaseweb\InfluxDB\Client;
|
||||
|
||||
/**
|
||||
* Class Exception
|
||||
*
|
||||
* @package Leaseweb\InfluxDB\Client
|
||||
*/
|
||||
class Exception extends \Leaseweb\InfluxDB\Exception
|
||||
{
|
||||
|
||||
}
|
||||
@@ -1,12 +0,0 @@
|
||||
<?php
|
||||
/**
|
||||
* @author Stephen "TheCodeAssassin" Hoogendijk
|
||||
*/
|
||||
|
||||
namespace Leaseweb\InfluxDB\Database;
|
||||
|
||||
|
||||
class Exception extends \Leaseweb\InfluxDB\Exception
|
||||
{
|
||||
|
||||
}
|
||||
@@ -1,12 +0,0 @@
|
||||
<?php
|
||||
/**
|
||||
* @author Stephen "TheCodeAssassin" Hoogendijk
|
||||
*/
|
||||
|
||||
namespace Leaseweb\InfluxDB\Query;
|
||||
|
||||
|
||||
class Exception extends \Leaseweb\InfluxDB\Exception
|
||||
{
|
||||
|
||||
}
|
||||
@@ -1,8 +1,8 @@
|
||||
<?php
|
||||
|
||||
namespace Leaseweb\InfluxDB\Test;
|
||||
namespace InfluxDB\Test;
|
||||
|
||||
use Leaseweb\InfluxDB\Client;
|
||||
use InfluxDB\Client;
|
||||
|
||||
class ClientTest extends \PHPUnit_Framework_TestCase
|
||||
{
|
||||
|
||||
@@ -1,11 +1,11 @@
|
||||
<?php
|
||||
|
||||
namespace Leaseweb\InfluxDB\Test;
|
||||
namespace InfluxDB\Test;
|
||||
|
||||
|
||||
use Leaseweb\InfluxDB\Client;
|
||||
use Leaseweb\InfluxDB\Database;
|
||||
use Leaseweb\InfluxDB\Point;
|
||||
use InfluxDB\Client;
|
||||
use InfluxDB\Database;
|
||||
use InfluxDB\Point;
|
||||
|
||||
class DatabaseTest extends \PHPUnit_Framework_TestCase
|
||||
{
|
||||
@@ -20,7 +20,7 @@ class DatabaseTest extends \PHPUnit_Framework_TestCase
|
||||
|
||||
public function setUp()
|
||||
{
|
||||
$this->mockClient = $this->getMockBuilder('\Leaseweb\InfluxDB\Client')
|
||||
$this->mockClient = $this->getMockBuilder('\InfluxDB\Client')
|
||||
->disableOriginalConstructor()
|
||||
->getMock();
|
||||
|
||||
|
||||
@@ -6,10 +6,10 @@
|
||||
* Time: 17:39
|
||||
*/
|
||||
|
||||
namespace Leaseweb\InfluxDB\Test;
|
||||
namespace InfluxDB\Test;
|
||||
|
||||
|
||||
use Leaseweb\InfluxDB\Point;
|
||||
use InfluxDB\Point;
|
||||
|
||||
class PointTest extends \PHPUnit_Framework_TestCase
|
||||
{
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
<?php
|
||||
namespace Leaseweb\InfluxDB\Test;
|
||||
namespace InfluxDB\Test;
|
||||
|
||||
use Leaseweb\InfluxDB\ResultSet;
|
||||
use InfluxDB\ResultSet;
|
||||
|
||||
class ResultSetTest extends \PHPUnit_Framework_TestCase
|
||||
{
|
||||
@@ -26,7 +26,7 @@ class ResultSetTest extends \PHPUnit_Framework_TestCase
|
||||
|
||||
/**
|
||||
* Throws Exception if something went wrong with influxDB
|
||||
* @expectedException \Leaseweb\InfluxDB\Exception
|
||||
* @expectedException \InfluxDB\Exception
|
||||
*/
|
||||
public function testThrowsInfluxDBException()
|
||||
{
|
||||
@@ -42,7 +42,7 @@ EOD;
|
||||
|
||||
/**
|
||||
* Throws Exception if something went wrong with influxDB after processing the query
|
||||
* @expectedException \Leaseweb\InfluxDB\Exception
|
||||
* @expectedException \InfluxDB\Exception
|
||||
*/
|
||||
public function testThrowsInfluxDBExceptionIfAnyErrorInSeries()
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user