Subversion-Projekte lars-tiefland.laravel_shop

Revision

Details | Letzte Änderung | Log anzeigen | RSS feed

Revision Autor Zeilennr. Zeile
199 lars 1
<?php namespace Clockwork\Support\Symfony;
2
 
3
use Clockwork\Clockwork;
4
use Clockwork\Storage\SymfonyStorage;
5
 
6
use Symfony\Component\DependencyInjection\ContainerInterface;
7
 
8
class ClockworkFactory
9
{
10
	public function __construct(ContainerInterface $container)
11
	{
12
		$this->container = $container;
13
	}
14
 
15
	public function clockwork()
16
	{
17
		return (new Clockwork)
18
			->authenticator($this->container->get('clockwork.authenticator'))
19
			->storage($this->container->get('clockwork.storage'));
20
	}
21
 
22
	public function clockworkAuthenticator()
23
	{
24
		return $this->container->get('clockwork.support')->makeAuthenticator();
25
	}
26
 
27
	public function clockworkStorage()
28
	{
29
		return new SymfonyStorage(
30
			$this->container->get('profiler'), substr($this->container->getParameter('profiler.storage.dsn'), 5)
31
		);
32
	}
33
 
34
	public function clockworkSupport($config)
35
	{
36
		return new ClockworkSupport($this->container, $config);
37
	}
38
}