PHPackages                             citripio/toolbelt - 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. citripio/toolbelt

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

citripio/toolbelt
=================

Helpers for citripio websites

1.3.6(6y ago)0267MITPHP

Since Jun 20Pushed 6y ago3 watchersCompare

[ Source](https://github.com/citripio/toolbelt)[ Packagist](https://packagist.org/packages/citripio/toolbelt)[ RSS](/packages/citripio-toolbelt/feed)WikiDiscussions master Synced 3d ago

READMEChangelogDependenciesVersions (14)Used By (0)

Citripio Toolbelt
=================

[](#citripio-toolbelt)

Helpers for contentor websites in PHP

Development
-----------

[](#development)

Follow these steps in order to publish a new version.

**Remember to always push your commits first, and then create the new version number tag:**

```
git commit -m "Some meaningful comment"
git push
git tag -a 1.0.0 -m "Version 1.0.0"
git push --tags

```

After a few seconds, the new version will show up on [Github](https://github.com/citripio/toolbelt/releases) and [Packagist](https://packagist.org/packages/citripio/toolbelt)

Installation
------------

[](#installation)

Add this to your `composer.json`

```
{
    "require": {
        "citripio/toolbelt": "^1.0"
    }
}

```

Then:

```
require_once "./vendor/autoload.php";

$utils = new Citripio\Toolbelt();

```

Methods
-------

[](#methods)

### get\_content\_part($content, $tag)

[](#get_content_partcontent-tag)

Receives a string and parses it for the given `` name.

### include\_utms()

[](#include_utms)

Useful for redirects.

Receives a URL and returns it appending the current `utm_source` and `utm_campaign` GET parameters, if present. Doesn't add an extra `?` to the URL if it already has one.

### save\_user\_token\_and\_session\_in\_cookies()

[](#save_user_token_and_session_in_cookies)

Receives no arguments. Useful for normalizing the cookie's name.

### save\_content\_list\_timestamps\_in\_cookies()

[](#save_content_list_timestamps_in_cookies)

Receives a collection of `contents[]` containing a `created_at_timestamp` key. Saves a `id => timestamp` list to cookies, returning that same list.

### retrieve\_saved\_timestamp\_for\_content\_id()

[](#retrieve_saved_timestamp_for_content_id)

The opposite of `save_content_list_timestamps_in_cookies`.

Receives a content list and an ID. Returns the `timestamp` for that ID.

### generate\_content\_md5()

[](#generate_content_md5)

Receives a string or integer. Generates a MD5 hash using always the same salt.

### get\_verse\_code()

[](#get_verse_code)

Receives a string and parses it for ``

### get\_verse()

[](#get_verse)

Receives a string and parses it for ``

### get\_explanation()

[](#get_explanation)

Receives a string and parses it for ``

### get\_prayer\_intro()

[](#get_prayer_intro)

Receives a string and parses it for ``

### get\_prayer()

[](#get_prayer)

Receives a string and parses it for ``

### substring\_words($text, $length)

[](#substring_wordstext-length)

Receives a string and an integer. Performs a substr() keeping whole words and adding "..." in case the result doesn't end with "." or ","

###  Health Score

31

—

LowBetter than 68% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity11

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity70

Established project with proven stability

 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 ~53 days

Recently: every ~121 days

Total

13

Last Release

2246d ago

### Community

Maintainers

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

---

Top Contributors

[![alfredoreduarte](https://avatars.githubusercontent.com/u/4633753?v=4)](https://github.com/alfredoreduarte "alfredoreduarte (14 commits)")

### Embed Badge

![Health badge](/badges/citripio-toolbelt/health.svg)

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

PHPackages © 2026

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