-
Notifications
You must be signed in to change notification settings - Fork 44
Expand file tree
/
Copy pathSymfonyContainer.php
More file actions
71 lines (57 loc) · 1.54 KB
/
SymfonyContainer.php
File metadata and controls
71 lines (57 loc) · 1.54 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
<?php
/**
* This file is a part of PhpStorm project.
*
* @author Alexandr Viniychuk <a@viniychuk.com>
* created: 9/23/16 10:08 PM
*/
namespace Youshido\GraphQLBundle\Execution\Container;
use Symfony\Component\DependencyInjection\ContainerAwareInterface;
use Symfony\Component\DependencyInjection\ContainerAwareTrait;
use Youshido\GraphQL\Execution\Container\ContainerInterface;
class SymfonyContainer implements ContainerInterface, ContainerAwareInterface
{
use ContainerAwareTrait;
public function get($id)
{
return $this->container->get($id);
}
public function set($id, $value)
{
$this->container->set($id, $value);
return $this;
}
public function remove($id)
{
throw new \RuntimeException('Remove method is not available for Symfony container');
}
public function has($id)
{
return $this->container->has($id);
}
public function initialized($id)
{
return $this->container->initialized($id);
}
public function setParameter($name, $value)
{
$this->container->setParameter($name, $value);
return $this;
}
public function getParameter($name)
{
return $this->container->getParameter($name);
}
public function hasParameter($name)
{
return $this->container->hasParameter($name);
}
/**
* Exists temporarily for ContainerAwareField that is to be removed in 1.5
* @return mixed
*/
public function getSymfonyContainer()
{
return $this->container;
}
}