File Manager Lite
Dir:
/home/codewavebd/public_html/vendor/doctrine/inflector/src
Upload
[..]
CachedWordInflector.php (511 B)
Edit
Rename
Del
Inflector.php (12.55 KB)
Edit
Rename
Del
LanguageInflectorFactory.php (805 B)
Edit
Rename
Del
NoopWordInflector.php (201 B)
Edit
Rename
Del
Rules/
Rename
Del
RulesetInflector.php (1.32 KB)
Edit
Rename
Del
Edit: CachedWordInflector.php
<?php declare(strict_types=1); namespace Doctrine\Inflector; class CachedWordInflector implements WordInflector { /** @var WordInflector */ private $wordInflector; /** @var string[] */ private $cache = []; public function __construct(WordInflector $wordInflector) { $this->wordInflector = $wordInflector; } public function inflect(string $word): string { return $this->cache[$word] ?? $this->cache[$word] = $this->wordInflector->inflect($word); } }
Simpan