📈 Add GlitchTip

Signed-off-by: Luke Tainton <luke@tainton.uk>
This commit is contained in:
2020-08-05 18:24:40 +01:00
parent baeeca06cf
commit c7ca1d751f
548 changed files with 74474 additions and 4 deletions

View File

@@ -0,0 +1,31 @@
<?php
namespace Http\Message\UriFactory;
use Http\Message\UriFactory;
use Psr\Http\Message\UriInterface;
use Slim\Http\Uri;
/**
* Creates Slim 3 URI.
*
* @author Mika Tuupola <tuupola@appelsiini.net>
*/
final class SlimUriFactory implements UriFactory
{
/**
* {@inheritdoc}
*/
public function createUri($uri)
{
if ($uri instanceof UriInterface) {
return $uri;
}
if (is_string($uri)) {
return Uri::createFromString($uri);
}
throw new \InvalidArgumentException('URI must be a string or UriInterface');
}
}