Verzeichnisstruktur phpBB-3.2.0
- Veröffentlicht
- 06.01.2017
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 |
CompiledRoute.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\Routing;
013
014 /**
015 * CompiledRoutes are returned by the RouteCompiler class.
016 *
017 * @author Fabien Potencier <fabien@symfony.com>
018 */
019 class CompiledRoute implements \Serializable
020 {
021 private $variables;
022 private $tokens;
023 private $staticPrefix;
024 private $regex;
025 private $pathVariables;
026 private $hostVariables;
027 private $hostRegex;
028 private $hostTokens;
029
030 /**
031 * Constructor.
032 *
033 * @param string $staticPrefix The static prefix of the compiled route
034 * @param string $regex The regular expression to use to match this route
035 * @param array $tokens An array of tokens to use to generate URL for this route
036 * @param array $pathVariables An array of path variables
037 * @param string|null $hostRegex Host regex
038 * @param array $hostTokens Host tokens
039 * @param array $hostVariables An array of host variables
040 * @param array $variables An array of variables (variables defined in the path and in the host patterns)
041 */
042 public function __construct($staticPrefix, $regex, array $tokens, array $pathVariables, $hostRegex = null, array $hostTokens = array(), array $hostVariables = array(), array $variables = array())
043 {
044 $this->staticPrefix = (string) $staticPrefix;
045 $this->regex = $regex;
046 $this->tokens = $tokens;
047 $this->pathVariables = $pathVariables;
048 $this->hostRegex = $hostRegex;
049 $this->hostTokens = $hostTokens;
050 $this->hostVariables = $hostVariables;
051 $this->variables = $variables;
052 }
053
054 /**
055 * {@inheritdoc}
056 */
057 public function serialize()
058 {
059 return serialize(array(
060 'vars' => $this->variables,
061 'path_prefix' => $this->staticPrefix,
062 'path_regex' => $this->regex,
063 'path_tokens' => $this->tokens,
064 'path_vars' => $this->pathVariables,
065 'host_regex' => $this->hostRegex,
066 'host_tokens' => $this->hostTokens,
067 'host_vars' => $this->hostVariables,
068 ));
069 }
070
071 /**
072 * {@inheritdoc}
073 */
074 public function unserialize($serialized)
075 {
076 $data = unserialize($serialized);
077 $this->variables = $data['vars'];
078 $this->staticPrefix = $data['path_prefix'];
079 $this->regex = $data['path_regex'];
080 $this->tokens = $data['path_tokens'];
081 $this->pathVariables = $data['path_vars'];
082 $this->hostRegex = $data['host_regex'];
083 $this->hostTokens = $data['host_tokens'];
084 $this->hostVariables = $data['host_vars'];
085 }
086
087 /**
088 * Returns the static prefix.
089 *
090 * @return string The static prefix
091 */
092 public function getStaticPrefix()
093 {
094 return $this->staticPrefix;
095 }
096
097 /**
098 * Returns the regex.
099 *
100 * @return string The regex
101 */
102 public function getRegex()
103 {
104 return $this->regex;
105 }
106
107 /**
108 * Returns the host regex.
109 *
110 * @return string|null The host regex or null
111 */
112 public function getHostRegex()
113 {
114 return $this->hostRegex;
115 }
116
117 /**
118 * Returns the tokens.
119 *
120 * @return array The tokens
121 */
122 public function getTokens()
123 {
124 return $this->tokens;
125 }
126
127 /**
128 * Returns the host tokens.
129 *
130 * @return array The tokens
131 */
132 public function getHostTokens()
133 {
134 return $this->hostTokens;
135 }
136
137 /**
138 * Returns the variables.
139 *
140 * @return array The variables
141 */
142 public function getVariables()
143 {
144 return $this->variables;
145 }
146
147 /**
148 * Returns the path variables.
149 *
150 * @return array The variables
151 */
152 public function getPathVariables()
153 {
154 return $this->pathVariables;
155 }
156
157 /**
158 * Returns the host variables.
159 *
160 * @return array The variables
161 */
162 public function getHostVariables()
163 {
164 return $this->hostVariables;
165 }
166 }
167