PHPackages                             sunnysideup/sanitise-class-name - 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. [Validation &amp; Sanitization](/categories/validation)
4. /
5. sunnysideup/sanitise-class-name

ActiveSilverstripe-vendormodule[Validation &amp; Sanitization](/categories/validation)

sunnysideup/sanitise-class-name
===============================

Sanitises a classname to hyphens and also back to backslashes as needed.

3.0.0(2mo ago)09584BSD-3-ClausePHP

Since Nov 17Pushed 2mo ago1 watchersCompare

[ Source](https://github.com/sunnysideup/silverstripe-sanitise-class-name)[ Packagist](https://packagist.org/packages/sunnysideup/sanitise-class-name)[ RSS](/packages/sunnysideup-sanitise-class-name/feed)WikiDiscussions main Synced today

READMEChangelogDependencies (2)Versions (9)Used By (4)

Silverstripe Sanitise Class Name module
=======================================

[](#silverstripe-sanitise-class-name-module)

[![Build Status](https://camo.githubusercontent.com/8d1a2baf5c77504f66707edc122309c5ed7cbc1a432ba02fba11f3ff6c8d2671/68747470733a2f2f7472617669732d63692e6f72672f73756e6e797369646575702f73696c7665727374726970652d73616e69746973652d636c6173732d6e616d652e7376673f6272616e63683d6d6173746572)](https://travis-ci.org/sunnysideup/silverstripe-sanitise-class-name)[![Scrutinizer Code Quality](https://camo.githubusercontent.com/d241eee88224810802b13f844ffc9a97202c5ac7fae7be7234b6382802b180c5/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f73756e6e797369646575702f73696c7665727374726970652d73616e69746973652d636c6173732d6e616d652f6261646765732f7175616c6974792d73636f72652e706e673f623d6d6173746572)](https://scrutinizer-ci.com/g/sunnysideup/silverstripe-sanitise-class-name/?branch=master)[![codecov.io](https://camo.githubusercontent.com/c921fbd216616d31a205ff5a1ce810e0530f38a58ce96d76dbaa4ca3575b03aa/68747470733a2f2f636f6465636f762e696f2f6769746875622f73756e6e797369646575702f73696c7665727374726970652d73616e69746973652d636c6173732d6e616d652f636f7665726167652e7376673f6272616e63683d6d6173746572)](https://codecov.io/github/sunnysideup/silverstripe-sanitise-class-name?branch=master)

[![Latest Stable Version](https://camo.githubusercontent.com/beea8e2a6fa39d2fa1a629b5647e1667447e23b90399e2cdfa1cd1d3504eb7c7/68747470733a2f2f706f7365722e707567782e6f72672f73756e6e797369646575702f73616e69746973652d636c6173732d6e616d652f76657273696f6e)](https://packagist.org/packages/sunnysideup/sanitise-class-name)[![License](https://camo.githubusercontent.com/b0de663fa18e4756612601a50810073a2ae2c0ddc0538ec1bb18aeddb62b6e52/68747470733a2f2f706f7365722e707567782e6f72672f73756e6e797369646575702f73616e69746973652d636c6173732d6e616d652f6c6963656e7365)](https://packagist.org/packages/sunnysideup/sanitise-class-name)[![Monthly Downloads](https://camo.githubusercontent.com/3c65c7b5a40004bf68874f186d067c24483acfd87f1e14fdcabe97f1c1ac671e/68747470733a2f2f706f7365722e707567782e6f72672f73756e6e797369646575702f73616e69746973652d636c6173732d6e616d652f642f6d6f6e74686c79)](https://packagist.org/packages/sunnysideup/sanitise-class-name)

Documentation
-------------

[](#documentation)

- [Developer Docs](docs/en/INDEX.md)
- [User Guide](docs/en/userguide.md)
- [API Docs](http://docs.ssmods.com/sunnysideup/sanitise-class-name/classes.xhtml)

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

[](#requirements)

See [composer.json](composer.json) for details

### Suggested Modules

[](#suggested-modules)

See [composer.json](composer.json) for details

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

[](#installation)

```
composer require sunnysideup/sanitise-class-name

```

### Configuration

[](#configuration)

In the `_config` folder you will find the `sanitise-class-name.yml.example`file that shows options for the configuration of this module.

We recommend that you:

1. copy these `sanitise-class-name.yml.example` files into your `mysite/_config` folder (where available - otherwise search for `private static $` in the module to see what can be configured)
2. remove the .example extension,
3. delete the lines you do not care about, and
4. adjust the configurations that you would like to use.

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

[](#contributing)

We welcome any contributions. See [CONTRIBUTING.md](CONTRIBUTING.md) for more details.

Paid assistance
---------------

[](#paid-assistance)

You can pay us to create an improved / adapted version of this module for your own projects. Please contact us if you like to find out more: [www.sunnysideup.co.nz](http://www.sunnysideup.co.nz). For exmaple, we can write tests for this module.

Author
------

[](#author)

Sunny Side Up Ltd.

Care to see more modules?
-------------------------

[](#care-to-see-more-modules)

To find other modules, please visit [ssmods.com](http://ssmods.com/).

###  Health Score

46

—

FairBetter than 92% of packages

Maintenance86

Actively maintained with recent releases

Popularity17

Limited adoption so far

Community13

Small or concentrated contributor base

Maturity59

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

Recently: every ~497 days

Total

6

Last Release

68d ago

Major Versions

0.1.2 → 1.0.02022-08-20

1.0.0 → 5.x-dev2026-04-23

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/167154?v=4)[Sunny Side Up](/maintainers/sunnysideup)[@sunnysideup](https://github.com/sunnysideup)

---

Top Contributors

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

---

Tags

convertcmsSilverstripe-CMSsanitizeclassnamesanitiseClassInfobackslashes

### Embed Badge

![Health badge](/badges/sunnysideup-sanitise-class-name/health.svg)

```
[![Health](https://phpackages.com/badges/sunnysideup-sanitise-class-name/health.svg)](https://phpackages.com/packages/sunnysideup-sanitise-class-name)
```

###  Alternatives

[sunnysideup/ecommerce

Silverstripe E-commerce Application

247.3k84](/packages/sunnysideup-ecommerce)

PHPackages © 2026

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