Compare commits

...

2 Commits

Author SHA1 Message Date
Erik Slooff
cd24ef1c2c updated examples to use the composer autoloader 2017-09-05 13:04:11 +02:00
Erik Slooff
e4d368cc72 fixed typo in composer.json 2017-09-05 12:58:51 +02:00
12 changed files with 57 additions and 1 deletions

View File

@@ -122,6 +122,12 @@ A basic example how to use the class:
```php
...
/**
* load the class using the composer autoloader
*/
require "vendor/autoload.php";
/**
* initialize the Unifi API connection class, log in to the controller and request the alarms collection
* (this example assumes you have already assigned the correct values to the variables used)

View File

@@ -25,7 +25,7 @@
},
"autoload": {
"psr-4": {
"UniFi-API\\": "src/"
"UniFi_API\\": "src/"
}
}
}

View File

@@ -6,6 +6,11 @@
* description: example basic PHP script to fetch an Access Point's scanning state/results
*/
/**
* using the composer autoloader
*/
require "vendor/autoload.php";
/**
* include the config file (place your credentials etc. there if not already present)
* see the config.template.php file for an example

View File

@@ -6,6 +6,11 @@
* description: example basic PHP script to perform a basic auth of a guest device
*/
/**
* using the composer autoloader
*/
require "vendor/autoload.php";
/**
* include the config file (place your credentials etc. there if not already present)
* see the config.template.php file for an example

View File

@@ -6,6 +6,11 @@
* description: example basic PHP script to auth a guest device and attach a note to it
*/
/**
* using the composer autoloader
*/
require "vendor/autoload.php";
/**
* include the config file (place your credentials etc. there if not already present)
* see the config.template.php file for an example

View File

@@ -6,6 +6,11 @@
* description: example basic PHP script to create a set of vouchers
*/
/**
* using the composer autoloader
*/
require "vendor/autoload.php";
/**
* include the config file (place your credentials etc. there if not already present)
* see the config.template.php file for an example

View File

@@ -6,6 +6,11 @@
* description: example of how to extend validity of guest authorizations
*/
/**
* using the composer autoloader
*/
require "vendor/autoload.php";
/**
* include the config file (place your credentials etc. there if not already present)
* see the config.template.php file for an example

View File

@@ -6,6 +6,11 @@
* description: example basic PHP script to pull current alarms from the UniFi controller and output in json format
*/
/**
* using the composer autoloader
*/
require "vendor/autoload.php";
/**
* include the config file (place your credentials etc. there if not already present)
* see the config.template.php file for an example

View File

@@ -7,6 +7,11 @@
* in raw HTML format
*/
/**
* using the composer autoloader
*/
require "vendor/autoload.php";
/**
* include the config file (place your credentials etc there if not already present)
* see the config.template.php file for an example

View File

@@ -7,6 +7,11 @@
* in json format
*/
/**
* using the composer autoloader
*/
require "vendor/autoload.php";
/**
* include the config file (place your credentials etc. there if not already present)
* see the config.template.php file for an example

View File

@@ -7,6 +7,11 @@
* them in basic HTML format
*/
/**
* using the composer autoloader
*/
require "vendor/autoload.php";
/**
* include the config file (place your credentials etc. there if not already present)
* see the config.template.php file for an example

View File

@@ -7,6 +7,11 @@
* output the response in json format
*/
/**
* using the composer autoloader
*/
require "vendor/autoload.php";
/**
* include the config file (place your credentials etc. there if not already present)
* see the config.template.php file for an example