Binds icanboogie/prototype to ICanBoogie.
The icanboogie/bind-prototype package binds icanboogie/prototype to ICanBoogie, using its
Autoconfig feature. It provides a config synthesizer for prototype methods defined in
<?php namespace ICanBoogie; require 'vendor/autoload.php'; $app = boot(); $app->configs['prototype']; // obtain the "prototype" config.
hooks configuration fragments, components may bind multiple prototype methods.
The following example demonstrates how an application may bind a
url() method and a
url property to instances of
<?php // config/prototype.php namespace App; $hooks = Hooks::class . '::'; return [ Article::class . '::url' => $hooks . '::url', Article::class . '::get_url' => $hooks . '::url' ];
The package requires PHP 7.2 or later.
composer require icanboogie/bind-prototype
The package is documented as part of the ICanBoogie framework
documentation. You can generate the documentation for the package
and its dependencies with the
make doc command. The documentation is generated in the
build/docs directory. ApiGen is required. The directory can later be
cleaned with the
make clean command.
make test-container to create and log into the test container, then run
make test to run the
test suite. Alternatively, run
make test-coverage to run the test suite with test coverage. Open
build/coverage/index.html to see the breakdown of the code coverage.
icanboogie/bind-prototype is released under the New BSD License.