PHP code example of isholao / container

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

    

isholao / container example snippets





ew \Isholao\Container\Container();
$c->set('name','ishola'); // $c->name = 'ishola';

if($c->has('name'))
{
    echo $c->get('name'); // $c->name;
}

$c->protected('response', function (){});

$c->response();





ew \Isholao\Container\Container();
$c->protect('name','ishola');

$c->name = 'ishola'; // throw error