Verzeichnisstruktur phpBB-3.1.0
- Veröffentlicht
- 27.10.2014
So funktioniert es
|
Auf das letzte Element klicken. Dies geht jeweils ein Schritt zurück |
Auf das Icon klicken, dies öffnet das Verzeichnis. Nochmal klicken schließt das Verzeichnis. |
|
(Beispiel Datei-Icons)
|
Auf das Icon klicken um den Quellcode anzuzeigen |
ContainerInterface.php
001 <?php
002
003 /*
004 * This file is part of the Symfony package.
005 *
006 * (c) Fabien Potencier <fabien@symfony.com>
007 *
008 * For the full copyright and license information, please view the LICENSE
009 * file that was distributed with this source code.
010 */
011
012 namespace Symfony\Component\DependencyInjection;
013
014 use Symfony\Component\DependencyInjection\Exception\InvalidArgumentException;
015 use Symfony\Component\DependencyInjection\Exception\ServiceCircularReferenceException;
016 use Symfony\Component\DependencyInjection\Exception\ServiceNotFoundException;
017
018 /**
019 * ContainerInterface is the interface implemented by service container classes.
020 *
021 * @author Fabien Potencier <fabien@symfony.com>
022 * @author Johannes M. Schmitt <schmittjoh@gmail.com>
023 *
024 * @api
025 */
026 interface ContainerInterface
027 {
028 const EXCEPTION_ON_INVALID_REFERENCE = 1;
029 const NULL_ON_INVALID_REFERENCE = 2;
030 const IGNORE_ON_INVALID_REFERENCE = 3;
031 const SCOPE_CONTAINER = 'container';
032 const SCOPE_PROTOTYPE = 'prototype';
033
034 /**
035 * Sets a service.
036 *
037 * @param string $id The service identifier
038 * @param object $service The service instance
039 * @param string $scope The scope of the service
040 *
041 * @api
042 */
043 public function set($id, $service, $scope = self::SCOPE_CONTAINER);
044
045 /**
046 * Gets a service.
047 *
048 * @param string $id The service identifier
049 * @param int $invalidBehavior The behavior when the service does not exist
050 *
051 * @return object The associated service
052 *
053 * @throws InvalidArgumentException if the service is not defined
054 * @throws ServiceCircularReferenceException When a circular reference is detected
055 * @throws ServiceNotFoundException When the service is not defined
056 *
057 * @see Reference
058 *
059 * @api
060 */
061 public function get($id, $invalidBehavior = self::EXCEPTION_ON_INVALID_REFERENCE);
062
063 /**
064 * Returns true if the given service is defined.
065 *
066 * @param string $id The service identifier
067 *
068 * @return bool true if the service is defined, false otherwise
069 *
070 * @api
071 */
072 public function has($id);
073
074 /**
075 * Gets a parameter.
076 *
077 * @param string $name The parameter name
078 *
079 * @return mixed The parameter value
080 *
081 * @throws InvalidArgumentException if the parameter is not defined
082 *
083 * @api
084 */
085 public function getParameter($name);
086
087 /**
088 * Checks if a parameter exists.
089 *
090 * @param string $name The parameter name
091 *
092 * @return bool The presence of parameter in container
093 *
094 * @api
095 */
096 public function hasParameter($name);
097
098 /**
099 * Sets a parameter.
100 *
101 * @param string $name The parameter name
102 * @param mixed $value The parameter value
103 *
104 * @api
105 */
106 public function setParameter($name, $value);
107
108 /**
109 * Enters the given scope
110 *
111 * @param string $name
112 *
113 * @api
114 */
115 public function enterScope($name);
116
117 /**
118 * Leaves the current scope, and re-enters the parent scope
119 *
120 * @param string $name
121 *
122 * @api
123 */
124 public function leaveScope($name);
125
126 /**
127 * Adds a scope to the container
128 *
129 * @param ScopeInterface $scope
130 *
131 * @api
132 */
133 public function addScope(ScopeInterface $scope);
134
135 /**
136 * Whether this container has the given scope
137 *
138 * @param string $name
139 *
140 * @return bool
141 *
142 * @api
143 */
144 public function hasScope($name);
145
146 /**
147 * Determines whether the given scope is currently active.
148 *
149 * It does however not check if the scope actually exists.
150 *
151 * @param string $name
152 *
153 * @return bool
154 *
155 * @api
156 */
157 public function isScopeActive($name);
158 }
159