Extension:FlowProcessor
From MediaWiki.org
|
FlowProcessor Release status: beta |
|
|---|---|
| Description | |
| Author(s) | Jean-Lou Dupont |
| Version | 1.3.0 |
| MediaWiki | 1.11, 1.12 |
| Download | SVN See SVN ($Id: FlowProcessor.doc.wikitext 1001 2008-04-08 00:40:16Z jeanlou.dupont $) |
Contents |
[edit] Purpose
Provides a framework for an MVC (Model, View, Controller) flow system; flows are implemented separately.
[edit] Features
- Secure: for code located in the database, the containing page must be edit protected (i.e. accessible normally only by users of the sysop group)
- Flexible: the whole MediaWiki framework is accessible
- Extensible
- Configuration help: see information in Special:Version
[edit] Theory Of Operation
- A user accesses a flow based special page through Special:Flow$flow where $flow$ is the identifier of the flow
- The controller for flow $flow can be located in the following (in priority order):
- PEAR directory under the file path MediaWiki/Flows/$flow/controller.php
- MediaWiki database under the page title Flow:$flow (see note below)
- Pages under the Flow namespace must be edit protected
[edit] Controller Code
The controller code, whether located in a file or in the MediaWiki database uses the same format. The code section can optionally be enclosed in source tag for syntax highlighting with an extension such as Extension:Geshi. A skeleton controller code is found next:
/** * Standard MediaWiki entry point for * ''Special Page'' FlowTest */ function wfSpecialFlowTest( $params ) { $proc = new MW_Flow_Test( $params ); $proc->execute(); } class MW_Flow_Test extends SpecialPage { var $params = null; function __construct( &$params ) { $this->params = $params; } function execute( ) { $this->setHeaders(); var_dump( $this->params ); } function getDescription() { return "Test1 !"; } }
[edit] Dependencies
- An extra namespace named Flow can optionally be declared in order to edit the controller code for flows
- StubManager extension version >= 1.2.0
- Extension:Geshi is optional; it is used to syntax highlight PHP code in controller pages when these are located in database as standard MediaWiki pages.
[edit] Installation
See the Mediawiki Extension table entry "download" above.[1]
[edit] LocalSettings.php
Extension:ExtensionManager: See footnote[2]
- Add the following to LocalSettings.php if the extension was downloaded from Jean-Lou Dupont's MediaWiki SVN directory (link in the download entry of the table above)[2]:
require_once( "$IP/extensions/FlowProcessor/FlowProcessor.php" );
[edit] PEARPEAR is a repository of software code.
require 'MediaWiki/FlowProcessor/FlowProcessor.php';
[edit] Upgrades through PEARSometimes, it is necessary to clear PEAR's cache in order to perform upgrades.
or use the force method:
[edit] PEAR Web FrontendFor easier remote package management, PEAR Frontend WEB can be installed. Installation notes can be found here. An example of the WEB frontend is available here. |
[edit] RSS feed
To keep kept up-to-date with this channel, use the following RSS feed
.
[edit] Notes
[edit] Sandbox
You are invited in the author's sandbox to try-out some of his extensions.
[edit] Other Extensions From the same author
Consult User Jldupont's page.
- ↑ The most recent release is always available through the extension's PEAR and SVN repositories. This page is not necessarily up-to-date.
- ↑ 2.0 2.1 2.2 Extension:ExtensionManager does not require any modification to LocalSettings.php because ExtensionManager includes the extension.
Note that if PHP code caching is in place (e.g. APC, eAccelerator), then to successfully complete the installation a cache flush might be needed. - ↑ Modifications to
LocalSettings.phpis only necessary if not using Extension:ExtensionManager
[edit] Further Installation Notes
- The namespace Flow should, if used, be accessed controlled as it can allow a user to edit and execute arbitrary PHP code.
[edit] History
| Release | Notes |
|---|---|
| 1.0.0 | Initial Release |
| 1.1.0 | Added requirement for pages in the Flow must be edit protected |
| 1.2.0 | Simplified operation: only look for wfSpecialFlow$flow function |
| 1.3.0 | Added debug/configuration helper messages in Special:Version through the new version of Extension:StubManager |

