PHP code example of guanhui07 / facade
1. Go to this page and download the library: Download guanhui07/facade 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/ */
guanhui07 / facade example snippets
$container = Container::instance();
FacadeFactory::setContainer($container);
class TestFacade extends AbstractFacade
{
protected static function accessor()
{
return TestService::class;
}
}
$service = TestFacade::instance();
TestFacade::someMethod();
$service = TestFacade::instance();
$service->someMethod();