PHP code example of akrabat / rka-slim-zfsm-container

1. Go to this page and download the library: Download akrabat/rka-slim-zfsm-container library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

akrabat / rka-slim-zfsm-container example snippets


    $settings = [
        'settings' => [
            // user settings go here
        ],
        'factories' => [
            // new SM factories go here
        ],
        // you can use any other SM key here too.
    ];
    $container = new RKA\ZsmSlimContainer\Container($settings);
    $app = new \Slim\App($container);
    

$settings = [
    'factories' => [
        'errorHandler' => function ($container) {
            // do your own thing here
        },
    ],
];
$container = new RKA\ZsmSlimContainer\Container($settings);
$app = new \Slim\App($container);

$container->setAllowOverride(true);
$container['errorHandler'] = function($container) {
	// set-up error handler
};