1
0
mirror of https://github.com/Rudloff/alltube.git synced 2024-07-02 08:20:56 +02:00
alltube/classes/Factory/LocaleManagerFactory.php
2020-10-20 23:29:50 +02:00

28 lines
509 B
PHP

<?php
namespace Alltube\Factory;
use Alltube\Exception\DependencyException;
use Alltube\LocaleManager;
/**
* Class LocaleManagerFactory
* @package Alltube
*/
class LocaleManagerFactory
{
/**
* @return LocaleManager|null
* @throws DependencyException
*/
public static function create()
{
if (!class_exists('Locale')) {
throw new DependencyException('You need to install the intl extension for PHP.');
}
return new LocaleManager();
}
}