Skip to content

Commit a126ec6

Browse files
committed
v0.1.0 - Initial Stable Release
- Extended QuickBaseError - Added error doc to README.md - Require ext-xml - Finalize most functions - Catch bad ticket error - Fix self referencing static methods - Fix encoding xml packet - Enforce SSL correctly for API_Authenticate - Enhance API_DoQuery response - Enhance API_GetSchema response - Reduce commented lines for placeholder functions
1 parent e41c492 commit a126ec6

File tree

4 files changed

+432
-519
lines changed

4 files changed

+432
-519
lines changed

README.md

Lines changed: 35 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@ $ composer require tflanagan/quickbase
1414
Example
1515
-------
1616
```php
17-
1817
try {
1918
$qb = new QuickBase(array(
2019
'realm' => 'www',
@@ -49,12 +48,45 @@ try {
4948
));
5049

5150
var_dump($response['table']['records']);
52-
}catch(Exception $err){
53-
var_dump($err);
51+
}catch(QuickBaseError $err){
52+
echo '('.$err->getCode().') '.$err->getMessage().'. '.$err->getDetails();
5453
}
5554

5655
```
5756

57+
Error Handling
58+
--------------
59+
60+
php-quickbase throws exceptions whenever an error is detected. You do not have to manually check for QuickBase errors, just wrap your code in `try/catch`'s and you're good to go!
61+
62+
```php
63+
try {
64+
// QuickBase API Calls Here
65+
}catch(QuickBaseError $err){
66+
echo '('.$err->getCode().') '.$err->getMessage().'. '.$err->getDetails();
67+
68+
/*
69+
* class QuickBaseError extends Exception {
70+
*
71+
* protected int $code;
72+
* protected string $message;
73+
* protected string $details;
74+
*
75+
* protected int $line;
76+
* protected string $file;
77+
*
78+
* final public getCode(void);
79+
* final public getMessage(void);
80+
* final public getDetails(void);
81+
*
82+
* final public getLine(void);
83+
* final public getFile(void);
84+
*
85+
* }
86+
*/
87+
}
88+
```
89+
5890
License
5991
-------
6092

composer.json

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "tflanagan/quickbase",
33
"type": "library",
4-
"version": "0.0.1",
4+
"version": "0.1.0",
55
"description": "A lightweight, very flexible QuickBase API",
66
"keywords": [
77
"QuickBase",
@@ -24,6 +24,7 @@
2424
],
2525
"require": {
2626
"php": ">=5.4.0",
27-
"ext-curl": "*"
27+
"ext-curl": "*",
28+
"ext-xml": "*"
2829
}
2930
}

0 commit comments

Comments
 (0)