PHPackages                             booellean/apa-formatter - 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. booellean/apa-formatter

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

booellean/apa-formatter
=======================

A set of functions that will build a publication into formatted html

10.0.x-dev(2y ago)01.1kMITPHPCI passing

Since May 7Pushed 7mo ago1 watchersCompare

[ Source](https://github.com/ischooluw/ApaFormatter)[ Packagist](https://packagist.org/packages/booellean/apa-formatter)[ RSS](/packages/booellean-apa-formatter/feed)WikiDiscussions 8.2.x Synced 3w ago

READMEChangelogDependencies (1)Versions (6)Used By (0)

APA Formatter Trait
===================

[](#apa-formatter-trait)

This package is for formatting publications and research grants into APA formatted html. This package has prebuilt functions to format your publication, or individual functions to pass to create an APA format with more customality.

List of Primary Functions
-------------------------

[](#list-of-primary-functions)

- apaFormatBookChapter()
- apaFormatBookEntry()
- apaFormatBookReview()
- apaFormatConferencePaper()
- apaFormatDissertationOrThesis()
- apaFormatEditorial()
- apaFormatForeword()
- apaFormatJournalEntry()
- apaFormatReport()
- apaFormatSoftware()
- apaFormatVideoGame()
- apaFormatVideoSeries()
- apaFormatWebProject()
- apaFormatResearchBrief()
- apaFormatDefaultItem()

To Keep this README manageable, please look in trait code for examples of what types of publications should be used with which function. The Code has very in depth comments about this.

List of Secondary Functions
---------------------------

[](#list-of-secondary-functions)

Sometimes we want to do special formatting (i.e. hyperlinking a book name) for our APA formatted entry. In that case, use the secondary building functions to create a custom entry.

- apaStructureAuthors() - Outputs author string from Array
- apaAddIfElseCharacter() - Very specialized Shorthad logic. Sometimes we need a comma, sometimes we don't. We can pass values here to check that all exist before we output that character.
- apaGetEdition() - Formats Edition of publication
- apaGetEditors() - Outputs editors string from Array
- apaGetPageNumbers() - Formats page numbers of publication
- apaGetPublishing() - Sets up Publiching info from the city/state and publisher passed
- apaGetSecondaryTitle() - Outputs a chapter entry or journal name if secondary title is present
- apaGetTitle() - Get Title as emphasized html for publication
- apaGetType() - Formats type of publication if present
- apaGetUrl() - Formats an anchor tag with url if present
- apaGetVolumeAndIssue() - Formats Volume and Issue appropriately if none, some, or both are present
- apaGetYear() - Returns year or properly formats that year is unknown

There are many examples in the Primary Functions' code that illustrate how these may be used in conjunction

Example Publication Array
-------------------------

[](#example-publication-array)

A Publication is an array passed. Not every publication will have the following properties, but this is a complete list of probably properties for a publication array:

```
        $pub = [
            'authors' => [
                [
                    'last_name' => 'Isaka',
                    'first_name' => 'Kotaro',
                    'middle_name' => ''
                ],
                [
                    'last_name' => 'Hayashi',
                    'first_name' => 'Tamio',
                    'middle_name' => ''
                ]
            ],
            'conf_city_state' => 'New York, NY',
            'editors' => [
                [
                    'last_name' => 'Oohata',
                    'first_name' => 'Eisuke',
                    'middle_name' => ''
                ]
            ],
            'issue' => 6,
            'page_number' => '320',
            'pub_city_state' => 'New York, NY',
            'publication' => 'Fisshū Sutōrī',
            'publisher' => 'New York Asian Film Festival',
            'status' => 'Published',
            'title' => 'Fish Story',
            'title_secondary' => 'The Story of My Life if My Life Were a Fish',
            'type' => 'Movie',
            'url' => 'https://en.wikipedia.org/wiki/Fish_Story_(film)',
            'volume' => 1,
            'year_published' => 2009,
```

Note: Unfortunately, with our limited information, this trait does not support fields for a Publisher Platform or DOI:DOI Number.

###  Health Score

27

—

LowBetter than 47% of packages

Maintenance44

Moderate activity, may be stable

Popularity18

Limited adoption so far

Community10

Small or concentrated contributor base

Maturity31

Early-stage or recently created project

 Bus Factor1

Top contributor holds 92% 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 ~109 days

Recently: every ~137 days

Total

6

Last Release

231d ago

Major Versions

7.4.x-dev → 8.0.x-dev2024-05-07

8.1.x-dev → 10.0.x-dev2024-05-07

### Community

Maintainers

![](https://www.gravatar.com/avatar/87dc168b3c967dcecb325b21eed5bc822b1283beeefc3fc1e2a629a6649c0e05?d=identicon)[booellean](/maintainers/booellean)

![](https://www.gravatar.com/avatar/382a062935467b801206a67e5160f05466f152926f4caa5b238cdceb2349cb3b?d=identicon)[eileenkoven](/maintainers/eileenkoven)

---

Top Contributors

[![booellean](https://avatars.githubusercontent.com/u/22628290?v=4)](https://github.com/booellean "booellean (23 commits)")[![nh0713](https://avatars.githubusercontent.com/u/32369361?v=4)](https://github.com/nh0713 "nh0713 (2 commits)")

### Embed Badge

![Health badge](/badges/booellean-apa-formatter/health.svg)

```
[![Health](https://phpackages.com/badges/booellean-apa-formatter/health.svg)](https://phpackages.com/packages/booellean-apa-formatter)
```

###  Alternatives

[azuracast/azuracast

The AzuraCast self-hosted web radio station management suite.

3.9k27.8k](/packages/azuracast-azuracast)[maize-tech/laravel-badges

Laravel Badges

377.6k](/packages/maize-tech-laravel-badges)[nikolaposa/zf-disqus

ZF module which facilitates integration of Disqus widgets

1210.7k](/packages/nikolaposa-zf-disqus)

PHPackages © 2026

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