PHPackages                             indiana-university/iukb-api-doc-content-php - 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. [Utility &amp; Helpers](/categories/utility)
4. /
5. indiana-university/iukb-api-doc-content-php

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

indiana-university/iukb-api-doc-content-php
===========================================

A class to make presenting knowledge base content easier

v1.5(4y ago)152BSD-3-ClausePHPPHP ^7.1 | ^8CI failing

Since Jun 27Pushed 1y ago1 watchersCompare

[ Source](https://github.com/indiana-university/iukb-api-doc-content-php)[ Packagist](https://packagist.org/packages/indiana-university/iukb-api-doc-content-php)[ Docs](https://github.com/indiana-university/iukb-api-doc-content-php)[ RSS](/packages/indiana-university-iukb-api-doc-content-php/feed)WikiDiscussions master Synced 2w ago

READMEChangelogDependencies (4)Versions (4)Used By (0)

IUKB API - PHP: Content
=======================

[](#iukb-api---php-content)

A class to make presenting knowledge base content easier

Requirements
------------

[](#requirements)

- indiana-university/iukb-api-php

Usage
-----

[](#usage)

Usage is pretty simple, you simply call the create method statically on the factory class.

### Basics

[](#basics)

```
use Edu\Iu\Uits\KnowledgeBase\Document\ContentFactory;

$doc = $kb->getDocument('amyk');
$content = ContentFactory::create($doc->getContent());
echo $content->getBody();
```

### Links

[](#links)

The links the KB returns may not be valid for your uses. To alter them a a function is provided to 'rebase' them. This will let you change the part before the four character document id.

```
use Edu\Iu\Uits\KnowledgeBase\Document\ContentFactory;

$doc = $kb->getDocument('amyk');
$content = ContentFactory::create($doc->getContent());

// If the hrefs are simply the doc id but need to be /help/docid
$content->rebaseKbLinks('', '/help/');

// If the links are full urls to the KB but need to be /help/docid
$content->rebaseKbLinks('https://kb.iu.edu/d/', '/help/');
```

### Rivet Styles

[](#rivet-styles)

Currently the KB uses a custom bootstrap theme and so the class names follow the bootstrap names. This is incompatible with Rivet. If you wish to display documents using the rivet styles you can simply use the `rivetize()` function.

This function is based on the Indiana University official "rivetizer" javascript library. For more information about the rivetizer, visit .

```
use Edu\Iu\Uits\KnowledgeBase\Document\ContentFactory;

$doc = $kb->getDocument('amyk');
$content = ContentFactory::create($doc->getContent());
$content->rivetize();
```

Contributing
------------

[](#contributing)

Contributions are welcome in the form of a github pull request. Note, for consistency sake, please run `composer check` and `composer run-tests` on any code you wish to contribute to this project and fix and resolve any issues found

###  Health Score

29

—

LowBetter than 57% of packages

Maintenance33

Infrequent updates — may be unmaintained

Popularity10

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity56

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% 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 ~422 days

Total

3

Last Release

1716d ago

PHP version history (2 changes)v1.3PHP ^7.1

v1.5PHP ^7.1 | ^8

### Community

Maintainers

![](https://www.gravatar.com/avatar/8cd3e0962f4c279ae14bab14c1a450e17f8dec2bfe0a7751f1362894eb48dd7f?d=identicon)[indiana-university](/maintainers/indiana-university)

---

Top Contributors

[![jhoerr](https://avatars.githubusercontent.com/u/1151206?v=4)](https://github.com/jhoerr "jhoerr (1 commits)")

---

Tags

basekbknowledgeIUuits

###  Code Quality

TestsPHPUnit

Static AnalysisPHPStan

Code StylePHP\_CodeSniffer

Type Coverage Yes

### Embed Badge

![Health badge](/badges/indiana-university-iukb-api-doc-content-php/health.svg)

```
[![Health](https://phpackages.com/badges/indiana-university-iukb-api-doc-content-php/health.svg)](https://phpackages.com/packages/indiana-university-iukb-api-doc-content-php)
```

###  Alternatives

[mnastalski/baselinker-php

Base.com (formerly BaseLinker) PHP library

1635.7k](/packages/mnastalski-baselinker-php)[thunderer/numbase

Convert any number between arbitrary bases

242.3k](/packages/thunderer-numbase)[delight-im/base-convert

Conversion of arbitrarily large numbers between any two bases or alphabets

161.2k](/packages/delight-im-base-convert)

PHPackages © 2026

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