PHP code example of rjd22 / kohana-pimple

1. Go to this page and download the library: Download rjd22/kohana-pimple 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/ */

    

rjd22 / kohana-pimple example snippets


return [
    'dependency.one' => function ($c) {
        return new Dependency\One;
    },
    'dependency.two' => function ($c) {
        return new Dependency\Two($c['dependency.one']);
    },
];

$this->container->has('dependency.one');

$this->container->get('dependency.one');

$container = Container::factory();