# 404-solution/4.3.0/includes/services/RedirectEngineLabeler.php

404 Solution, version 4.3.0. 34 lines.

- Page: https://pluginprobe.com/plugins/404-solution/4.3.0/code/includes/services/RedirectEngineLabeler.php
- Raw: https://pluginprobe.com/plugins/404-solution/4.3.0/raw/includes/services/RedirectEngineLabeler.php
- Modified: 2026-06-23T05:55:18+00:00

Line numbers below start at 1. Link to a line or a range by appending a fragment to the
page URL, for example `https://pluginprobe.com/plugins/404-solution/4.3.0/code/includes/services/RedirectEngineLabeler.php#L10-L20`.

```php
<?php

if (!defined('ABSPATH')) {
    exit;
}

/**
 * Converts stored redirect matching engine class names into admin-facing labels.
 */
class ABJ_404_Solution_RedirectEngineLabeler {

    /**
     * Convert a raw engine class name to a human-readable label.
     *
     * @param string $rawName
     * @return string
     */
    public function humanize(string $rawName): string {
        $name = preg_replace('/^ABJ_404_Solution_/', '', $rawName);
        if (!is_string($name)) {
            $name = $rawName;
        }

        $name = (string)preg_replace('/MatchingEngine$/', ' Matching', $name);
        $name = (string)preg_replace('/Engine$/', '', $name);
        $name = (string)preg_replace('/(?<=[a-z])([A-Z])/', ' $1', $name);
        $name = trim($name);
        $name = str_replace(array('Url ', 'Url'), array('URL ', 'URL'), $name);
        $name = str_replace('Category Tag', 'Category/Tag', $name);

        return $name !== '' ? $name : $rawName;
    }
}

```
