aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorIvan Enderlin <ivan.enderlin@hoa-project.net>2013-06-06 23:14:03 +0200
committerIvan Enderlin <ivan.enderlin@hoa-project.net>2013-06-06 23:14:03 +0200
commit9bbe0e8e2ae552cde3b52f13429b2064384199ef (patch)
treea62cc6f64f294784e5e00b836147fc726abc9a4b
parent07700f353db960e75c0592fa4aa3e0631c800e24 (diff)
downloadRouter-9bbe0e8e2ae552cde3b52f13429b2064384199ef.zip
Router-9bbe0e8e2ae552cde3b52f13429b2064384199ef.tar.gz
Router-9bbe0e8e2ae552cde3b52f13429b2064384199ef.tar.bz2
Use static:: instead of $this->.
-rw-r--r--Http.php16
1 files changed, 8 insertions, 8 deletions
diff --git a/Http.php b/Http.php
index fc4a07a..f826b1e 100644
--- a/Http.php
+++ b/Http.php
@@ -180,7 +180,7 @@ class Http extends Generic implements \Hoa\Core\Parameter\Parameterizable {
);
}
- $this->setDefaultPort($this->getPort(), $this->isSecure());
+ $this->setDefaultPort(static::getPort(), static::isSecure());
return;
}
@@ -265,7 +265,7 @@ class Http extends Generic implements \Hoa\Core\Parameter\Parameterizable {
if(null === $uri) {
- $uri = $this->getURI();
+ $uri = static::getURI();
$subdomain = $this->getSubdomain();
}
else {
@@ -374,7 +374,7 @@ class Http extends Generic implements \Hoa\Core\Parameter\Parameterizable {
array_shift($muri);
$sub = array_shift($msubdomain) ?: null;
- $rule[Router::RULE_VARIABLES]['_domain'] = $this->getDomain();
+ $rule[Router::RULE_VARIABLES]['_domain'] = static::getDomain();
$rule[Router::RULE_VARIABLES]['_subdomain'] = $sub;
$rule[Router::RULE_VARIABLES]['_call'] = &$rule[Router::RULE_CALL];
$rule[Router::RULE_VARIABLES]['_able'] = &$rule[Router::RULE_ABLE];
@@ -464,7 +464,7 @@ class Http extends Generic implements \Hoa\Core\Parameter\Parameterizable {
'Subdomain is empty, cannot unroute the rule %s properly.',
6, $id);
- $secure = null === $secured ? $this->isSecure() : $secured;
+ $secure = null === $secured ? static::isSecure() : $secured;
if(false !== $pos = strpos($pattern, '@'))
$pattern = substr($pattern, $pos + 1);
@@ -530,7 +530,7 @@ class Http extends Generic implements \Hoa\Core\Parameter\Parameterizable {
return $prependPrefix($this->_unroute($id, $pattern, $variables)) .
$anchor;
- $secure = null === $secured ? $this->isSecure() : $secured;
+ $secure = null === $secured ? static::isSecure() : $secured;
return (true === $secure ? 'https://' : 'http://') .
$this->_unroute($id, $subPattern, $variables, false) .
@@ -698,9 +698,9 @@ class Http extends Generic implements \Hoa\Core\Parameter\Parameterizable {
$sub = $this->getSubdomain();
if(empty($sub))
- return $this->getDomain();
+ return static::getDomain();
- return substr($this->getDomain(), strlen($sub) + 1);
+ return substr(static::getDomain(), strlen($sub) + 1);
}
/**
@@ -712,7 +712,7 @@ class Http extends Generic implements \Hoa\Core\Parameter\Parameterizable {
*/
public function getSubdomain ( $withSuffix = true ) {
- $domain = $this->getDomain();
+ $domain = static::getDomain();
if(empty($domain))
return null;