PHP code example of icanboogie / bind-prototype
1. Go to this page and download the library: Download icanboogie/bind-prototype 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/ */
icanboogie / bind-prototype example snippets
namespace ICanBoogie;
s[Prototype\Config::class]; // obtain the "prototype" config.
// config/prototype.php
namespace App;
use ICanBoogie\Binding\Prototype\ConfigBuilder;
return fn(ConfigBuilder $config) => $config
->bind(Article::class, 'url', [ Hooks::class, 'url' ])
->bind(Article::class, 'get_url', [ Hooks::class, 'get_url' ]);