PHPackages                             gorriecoe/silverstripe-sreg - 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. [Parsing &amp; Serialization](/categories/parsing)
4. /
5. gorriecoe/silverstripe-sreg

ActiveSilverstripe-vendormodule[Parsing &amp; Serialization](/categories/parsing)

gorriecoe/silverstripe-sreg
===========================

Simple tokenizer that allows you to use .ss template like variables in a dataobjects string.

1.2.2(8y ago)1137↓66.7%1BSD-3-ClausePHP

Since Feb 15Pushed 8y ago2 watchersCompare

[ Source](https://github.com/gorriecoe/silverstripe-sreg)[ Packagist](https://packagist.org/packages/gorriecoe/silverstripe-sreg)[ Docs](http://github.com/gorriecoe/silverstripe-sreg)[ RSS](/packages/gorriecoe-silverstripe-sreg/feed)WikiDiscussions master Synced today

READMEChangelog (7)Dependencies (1)Versions (8)Used By (0)

Silverstripe sreg
=================

[](#silverstripe-sreg)

Simple tokenizer that allows you to use .ss template like variables in a dataobjects string.

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

[](#installation)

Composer is the recommended way of installing SilverStripe modules.

```
composer require gorriecoe/silverstripe-sreg

```

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

[](#requirements)

- silverstripe/framework ^4.0

Maintainers
-----------

[](#maintainers)

- [Gorrie Coe](https://github.com/gorriecoe)

Usage
-----

[](#usage)

```
class MyObject extends DataObject
{
    private static $has_one = [
        'Relation' => 'SomeObject',
        'AFallBack' => 'SomeObject',
    ];

    public function SomeFunction()
    {
        return 'Some text';
    }

    public function getValue()
    {
        return $this->sreg('Lorem ipsum {$Relation.Title|AFallBack.Title|Fall back text} {$SomeFunction}');
    }
}
```

###  Health Score

31

—

LowBetter than 68% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity13

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity68

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

Recently: every ~7 days

Total

7

Last Release

2931d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/11811440?v=4)[Gorrie Coe](/maintainers/gorriecoe)[@gorriecoe](https://github.com/gorriecoe)

---

Top Contributors

[![gorriecoe](https://avatars.githubusercontent.com/u/11811440?v=4)](https://github.com/gorriecoe "gorriecoe (11 commits)")

---

Tags

silverstripetokenizersreg

### Embed Badge

![Health badge](/badges/gorriecoe-silverstripe-sreg/health.svg)

```
[![Health](https://phpackages.com/badges/gorriecoe-silverstripe-sreg/health.svg)](https://phpackages.com/packages/gorriecoe-silverstripe-sreg)
```

###  Alternatives

[yethee/tiktoken

PHP version of tiktoken

1583.1M15](/packages/yethee-tiktoken)[gioni06/gpt3-tokenizer

PHP package for Byte Pair Encoding (BPE) used by GPT-3.

85537.5k8](/packages/gioni06-gpt3-tokenizer)[rajentrivedi/tokenizer-x

TokenizerX calculates required tokens for given prompt

91214.0k3](/packages/rajentrivedi-tokenizer-x)[phptek/jsontext

JSON storage, querying and modification.

2222.2k2](/packages/phptek-jsontext)[danny50610/bpe-tokeniser

PHP port for openai/tiktoken (most)

10422.0k1](/packages/danny50610-bpe-tokeniser)[hybridlogic/classifier

A Naive Bayesian classification library for PHP with support for different tokenizers to optimize string classification.

801.4k](/packages/hybridlogic-classifier)

PHPackages © 2026

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