PHPackages                             gdm/framework-types - 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. [Framework](/categories/framework)
4. /
5. gdm/framework-types

AbandonedArchivedLibrary[Framework](/categories/framework)

gdm/framework-types
===================

GDM Framework - Types

0.0.7(10y ago)03.1k2BSD-3-ClausePHP

Since Jul 28Pushed 10y agoCompare

[ Source](https://github.com/guru-digital/framework-types)[ Packagist](https://packagist.org/packages/gdm/framework-types)[ Docs](https://github.com/guru-digital/framework-types/)[ RSS](/packages/gdm-framework-types/feed)WikiDiscussions master Synced 4d ago

READMEChangelog (2)Dependencies (1)Versions (8)Used By (2)

PHP Object orientated types
===========================

[](#php-object-orientated-types)

A collection of helper classes that attempt to make dealing with PHP types a bit more Object Orientated Inspired by

\##Example usage ###String

```
$string = "Here is a string that we will use for some examples        ";

// Implements __toString, so object instances can be used as plain old strings
$echoMe = GDM\Framework\Types\String::create($string);
echo $echoMe; // Outputs "Here is a string that we will use for some examples"

// Simple example
$truncateMe = GDM\Framework\Types\String::create($string);
echo $truncateMe->neatTruncate(10); // Outputs "Here is...";

// Most methods are Chainable
$chainMe = GDM\Framework\Types\String::create($string);
echo $chainMe->leftTrim("H")->upperCaseWords()->replace('/String/', 'Sentence'); // Outputs "Ere Is A Sentence That We Will Use For Some Examples "
```

\###Date

```
$date = "01/01/2014 14:35";

// Set global defaults
\GDM\Framework\Types\Settings\DefaultDateSettings::$defaultTimeZone = 'Pacific/Auckland';
\GDM\Framework\Types\Settings\DefaultDateSettings::$defaultDateFromat = 'd/m/Y';
\GDM\Framework\Types\Settings\DefaultDateSettings::$defaultDateTimeFromat = 'd/m/Y H:i';
\GDM\Framework\Types\Settings\DefaultDateSettings::$defaultLongDateFormat = 'l jS \of F Y';
\GDM\Framework\Types\Settings\DefaultDateSettings::$defaultLongDateTimeFormat = 'l jS \of F Y h:i:s A';
// Or pass a settings object in
$settings = GDM\Framework\Types\Settings\DateSettings::create('Pacific/Auckland', 'd/m/Y', 'd/m/Y H:i', 'l jS \of F Y', 'l jS \of F Y', 'l jS \of F Y h:i:s A');

// Implements __toString, so object instances can be used as plain old strings
$echoMe = GDM\Framework\Types\Date::create($date, $settings);
echo $echoMe; // Outputs "01/01/2014 14:35"

// Long fromat
echo $echoMe->toLongDateTime(); // Outputs "Wednesday 1st of January 2014";

// Helpers
echo GDM\Framework\Types\Date::getDaysDiff("01/01/2014", "21/01/2014");  // Outputs "20"

foreach (GDM\Framework\Types\Date::daysOfTheWeek() as $day) {
            echo $day . "";
}// Outputs Monday
//      Tuesday
//      Wednesday
//      Thursday
//      Friday
//      Saturday
//      Sunday
```

\###URL

```
$urlString = "http://www.example.com/path/to/file?foo=bar";

// Implements __toString, so object instances can be used as plain old strings
$echoMe = GDM\Framework\Types\Url::create($urlString);
echo $echoMe; // Outputs "http://www.example.com/path/to/file?bar=foo"

// Url parameters are readable as propertie
echo $echoMe->foo; // Outputs "bar";

// You can also set properties
$echoMe->bar = "some-new-value";
echo $echoMe; // Outputs "http://www.example.com/path/to/file?foo=bar&bar=some-new-value";

// Path segements are array accessable
echo $echoMe[1];  // Outputs "to"

$echoMe[3] = "somewhere";
echo $echoMe; // Outputs "http://www.example.com/path/to/file/somewhere?foo=bar&bar=some-new-value";
```

\##To do

- .... write a better readme?
- Add more types

###  Health Score

29

—

LowBetter than 59% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity16

Limited adoption so far

Community13

Small or concentrated contributor base

Maturity58

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 53.8% 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 ~96 days

Recently: every ~11 days

Total

7

Last Release

3730d ago

### Community

Maintainers

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

![](https://www.gravatar.com/avatar/5317dd0ba5eb4981ad9d6c5bbb0cfceb41ce0eca8e34c9987e9dca8a41af1672?d=identicon)[cjsewell](/maintainers/cjsewell)

---

Top Contributors

[![gurudigital](https://avatars.githubusercontent.com/u/8206306?v=4)](https://github.com/gurudigital "gurudigital (7 commits)")[![cjsewell](https://avatars.githubusercontent.com/u/1856199?v=4)](https://github.com/cjsewell "cjsewell (6 commits)")

---

Tags

types

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/gdm-framework-types/health.svg)

```
[![Health](https://phpackages.com/badges/gdm-framework-types/health.svg)](https://phpackages.com/packages/gdm-framework-types)
```

###  Alternatives

[laravel/telescope

An elegant debug assistant for the Laravel framework.

5.2k67.8M192](/packages/laravel-telescope)[spiral/roadrunner

RoadRunner: High-performance PHP application server and process manager written in Go and powered with plugins

8.4k12.2M84](/packages/spiral-roadrunner)[nolimits4web/swiper

Most modern mobile touch slider and framework with hardware accelerated transitions

41.8k177.2k1](/packages/nolimits4web-swiper)[laravel/dusk

Laravel Dusk provides simple end-to-end testing and browser automation.

1.9k36.7M259](/packages/laravel-dusk)[laravel/prompts

Add beautiful and user-friendly forms to your command-line applications.

708181.8M596](/packages/laravel-prompts)[cakephp/chronos

A simple API extension for DateTime.

1.4k47.7M121](/packages/cakephp-chronos)

PHPackages © 2026

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