OSDN Git Service
(root)
/
php-libraries
/
Router.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
8b0128c
)
Back port array long syntax
author
malukenho
<admin@phpse.net>
Thu, 18 Dec 2014 11:20:43 +0000
(08:20 -0300)
committer
malukenho
<admin@phpse.net>
Tue, 3 Feb 2015 11:20:43 +0000
(08:20 -0300)
src/PHPRouter/Route.php
patch
|
blob
|
history
diff --git
a/src/PHPRouter/Route.php
b/src/PHPRouter/Route.php
index
aba9ecd
..
8b28321
100755
(executable)
--- a/
src/PHPRouter/Route.php
+++ b/
src/PHPRouter/Route.php
@@
-30,7
+30,7
@@
class Route
*
* @var string[]
*/
*
* @var string[]
*/
- private $methods =
['GET', 'POST', 'PUT', 'DELETE']
;
+ private $methods =
array('GET', 'POST', 'PUT', 'DELETE')
;
/**
* Target for this route, can be anything.
/**
* Target for this route, can be anything.
@@
-48,13
+48,13
@@
class Route
* Custom parameter filters for this route
* @var array
*/
* Custom parameter filters for this route
* @var array
*/
- private $filters =
[]
;
+ private $filters =
array()
;
/**
* Array containing parameters passed through request URL
* @var array
*/
/**
* Array containing parameters passed through request URL
* @var array
*/
- private $parameters =
[]
;
+ private $parameters =
array()
;
/**
* @var array
/**
* @var array
@@
-69,7
+69,7
@@
class Route
{
$this->url = $resource;
$this->config = $config;
{
$this->url = $resource;
$this->config = $config;
- $this->methods = $config['methods'] ?:
[]
;
+ $this->methods = $config['methods'] ?:
array()
;
$this->target = $config['target'] ?: null;
}
$this->target = $config['target'] ?: null;
}
@@
-127,7
+127,7
@@
class Route
public function getRegex()
{
public function getRegex()
{
- return preg_replace_callback("/:(\w+)/",
[&$this, 'substituteFilter']
, $this->url);
+ return preg_replace_callback("/:(\w+)/",
array(&$this, 'substituteFilter')
, $this->url);
}
private function substituteFilter($matches)
}
private function substituteFilter($matches)