PHPackages                             tflanagan/quickbase - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [API Development](/categories/api)
4. /
5. tflanagan/quickbase

ActiveLibrary[API Development](/categories/api)

tflanagan/quickbase
===================

A lightweight, very flexible QuickBase API

v2.1.1(5y ago)1796.0k↓40.8%9Apache-2.0PHPPHP &gt;=5.4.0

Since Oct 23Pushed 5y ago4 watchersCompare

[ Source](https://github.com/tflanagan/php-quickbase)[ Packagist](https://packagist.org/packages/tflanagan/quickbase)[ Docs](https://github.com/tflanagan/php-quickbase)[ RSS](/packages/tflanagan-quickbase/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (10)DependenciesVersions (34)Used By (0)

php-quickbase
=============

[](#php-quickbase)

[![License](https://camo.githubusercontent.com/a9e402c6ed1c4f34023777d07c6a0d310b26d5c67628bd5a88663af922a9bd87/68747470733a2f2f706f7365722e707567782e6f72672f74666c616e6167616e2f717569636b626173652f6c6963656e7365)](https://packagist.org/packages/tflanagan/quickbase) [![Latest Stable Version](https://camo.githubusercontent.com/86bb72b027a728112a1d822840313620c74a2895b9513476b94d733a8fdddf59/68747470733a2f2f706f7365722e707567782e6f72672f74666c616e6167616e2f717569636b626173652f76657273696f6e)](https://packagist.org/packages/tflanagan/quickbase) [![Total Downloads](https://camo.githubusercontent.com/5a70b798c1d5f8547295b238ada38d80f7c56dc1e6117c2b627748143f438d47/68747470733a2f2f706f7365722e707567782e6f72672f74666c616e6167616e2f717569636b626173652f646f776e6c6f616473)](https://packagist.org/packages/tflanagan/quickbase) [![Build Status](https://camo.githubusercontent.com/a540072cef141f4d08b2fb413864fc311249beba17936a18ed6dbf81b7ec2cc8/68747470733a2f2f7472617669732d63692e6f72672f74666c616e6167616e2f7068702d717569636b626173652e7376673f6272616e63683d6d6173746572)](https://travis-ci.org/tflanagan/php-quickbase)

A lightweight, very flexible QuickBase API

[JavaScript (Node.js + Browser) Version](https://github.com/tflanagan/node-quickbase)

Install
-------

[](#install)

```
$ composer require tflanagan/quickbase

```

Example
-------

[](#example)

```
try {
	$qb = new \QuickBase\QuickBase(array(
		'realm' => 'www',
		'appToken' => '****',
		// 'userToken' => '****'
	));

	// If using user tokens, you do not need to call API_Authenticate

	$qb->api('API_Authenticate', array(
		'username' => '****',
		'password' => '****'
	));

	$response = $qb->api('API_DoQuery', array(
		'dbid' => '*****',
		'clist' => '3.12',
		'options' => 'num-5'
	));

	foreach($response['table']['records'] as $record){
		$qb->api('API_EditRecord', array(
			'dbid' => '*****',
			'rid' => $record[3],
			'fields' => array(
				array( 'fid' => 12, 'value' => $record[12])
			)
		));
	}

	$results = $qb->api(array(
		array(
			'action' => 'API_DoQuery',
			'options' => array(
				'dbid' => '*****',
				'clist' => '3.12',
				'options' => 'num-5'
			)
		),
		array(
			'action' => 'API_DoQuery',
			'options' => array(
				'dbid' => '*****',
				'clist' => '3.12',
				'options' => 'num-5'
			)
		)
	));

	var_dump($results[0]); // First DoQuery
	var_dump($results[1]); // Second DoQuery
}catch(\QuickBase\QuickBaseError $err){
	echo '('.$err->getCode().') '.$err->getMessage().'. '.$err->getDetails();
}
```

Class
-----

[](#class)

```
class \QuickBase\QuickBase {

	public cURL multi $mch;
	public array $chs;

	private $defaults;

	final public api($action[, $options = array()]);
	final public api($actions = array());

	final public static genCH();

}

class \QuickBase\QuickBaseError extends \Exception {

	protected int $code;
	protected string $message;
	protected string $details;

	protected int $line;
	protected string $file;

	final public getCode(void);
	final public getMessage(void);
	final public getDetails(void);

	final public getLine(void);
	final public getFile(void);

}

class \QuickBase\QuickBaseQuery {

	public QuickBase $parent;
	public string $action;
	public array $settings;
	public array $options;
	public array $response;

	private int $nErrors;

	protected string $payload;

	final public actionRequest();
	final public actionResponse();
	final public addFlags();
	final public constructPayload();
	final public checkForAndHandleError();
	final public finalize();
	final public prepareCH();
	final public processCH();
	final public processOptions();

	final public static arr2Obj(&$arr[, $return = false]);
	final public static arr2Xml($arr, &$xml);
	final public static cleanXml2Arr(&$arr);
	final public static parseCURLHeaders(&$headers);
	final public static xml2Arr($xml, &$arr);

}

class \QuickBase\QuickBaseRequest {

	final public static API_[Authenticate, DoQuery, etc](&$query);

}

class \QuickBase\QuickBaseResponse {

	final public static API_[Authenticate, DoQuery, etc](&$query, &$results);

}

class \QuickBase\QuickBaseOption {

	final public static [clist, fields, etc]($val);

}
```

Error Handling
--------------

[](#error-handling)

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!

```
try {
	// QuickBase API Calls Here
}catch(\QuickBase\QuickBaseError $err){
	echo '('.$err->getCode().') '.$err->getMessage().'. '.$err->getDetails();

	/*
	 * class \QuickBase\QuickBaseError extends \Exception {
	 *
	 * 	protected int $code;
	 * 	protected string $message;
	 * 	protected string $details;
	 *
	 * 	protected int $line;
	 * 	protected string $file;
	 *
	 * 	final public getCode(void);
	 * 	final public getMessage(void);
	 * 	final public getDetails(void);
	 *
	 * 	final public getLine(void);
	 * 	final public getFile(void);
	 *
	 * }
	*/
}
```

License
-------

[](#license)

Copyright 2015 Tristian Flanagan

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

```
http://www.apache.org/licenses/LICENSE-2.0

```

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

###  Health Score

40

—

FairBetter than 88% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity41

Moderate usage in the ecosystem

Community16

Small or concentrated contributor base

Maturity69

Established project with proven stability

 Bus Factor1

Top contributor holds 93.4% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~61 days

Recently: every ~332 days

Total

33

Last Release

1882d ago

Major Versions

v0.6.0 → v1.0.02016-01-19

v1.3.5 → v2.0.02016-09-29

### Community

Maintainers

![](https://www.gravatar.com/avatar/107b14aa4e515a7d2fb3e22166f684bbd27727b82b8524871be8cd80769c10bb?d=identicon)[tflanagan](/maintainers/tflanagan)

---

Top Contributors

[![tflanagan](https://avatars.githubusercontent.com/u/5559820?v=4)](https://github.com/tflanagan "tflanagan (57 commits)")[![franz-deleon](https://avatars.githubusercontent.com/u/715451?v=4)](https://github.com/franz-deleon "franz-deleon (3 commits)")[![eskrano](https://avatars.githubusercontent.com/u/10223123?v=4)](https://github.com/eskrano "eskrano (1 commits)")

---

Tags

apiphpquickbaseapiquickbaseqb

### Embed Badge

![Health badge](/badges/tflanagan-quickbase/health.svg)

```
[![Health](https://phpackages.com/badges/tflanagan-quickbase/health.svg)](https://phpackages.com/packages/tflanagan-quickbase)
```

###  Alternatives

[m165437/laravel-blueprint-docs

API Blueprint Renderer for Laravel

22779.0k](/packages/m165437-laravel-blueprint-docs)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
