Compare commits

..

No commits in common. "565c0315d3935018cb2de5fe6b2881d0c83ffe13" and "6aa311b35d855ae62f591ca0dbf9b4c982d34ba7" have entirely different histories.

3 changed files with 0 additions and 44 deletions

View File

@ -5,7 +5,6 @@
} }
}, },
"require": { "require": {
"filp/whoops": "^2.1",
"xtreamwayz/pimple-container-interop": "^1.0", "xtreamwayz/pimple-container-interop": "^1.0",
"zendframework/zend-expressive": "^1.0", "zendframework/zend-expressive": "^1.0",
"zendframework/zend-expressive-fastroute": "^1.2", "zendframework/zend-expressive-fastroute": "^1.2",

View File

@ -2,7 +2,6 @@
use Test\App\HomeAction; use Test\App\HomeAction;
use Test\App\HomeFactory; use Test\App\HomeFactory;
use Test\App\DummyRenderer;
use Xtreamwayz\Pimple\Container; use Xtreamwayz\Pimple\Container;
use Zend\Expressive\Application; use Zend\Expressive\Application;
use Zend\Expressive\Container\ApplicationFactory; use Zend\Expressive\Container\ApplicationFactory;
@ -12,7 +11,6 @@ use Zend\Expressive\Helper\UrlHelperMiddleware;
use Zend\Expressive\Helper\UrlHelperMiddlewareFactory; use Zend\Expressive\Helper\UrlHelperMiddlewareFactory;
use Zend\Expressive\Router\FastRouteRouter; use Zend\Expressive\Router\FastRouteRouter;
use Zend\Expressive\Router\RouterInterface; use Zend\Expressive\Router\RouterInterface;
use Zend\Expressive\Template\TemplateRendererInterface;
$c = new Container; $c = new Container;
@ -22,12 +20,6 @@ $c[RouterInterface::class] = function () { return new FastRouteRouter; };
$c[UrlHelper::class] = new UrlHelperFactory; $c[UrlHelper::class] = new UrlHelperFactory;
$c[UrlHelperMiddleware::class] = new UrlHelperMiddlewareFactory; $c[UrlHelperMiddleware::class] = new UrlHelperMiddlewareFactory;
$c[HomeAction::class] = new HomeFactory; $c[HomeAction::class] = new HomeFactory;
$c[TemplateRendererInterface::class] = function () { return new DummyRenderer; };
$c['Zend\Expressive\Whoops'] = function () { return new Whoops\Run; };
$c['Zend\Expressive\WhoopsPageHandler'] = function () { return new Whoops\Handler\PrettyPageHandler; };
$c['Zend\Expressive\FinalHandler'] = new Zend\Expressive\Container\WhoopsErrorHandlerFactory;
$c[Application::class] = new ApplicationFactory; $c[Application::class] = new ApplicationFactory;
return $c; return $c;

View File

@ -1,35 +0,0 @@
<?php
namespace Test\App;
use Zend\Expressive\Template\TemplateRendererInterface;
class DummyRenderer
implements TemplateRendererInterface
{
protected $paths = array();
public function render($name, $params = array())
{
$params = print_r(['params' => $params, 'paths' => $this->paths], true);
$params = str_replace("\n", "<br/>\n", $params);
$params = str_replace(" ", "&ensp;", $params);
return "Render template '$name'<br/>Params: $params";
}
public function addPath($path, $namespace = null)
{
if ($namespace !== null) $namespace .= '::';
$this->paths[] = $namespace . $path;
}
public function getPaths()
{
return $this->paths;
}
public function addDefaultParam($templateName, $param, $value)
{
throw new \RuntimeException('Not implemented');
}
}