comparison vendor/symfony/routing/CompiledRoute.php @ 17:129ea1e6d783

Update, including to Drupal core 8.6.10
author Chris Cannam
date Thu, 28 Feb 2019 13:21:36 +0000
parents 1fec387a4317
children
comparison
equal deleted inserted replaced
16:c2387f117808 17:129ea1e6d783
35 * @param string|null $hostRegex Host regex 35 * @param string|null $hostRegex Host regex
36 * @param array $hostTokens Host tokens 36 * @param array $hostTokens Host tokens
37 * @param array $hostVariables An array of host variables 37 * @param array $hostVariables An array of host variables
38 * @param array $variables An array of variables (variables defined in the path and in the host patterns) 38 * @param array $variables An array of variables (variables defined in the path and in the host patterns)
39 */ 39 */
40 public function __construct($staticPrefix, $regex, array $tokens, array $pathVariables, $hostRegex = null, array $hostTokens = array(), array $hostVariables = array(), array $variables = array()) 40 public function __construct($staticPrefix, $regex, array $tokens, array $pathVariables, $hostRegex = null, array $hostTokens = [], array $hostVariables = [], array $variables = [])
41 { 41 {
42 $this->staticPrefix = (string) $staticPrefix; 42 $this->staticPrefix = (string) $staticPrefix;
43 $this->regex = $regex; 43 $this->regex = $regex;
44 $this->tokens = $tokens; 44 $this->tokens = $tokens;
45 $this->pathVariables = $pathVariables; 45 $this->pathVariables = $pathVariables;
52 /** 52 /**
53 * {@inheritdoc} 53 * {@inheritdoc}
54 */ 54 */
55 public function serialize() 55 public function serialize()
56 { 56 {
57 return serialize(array( 57 return serialize([
58 'vars' => $this->variables, 58 'vars' => $this->variables,
59 'path_prefix' => $this->staticPrefix, 59 'path_prefix' => $this->staticPrefix,
60 'path_regex' => $this->regex, 60 'path_regex' => $this->regex,
61 'path_tokens' => $this->tokens, 61 'path_tokens' => $this->tokens,
62 'path_vars' => $this->pathVariables, 62 'path_vars' => $this->pathVariables,
63 'host_regex' => $this->hostRegex, 63 'host_regex' => $this->hostRegex,
64 'host_tokens' => $this->hostTokens, 64 'host_tokens' => $this->hostTokens,
65 'host_vars' => $this->hostVariables, 65 'host_vars' => $this->hostVariables,
66 )); 66 ]);
67 } 67 }
68 68
69 /** 69 /**
70 * {@inheritdoc} 70 * {@inheritdoc}
71 */ 71 */
72 public function unserialize($serialized) 72 public function unserialize($serialized)
73 { 73 {
74 if (\PHP_VERSION_ID >= 70000) { 74 if (\PHP_VERSION_ID >= 70000) {
75 $data = unserialize($serialized, array('allowed_classes' => false)); 75 $data = unserialize($serialized, ['allowed_classes' => false]);
76 } else { 76 } else {
77 $data = unserialize($serialized); 77 $data = unserialize($serialized);
78 } 78 }
79 79
80 $this->variables = $data['vars']; 80 $this->variables = $data['vars'];