File tree Expand file tree Collapse file tree 4 files changed +432
-519
lines changed Expand file tree Collapse file tree 4 files changed +432
-519
lines changed Original file line number Diff line number Diff line change @@ -14,7 +14,6 @@ $ composer require tflanagan/quickbase
14
14
Example
15
15
-------
16
16
``` php
17
-
18
17
try {
19
18
$qb = new QuickBase(array(
20
19
'realm' => 'www',
@@ -49,12 +48,45 @@ try {
49
48
));
50
49
51
50
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( );
54
53
}
55
54
56
55
```
57
56
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
+
58
90
License
59
91
-------
60
92
Original file line number Diff line number Diff line change 1
1
{
2
2
"name" : " tflanagan/quickbase" ,
3
3
"type" : " library" ,
4
- "version" : " 0.0.1 " ,
4
+ "version" : " 0.1.0 " ,
5
5
"description" : " A lightweight, very flexible QuickBase API" ,
6
6
"keywords" : [
7
7
" QuickBase" ,
24
24
],
25
25
"require" : {
26
26
"php" : " >=5.4.0" ,
27
- "ext-curl" : " *"
27
+ "ext-curl" : " *" ,
28
+ "ext-xml" : " *"
28
29
}
29
30
}
You can’t perform that action at this time.
0 commit comments