{"id":21305572,"url":"https://github.com/tflanagan/php-quickbase","last_synced_at":"2025-07-11T21:31:09.417Z","repository":{"id":53574058,"uuid":"44631753","full_name":"tflanagan/php-quickbase","owner":"tflanagan","description":"A lightweight, very flexible QuickBase API for PHP","archived":false,"fork":false,"pushed_at":"2021-03-23T15:38:57.000Z","size":103,"stargazers_count":17,"open_issues_count":0,"forks_count":9,"subscribers_count":4,"default_branch":"master","last_synced_at":"2025-06-27T12:59:49.398Z","etag":null,"topics":["api","php","quickbase"],"latest_commit_sha":null,"homepage":"","language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/tflanagan.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2015-10-20T20:02:01.000Z","updated_at":"2023-10-31T12:28:34.000Z","dependencies_parsed_at":"2022-08-22T11:00:45.699Z","dependency_job_id":null,"html_url":"https://github.com/tflanagan/php-quickbase","commit_stats":null,"previous_names":[],"tags_count":34,"template":false,"template_full_name":null,"purl":"pkg:github/tflanagan/php-quickbase","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tflanagan%2Fphp-quickbase","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tflanagan%2Fphp-quickbase/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tflanagan%2Fphp-quickbase/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tflanagan%2Fphp-quickbase/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/tflanagan","download_url":"https://codeload.github.com/tflanagan/php-quickbase/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tflanagan%2Fphp-quickbase/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":264902213,"owners_count":23681021,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["api","php","quickbase"],"created_at":"2024-11-21T16:18:30.627Z","updated_at":"2025-07-11T21:31:09.059Z","avatar_url":"https://github.com/tflanagan.png","language":"PHP","readme":"php-quickbase\n=============\n\n[![License](https://poser.pugx.org/tflanagan/quickbase/license)](https://packagist.org/packages/tflanagan/quickbase) [![Latest Stable Version](https://poser.pugx.org/tflanagan/quickbase/version)](https://packagist.org/packages/tflanagan/quickbase) [![Total Downloads](https://poser.pugx.org/tflanagan/quickbase/downloads)](https://packagist.org/packages/tflanagan/quickbase) [![Build Status](https://travis-ci.org/tflanagan/php-quickbase.svg?branch=master)](https://travis-ci.org/tflanagan/php-quickbase)\n\nA lightweight, very flexible QuickBase API\n\n[JavaScript (Node.js + Browser) Version](https://github.com/tflanagan/node-quickbase)\n\nInstall\n-------\n```\n$ composer require tflanagan/quickbase\n```\n\nExample\n-------\n```php\ntry {\n\t$qb = new \\QuickBase\\QuickBase(array(\n\t\t'realm' =\u003e 'www',\n\t\t'appToken' =\u003e '****',\n\t\t// 'userToken' =\u003e '****'\n\t));\n\n\t// If using user tokens, you do not need to call API_Authenticate\n\n\t$qb-\u003eapi('API_Authenticate', array(\n\t\t'username' =\u003e '****',\n\t\t'password' =\u003e '****'\n\t));\n\n\t$response = $qb-\u003eapi('API_DoQuery', array(\n\t\t'dbid' =\u003e '*****',\n\t\t'clist' =\u003e '3.12',\n\t\t'options' =\u003e 'num-5'\n\t));\n\n\tforeach($response['table']['records'] as $record){\n\t\t$qb-\u003eapi('API_EditRecord', array(\n\t\t\t'dbid' =\u003e '*****',\n\t\t\t'rid' =\u003e $record[3],\n\t\t\t'fields' =\u003e array(\n\t\t\t\tarray( 'fid' =\u003e 12, 'value' =\u003e $record[12])\n\t\t\t)\n\t\t));\n\t}\n\n\t$results = $qb-\u003eapi(array(\n\t\tarray(\n\t\t\t'action' =\u003e 'API_DoQuery',\n\t\t\t'options' =\u003e array(\n\t\t\t\t'dbid' =\u003e '*****',\n\t\t\t\t'clist' =\u003e '3.12',\n\t\t\t\t'options' =\u003e 'num-5'\n\t\t\t)\n\t\t),\n\t\tarray(\n\t\t\t'action' =\u003e 'API_DoQuery',\n\t\t\t'options' =\u003e array(\n\t\t\t\t'dbid' =\u003e '*****',\n\t\t\t\t'clist' =\u003e '3.12',\n\t\t\t\t'options' =\u003e 'num-5'\n\t\t\t)\n\t\t)\n\t));\n\n\tvar_dump($results[0]); // First DoQuery\n\tvar_dump($results[1]); // Second DoQuery\n}catch(\\QuickBase\\QuickBaseError $err){\n\techo '('.$err-\u003egetCode().') '.$err-\u003egetMessage().'. '.$err-\u003egetDetails();\n}\n\n```\n\nClass\n-----\n```php\nclass \\QuickBase\\QuickBase {\n\n\tpublic cURL multi $mch;\n\tpublic array $chs;\n\n\tprivate $defaults;\n\n\tfinal public api($action[, $options = array()]);\n\tfinal public api($actions = array());\n\n\tfinal public static genCH();\n\n}\n\nclass \\QuickBase\\QuickBaseError extends \\Exception {\n\n\tprotected int $code;\n\tprotected string $message;\n\tprotected string $details;\n\n\tprotected int $line;\n\tprotected string $file;\n\n\tfinal public getCode(void);\n\tfinal public getMessage(void);\n\tfinal public getDetails(void);\n\n\tfinal public getLine(void);\n\tfinal public getFile(void);\n\n}\n\nclass \\QuickBase\\QuickBaseQuery {\n\n\tpublic QuickBase $parent;\n\tpublic string $action;\n\tpublic array $settings;\n\tpublic array $options;\n\tpublic array $response;\n\n\tprivate int $nErrors;\n\n\tprotected string $payload;\n\n\tfinal public actionRequest();\n\tfinal public actionResponse();\n\tfinal public addFlags();\n\tfinal public constructPayload();\n\tfinal public checkForAndHandleError();\n\tfinal public finalize();\n\tfinal public prepareCH();\n\tfinal public processCH();\n\tfinal public processOptions();\n\n\tfinal public static arr2Obj(\u0026$arr[, $return = false]);\n\tfinal public static arr2Xml($arr, \u0026$xml);\n\tfinal public static cleanXml2Arr(\u0026$arr);\n\tfinal public static parseCURLHeaders(\u0026$headers);\n\tfinal public static xml2Arr($xml, \u0026$arr);\n\n}\n\nclass \\QuickBase\\QuickBaseRequest {\n\n\tfinal public static API_[Authenticate, DoQuery, etc](\u0026$query);\n\n}\n\nclass \\QuickBase\\QuickBaseResponse {\n\n\tfinal public static API_[Authenticate, DoQuery, etc](\u0026$query, \u0026$results);\n\n}\n\nclass \\QuickBase\\QuickBaseOption {\n\n\tfinal public static [clist, fields, etc]($val);\n\n}\n```\n\nError Handling\n--------------\n\nphp-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!\n\n```php\ntry {\n\t// QuickBase API Calls Here\n}catch(\\QuickBase\\QuickBaseError $err){\n\techo '('.$err-\u003egetCode().') '.$err-\u003egetMessage().'. '.$err-\u003egetDetails();\n\n\t/*\n\t * class \\QuickBase\\QuickBaseError extends \\Exception {\n\t *\n\t * \tprotected int $code;\n\t * \tprotected string $message;\n\t * \tprotected string $details;\n\t *\n\t * \tprotected int $line;\n\t * \tprotected string $file;\n\t *\n\t * \tfinal public getCode(void);\n\t * \tfinal public getMessage(void);\n\t * \tfinal public getDetails(void);\n\t *\n\t * \tfinal public getLine(void);\n\t * \tfinal public getFile(void);\n\t *\n\t * }\n\t*/\n}\n```\n\nLicense\n-------\n\nCopyright 2015 Tristian Flanagan\n\nLicensed under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at\n\n    http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an \"AS IS\" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\nlimitations under the License.\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftflanagan%2Fphp-quickbase","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftflanagan%2Fphp-quickbase","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftflanagan%2Fphp-quickbase/lists"}