pmvc
sync with 2023
Ein einfaches MVC für die unidirektionale Datenflow -Architektur.
plug( 'PluginName', ['option'] );
<?php
namespace PMVCPlugInhello_world;
${_INIT_CONFIG}[_CLASS] = __NAMESPACE__.'hello_world';
class hello_world extends PMVCPlugIn
{
public function say()
{
echo $this[0]."n";
}
}
PMVCplug('hello_world', ['Hello, PMVC.'])->say();
Der letzte Ordner hat eine höhere Priorität.
Wie zum Beispiel
addPlugInFolders(['./a', './b'])
Wenn der Ordner A und der Ordner B beide das gleiche Plugin haben, wird mit Ordner b gelten b.
composer require pmvc/pmvc
docker run --rm -v $(pwd):/var/www/html allfunc/pmvc-phpunit composer require pmvc/pmvc
<?php
include_once('vendor/autoload.php');
PMVCLoad::plug();
PMVCd("Hello There");
docker run --rm -v $(pwd):/var/www/html allfunc/pmvc-phpunit php ./test.php
MIT 2023