AbstractProviderFactory.php
1 year ago
Dsn.php
1 year ago
FilteringProvider.php
1 year ago
NullProvider.php
1 year ago
NullProviderFactory.php
1 year ago
ProviderFactoryInterface.php
1 year ago
ProviderInterface.php
1 year ago
TranslationProviderCollection.php
1 year ago
TranslationProviderCollectionFactory.php
1 year ago
index.php
1 year ago
NullProviderFactory.php
19 lines
| 1 | <?php |
| 2 | namespace MailPoetVendor\Symfony\Component\Translation\Provider; |
| 3 | if (!defined('ABSPATH')) exit; |
| 4 | use MailPoetVendor\Symfony\Component\Translation\Exception\UnsupportedSchemeException; |
| 5 | final class NullProviderFactory extends AbstractProviderFactory |
| 6 | { |
| 7 | public function create(Dsn $dsn) : ProviderInterface |
| 8 | { |
| 9 | if ('null' === $dsn->getScheme()) { |
| 10 | return new NullProvider(); |
| 11 | } |
| 12 | throw new UnsupportedSchemeException($dsn, 'null', $this->getSupportedSchemes()); |
| 13 | } |
| 14 | protected function getSupportedSchemes() : array |
| 15 | { |
| 16 | return ['null']; |
| 17 | } |
| 18 | } |
| 19 |