Move factory classes to a subfolder
This commit is contained in:
parent
123a6c5ad9
commit
0a220d4d8e
9 changed files with 21 additions and 17 deletions
27
classes/Factory/LocaleManagerFactory.php
Normal file
27
classes/Factory/LocaleManagerFactory.php
Normal file
|
@ -0,0 +1,27 @@
|
|||
<?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();
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue