3 Commits
3 changed files with 19 additions and 68 deletions

No files matched your search

Generated
-68
View File
@@ -1,68 +0,0 @@
{
"_readme": [
"This file locks the dependencies of your project to a known state",
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
"This file is @generated automatically"
],
"content-hash": "9771fcd7256da80520a2d0d0f95bf311",
"packages": [
{
"name": "psr/http-message",
"version": "1.0.1",
"source": {
"type": "git",
"url": "https://github.com/php-fig/http-message.git",
"reference": "f6561bf28d520154e4b0ec72be95418abe6d9363"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/php-fig/http-message/zipball/f6561bf28d520154e4b0ec72be95418abe6d9363",
"reference": "f6561bf28d520154e4b0ec72be95418abe6d9363",
"shasum": ""
},
"require": {
"php": ">=5.3.0"
},
"type": "library",
"extra": {
"branch-alias": {
"dev-master": "1.0.x-dev"
}
},
"autoload": {
"psr-4": {
"Psr\\Http\\Message\\": "src/"
}
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"MIT"
],
"authors": [
{
"name": "PHP-FIG",
"homepage": "http://www.php-fig.org/"
}
],
"description": "Common interface for HTTP messages",
"homepage": "https://github.com/php-fig/http-message",
"keywords": [
"http",
"http-message",
"psr",
"psr-7",
"request",
"response"
],
"time": "2016-08-06T14:39:51+00:00"
}
],
"packages-dev": [],
"aliases": [],
"minimum-stability": "stable",
"stability-flags": [],
"prefer-stable": false,
"prefer-lowest": false,
"platform": [],
"platform-dev": []
}
+13
View File
@@ -158,6 +158,19 @@ class Compiler
return $this->extensionList[$tokenName];
}
public function getExtensionInstanceOf(string $class) : Extension\Extension
{
foreach(array_reverse($this->extensionList) as $ext) {
if ( is_a($ext, $class, false) ) {
return $ext;
}
}
throw new \InvalidArgumentException(<<<MSG
Requested extension instance of `$class` could not be found from loaded Picea compiler's extension.
MSG);
}
public function exportFunctions() : void
{
static $caching = [];
+6
View File
@@ -210,9 +210,15 @@ PATTERN;
protected function domain() : string
{
# Forwarded from an SSL connected host
if ( ! empty($_SERVER['HTTP_X_FORWARDED_PROTO']) || ! empty($_SERVER['HTTP_X_FORWARDED_SSL']) ) {
$port = "";
}
# Forwarded from another host
elseif ( !empty($_SERVER['HTTP_X_FORWARDED_HOST'])) {
$port = explode(':', $_SERVER['HTTP_X_FORWARDED_HOST'])[1] ?? "";
}
# Default
else {
$port = $this->isDefaultPort() ? "" : ":" . $_SERVER['SERVER_PORT'];
}