Файл: gapps/vendor/vinkla/hashids/src/HashidsManager.php
Строк: 73
<?php
/*
* This file is part of Laravel Hashids.
*
* (c) Vincent Klaiber <hello@vinkla.com>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace VinklaHashids;
use GrahamCampbellManagerAbstractManager;
use IlluminateContractsConfigRepository;
/**
* This is the Hashids manager class.
*
* @author Vincent Klaiber <hello@vinkla.com>
*/
class HashidsManager extends AbstractManager
{
/**
* The factory instance.
*
* @var VinklaHashidsHashidsFactory
*/
private $factory;
/**
* Create a new Hashids manager instance.
*
* @param IlluminateContractsConfigRepository $config
* @param VinklaHashidsHashidsFactory $factory
*
* @return void
*/
public function __construct(Repository $config, HashidsFactory $factory)
{
parent::__construct($config);
$this->factory = $factory;
}
/**
* Create the connection instance.
*
* @param array $config
*
* @return mixed
*/
protected function createConnection(array $config)
{
return $this->factory->make($config);
}
/**
* Get the configuration name.
*
* @return string
*/
protected function getConfigName()
{
return 'hashids';
}
/**
* Get the factory instance.
*
* @return VinklaHashidsHashidsFactory
*/
public function getFactory()
{
return $this->factory;
}
}