added php-view dependency

This commit is contained in:
buttle 2016-10-25 20:24:02 +02:00
parent 6d982b5830
commit b253c3c0d2
4 changed files with 53 additions and 15 deletions

View file

@ -6,7 +6,7 @@
"license": "GPL3",
"authors": [
{
"name": "Chris Fanninf",
"name": "Chris Fanning",
"email": "chris@entitatstransparents.org",
"homepage": "http://entitatstransparents.org/"
}
@ -14,6 +14,7 @@
"require": {
"php": ">=5.5.0",
"slim/slim": "^3.1",
"slim/php-view": "^2.0",
"sabre/vobject": "^4.0"
}
}

53
composer.lock generated
View file

@ -4,8 +4,8 @@
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#composer-lock-the-lock-file",
"This file is @generated automatically"
],
"hash": "c2fe08f137e05ef82c2c0faba5e27761",
"content-hash": "f89a3ea8bcb32ffe5584e41f41c1f8a2",
"hash": "6f01d7fb44f7156e210e706856bf2faf",
"content-hash": "3fdf5806c10be295f9fd3f1743965aa9",
"packages": [
{
"name": "container-interop/container-interop",
@ -384,6 +384,55 @@
],
"time": "2016-10-09 22:57:52"
},
{
"name": "slim/php-view",
"version": "2.2.0",
"source": {
"type": "git",
"url": "https://github.com/slimphp/PHP-View.git",
"reference": "122ed121a8d9cf91a94020814d2a3ee6c836754f"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/slimphp/PHP-View/zipball/122ed121a8d9cf91a94020814d2a3ee6c836754f",
"reference": "122ed121a8d9cf91a94020814d2a3ee6c836754f",
"shasum": ""
},
"require": {
"psr/http-message": "^1.0"
},
"require-dev": {
"phpunit/phpunit": "^4.8",
"slim/slim": "^3.0"
},
"type": "library",
"autoload": {
"psr-4": {
"Slim\\Views\\": "src"
}
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"MIT"
],
"authors": [
{
"name": "Glenn Eggleton",
"email": "geggleto@gmail.com"
}
],
"description": "Render PHP view scripts into a PSR-7 Response object.",
"keywords": [
"framework",
"php",
"phtml",
"renderer",
"slim",
"template",
"view"
],
"time": "2016-10-11 07:43:08"
},
{
"name": "slim/slim",
"version": "3.5.0",

View file

@ -21,9 +21,6 @@ $app = new \Slim\App($settings);
// Set up dependencies
require __DIR__ . '/../src/dependencies.php';
// Register middleware
require __DIR__ . '/../src/middleware.php';
// Register routes
require __DIR__ . '/../src/routes.php';

View file

@ -8,12 +8,3 @@ $container['renderer'] = function ($c) {
$settings = $c->get('settings')['renderer'];
return new Slim\Views\PhpRenderer($settings['template_path']);
};
// monolog
$container['logger'] = function ($c) {
$settings = $c->get('settings')['logger'];
$logger = new Monolog\Logger($settings['name']);
$logger->pushProcessor(new Monolog\Processor\UidProcessor());
$logger->pushHandler(new Monolog\Handler\StreamHandler($settings['path'], $settings['level']));
return $logger;
};