PHP Classes

File: src/dependencies.php

Recommend this page to a friend!
  Classes of uche   PHP Job Portal Project API   src/dependencies.php   Download  
File: src/dependencies.php
Role: Example script
Content type: text/plain
Description: Example script
Class: PHP Job Portal Project API
API to post working jobs and let freelancers apply
Author: By
Last change:
Date: 1 year ago
Size: 581 bytes


Class file image Download
// DIC configuration

$container = $app->getContainer();

// view renderer
$container['renderer'] = function ($c) {
$settings = $c->get('settings')['renderer'];
    return new

// 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']));