pmvc / pmvc
Pure plugin framework (PMVC with PHP8), use anything you like. No mvc, http inside.
Installs: 13 569
Dependents: 81
Suggesters: 0
Security: 0
Stars: 9
Watchers: 3
Forks: 1
Open Issues: 0
Requires
- php: >=5.5.0
Requires (Dev)
- dev-main
- v3.0.3
- v3.0.2
- v3.0.1
- 3.0.0
- 2.3.19
- 2.3.14
- 2.3.13
- 2.2.6
- 2.1.6
- 2.1.5
- 1.8.2
- 1.8.1
- 1.8.0
- 1.7.1
- 1.6.6
- 1.5.4
- 1.5.3
- 1.4.11
- 1.4.8
- 1.4.6
- 1.4.4
- 1.4.3
- 1.3.10
- 1.3.6
- 1.1.0
- 1.0.3
- 0.13.7
- 0.13.4
- 0.13.0
- 0.12.1
- 0.11.0
- 0.10.5
- 0.10.4
- 0.10.3
- 0.10.1
- 0.9.8
- 0.8.12
- 0.8.5
- 0.8.1
- 0.7.156
- 0.7.155
- 0.7.149
- 0.7.135
- 0.7.100
- 0.7.82
- 0.7.68
- 0.6.1
- 0.5.4
- 0.4.5
- 0.3.8
- 0.3.4
- 0.2.131
- 0.2.12
- 0.2.5
- 0.1.13
- dev-analysis-e0BBxK
- dev-analysis-lZ11wr
- dev-analysis-neWl5A
- dev-analysis-9b3eRn
- dev-analysis-xgwK99
- dev-analysis-Ko2Ke3
- dev-analysis-Q3Ma9Z
- dev-analysis-9bd6d6
This package is auto-updated.
Last update: 2024-10-08 21:09:42 UTC
README
- PMVC
- Getting Started
- How to use?
- [M]odel [V]iew [C]ontroller
- PMVC Family
- Explain addPlugInFolders
- Quick test
PMVC
A simple MVC for unidirectional dataflow architecture.
Getting Started
- https://github.com/pmvc/pmvc/wiki
- Heroku (or Dokku) ready app test
How to use?
plug( 'PluginName', ['option'] );
Plugin Hello world
- Source Code
<?php
namespace PMVC\PlugIn\hello_world;
${_INIT_CONFIG}[_CLASS] = __NAMESPACE__.'\hello_world';
class hello_world extends \PMVC\PlugIn
{
public function say()
{
echo $this[0]."\n";
}
}
- Used
\PMVC\plug('hello_world', ['Hello, PMVC.'])->say();
PlugIn features
- addPlugInFolders
- callPlugin
- unPlug
- rePlug
- initPlugIn
- plug
PlugIn Generator
MVC
- Controller
- View
- https://github.com/search?q=topic:pmvc-view
- view_react
- view_html
- view_json
- view_cli
- Model
- MVC Demo Project
PMVC Family
- Core Library
- PMVC Plug-ins
- PMVC Applications
- PMVC Themes
Explain addPlugInFolders
The last folder will have more high priority.
Such as
addPlugInFolders(['./a', './b'])
If folder a and folder b both have same plugin will apply with folder b.
Quick test
composer require pmvc/pmvc
Quick test with docker
docker run --rm -v $(pwd):/var/www/html allfunc/pmvc-phpunit composer require pmvc/pmvc
- vim test.php
<?php
include_once('vendor/autoload.php');
\PMVC\Load::plug();
\PMVC\d("Hello There");
- Run
docker run --rm -v $(pwd):/var/www/html allfunc/pmvc-phpunit php ./test.php
MIT 2023