PHP 8.2.31
Preview: Pattern.php Size: 788 B
/opt/cpanel/ea-wappspector/vendor/doctrine/inflector/src/Rules/Pattern.php

<?php

declare(strict_types=1);

namespace Doctrine\Inflector\Rules;

use function preg_match;

final class Pattern
{
    /** @var string */
    private $pattern;

    /** @var string */
    private $regex;

    public function __construct(string $pattern)
    {
        $this->pattern = $pattern;

        if (isset($this->pattern[0]) && $this->pattern[0] === '/') {
            $this->regex = $this->pattern;
        } else {
            $this->regex = '/' . $this->pattern . '/i';
        }
    }

    public function getPattern(): string
    {
        return $this->pattern;
    }

    public function getRegex(): string
    {
        return $this->regex;
    }

    public function matches(string $word): bool
    {
        return preg_match($this->getRegex(), $word) === 1;
    }
}

Directory Contents

Dirs: 8 × Files: 8

Name Size Perms Modified Actions
English DIR
- drwxr-xr-x 2025-08-10 19:31:58
Edit Download
Esperanto DIR
- drwxr-xr-x 2025-08-10 19:31:58
Edit Download
French DIR
- drwxr-xr-x 2025-08-10 19:31:58
Edit Download
Italian DIR
- drwxr-xr-x 2025-08-10 19:31:58
Edit Download
- drwxr-xr-x 2025-08-10 19:31:58
Edit Download
- drwxr-xr-x 2025-08-10 19:31:58
Edit Download
Spanish DIR
- drwxr-xr-x 2025-08-10 19:31:58
Edit Download
Turkish DIR
- drwxr-xr-x 2025-08-10 19:31:58
Edit Download
788 B lrw-r--r-- 2025-08-10 19:31:58
Edit Download
602 B lrw-r--r-- 2025-08-10 19:31:58
Edit Download
777 B lrw-r--r-- 2025-08-10 19:31:58
Edit Download
451 B lrw-r--r-- 2025-08-10 19:31:58
Edit Download
1.34 KB lrw-r--r-- 2025-08-10 19:31:58
Edit Download
790 B lrw-r--r-- 2025-08-10 19:31:58
Edit Download
648 B lrw-r--r-- 2025-08-10 19:31:58
Edit Download
294 B lrw-r--r-- 2025-08-10 19:31:58
Edit Download

If ZipArchive is unavailable, a .tar will be created (no compression).