PHPackages                             uwmadison\_doit/caos-php-client - 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. uwmadison\_doit/caos-php-client

ActiveLibrary[API Development](/categories/api)

uwmadison\_doit/caos-php-client
===============================

A PHP client used to connect with the CAOS API and perform requests

1.5.1(9y ago)0902Apache-2.0PHP

Since Jul 14Pushed 9y ago4 watchersCompare

[ Source](https://github.com/UW-Madison-DoIT/caos-php-client)[ Packagist](https://packagist.org/packages/uwmadison_doit/caos-php-client)[ Docs](https://wiki.doit.wisc.edu/confluence/pages/viewpage.action?pageId=47562009)[ RSS](/packages/uwmadison-doit-caos-php-client/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependencies (3)Versions (5)Used By (0)

PHP Client for the CAOS API
---------------------------

[](#php-client-for-the-caos-api)

### CAOS

[](#caos)

CAOS stands for the [Curricular and Academic Operational Data Store](https://wiki.doit.wisc.edu/confluence/pages/viewpage.action?pageId=47562009). It is used to connect with the PeopleSoft database in order to retrieve various curricular and academic data concerning UW-Madison. Credentials for using CAOS are given on a service by service basis. If you wish to use this client, you must first request credentials on the site found above for your particular project.

CAOS documentation can be found [here](https://wiki.doit.wisc.edu/confluence/display/CHUB/CAOS+Documentation). Be aware that the docs found here are for the most recent version of CAOS. If you need to reference earlier docs click on the tab Previous Versions.

For more documentation see the section Documentation below.

### How to include caos-php-client

[](#how-to-include-caos-php-client)

The version of the client is tied to the version of the CAOS API. Specifically, the major and minor version numbers align with the CAOS API. For example, version `1.5.x` corresponds to the client that uses version 1.5 of the CAOS API whereas version `1.3.x` corresponds to the client that uses version 1.3 of the CAOS API.

#### Installing with composer

[](#installing-with-composer)

If you are using [composer](https://getcomposer.org/) to include your dependencies, you can use these instructions as guidelines.

Include `uwmadison_doit/caos-php-client` in your `composer.json` file under the section dependencies. Refer to the [composer.json guide](https://getcomposer.org/doc/04-schema.md) if you need help.

Composer will create a directory `/vendor` wherever you have placed your `composer.json` file. Under this directory you can find the source code for the client and also the `autoload.php` file.

Place this line at the beginning of the file and you are ready to use the client!

```
require 'path/to/vendor/autoload.php';

```

#### Installing manually

[](#installing-manually)

You can install the code directly from [GitHub](https://github.com/UW-Madison-DoIT/caos-php-client) into your project by using the command

```
git clone https://github.com/UW-Madison-DoIT/caos-php-client --branch  --single-branch
```

Once the source code is installed, you need only to require the `autoload.php` file under `/caos-php-client/src/main`. This can be done with this line of code placed at the beginning of your file.

```
require 'path/to/caos-php-client/src/main/autoload.php';
```

### How to issue requests with the client

[](#how-to-issue-requests-with-the-client)

All requests and responses are handled by the class ChubService which extends php's [SoapClient](http://php.net/manual/en/class.soapclient.php). To use SoapClient you must either configure php with the option `--enable-soap` or include `extension=php_soap.dll` in your `php.ini` file.

Issuing requests with the CAOS API follows this framework.

1. Initialize the ChubService by declaring a new instantiation of the class.
2. Create a request object concerning the particular data wanted.
3. Issue the request using the ChubService's built-in methods.
4. Repeat steps 2 and 3 to retrieve all the data desired.

Here is some example code for version 1.5 of the CAOS API.

```
// acquire an instance from ChubServiceFactory
$ChubService = edu\wisc\services\caos\ChubServiceFactory::getInstance('myusername', 'mypassword');

// Request the present term
$request = new edu\wisc\services\caos\GetPresentTermRequest($courseCareerCode);
$reponse = $ChubService->GetPresentTerm($request);
// Code here to extract data from response
unlink($request, $response);

// Request a class (ChubService is already initialized so it need not be declared again)
$request = new edu\wisc\services\caos\GetClassRequest($classID);
$response = $ChubService->GetClass($request);
// Code here to extract data from response
unlink($request, $response);

// Request a list of advisors
$request = new edu\wisc\services\caos\GetAdvisorsRequest($personQuery, $advisingDataOptions, $attributes);
$reponse = $ChubService->GetAdvisors($request);
// Code here to extract data from response
unlink($request, $response);
```

### Documentation

[](#documentation)

The code used by the CAOS API client is auto generated from a wsdl file which has little documentation. It would be best to compare the description of methods and classes in the JavaDocs to the usage in the PHPDocs. The docs listed below are all specific to version 1.5 of the CAOS API. For earlier versions refer [here](https://wiki.doit.wisc.edu/confluence/display/CHUB/CAOS+Documentation) and click on the tab previous versions.

#### Request and Response Classes

[](#request-and-response-classes)

From the example code above, it should be gleaned that all interactions with the CAOS service must be initiated through an instantiation of the class ChubService. A list of all the function names that can be called by ChubService can be found [here](https://wams.doit.wisc.edu/chub/chub-ws-api-1.5/apidocs/edu/wisc/services/chub/v1_5/CurricularDataService.html) in the JavaDocs and *link to phpdoc page* in the PHPDocs. The names of the functions are correct in the JavaDocs, however the parameters and return values are incorrect.

There are two major types of classes used when interacting with the CAOS API.

1. A request class. This type of class wraps up the parameters needed by a ChubService method call. For example, when calling `$ChubService->GetClass()` instead of passing a unique class id, you would pass the object `\GetClassRequest` which contains the unique class id. Many request classes support multiple fields relevant to a query.
2. A response class. This type of class is returned by a ChubService method call. These classes are wrappers for data actually requested. For instance, a `\GetSubjectResponse` contains the property `$subject` which is the type `\subjectType`.

You can refer to the request and response classes [here](https://wams.doit.wisc.edu/chub/chub-soap-schema-1.5/apidocs/index.html) in the JavaDocs and also *link to phpdoc page*.

#### Curricular and Academic Data

[](#curricular-and-academic-data)

Once you have retrieved your response using the ChubService methods, you only need to extract the data. The curricular and academic objects (like term, class, advisors, etc.) can be referred to [here for curricular](https://wams.doit.wisc.edu/chub/curricular-data-model-1.5/apidocs/) and [here for academic](https://wams.doit.wisc.edu/chub/academic-data-model-0.1/apidocs/index.html) in the JavaDocs and *links to phpdocs here*. Remember, usage will always follow the PHPDocs!

Links to php docs coming soon!

### Contributing

[](#contributing)

See [CONTRIBUTING](CONTRIBUTING.md) if you'd like to contribute to development of this project.

###  Health Score

30

—

LowBetter than 64% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity11

Limited adoption so far

Community15

Small or concentrated contributor base

Maturity66

Established project with proven stability

 Bus Factor1

Top contributor holds 77.6% 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 ~142 days

Total

4

Last Release

3533d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/ecb42442972977e51e118f8f53b59ebd92e83b2bfc48bd464169ca22394d8bbb?d=identicon)[ahoffmann-wi](/maintainers/ahoffmann-wi)

![](https://www.gravatar.com/avatar/d965a738c79f035e68dfac75a81fe01ee4e77ee411ca360d86f9fa0b67576b67?d=identicon)[nblair](/maintainers/nblair)

---

Top Contributors

[![cknuth](https://avatars.githubusercontent.com/u/12299243?v=4)](https://github.com/cknuth "cknuth (45 commits)")[![nblair](https://avatars.githubusercontent.com/u/1041730?v=4)](https://github.com/nblair "nblair (11 commits)")[![hamdrew](https://avatars.githubusercontent.com/u/4921666?v=4)](https://github.com/hamdrew "hamdrew (2 commits)")

### Embed Badge

![Health badge](/badges/uwmadison-doit-caos-php-client/health.svg)

```
[![Health](https://phpackages.com/badges/uwmadison-doit-caos-php-client/health.svg)](https://phpackages.com/packages/uwmadison-doit-caos-php-client)
```

###  Alternatives

[stripe/stripe-php

Stripe PHP Library

4.0k143.3M480](/packages/stripe-stripe-php)[twilio/sdk

A PHP wrapper for Twilio's API

1.6k92.9M272](/packages/twilio-sdk)[facebook/php-business-sdk

PHP SDK for Facebook Business

90821.9M34](/packages/facebook-php-business-sdk)[meilisearch/meilisearch-php

PHP wrapper for the Meilisearch API

74513.7M114](/packages/meilisearch-meilisearch-php)[google/gax

Google API Core for PHP

265103.1M454](/packages/google-gax)[google/common-protos

Google API Common Protos for PHP

173103.7M50](/packages/google-common-protos)

PHPackages © 2026

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