PHP code example of gisostallenberg / velpon-loader
1. Go to this page and download the library: Download gisostallenberg/velpon-loader 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/ */
gisostallenberg / velpon-loader example snippets
use GisoStallenberg\VelponLoader\VelponLoader;
// Note that the stack order is reversed (ClassToPlug extends ClassToPlugPluginOne extends ClassToPlugPluginTwo)
VelponLoader::register([
'plugin_two' => [
'ClassToPlug' => 'ClassToPlugPluginTwo'
],
'plugin_one' => [
'ClassToPlug' => 'ClassToPlugPluginOne'
],
]);
// ClassToPlug.php
class ClassToPlugPluggable {}
// ClassToPlugPluginOne.php
class ClassToPlugPluginOne extends ClassToPlugPluginOneVelpon {}
// ClassToPlugPluginTwo.php
class ClassToPlugPluginTwo extends ClassToPlugPluginTwoVelpon {}