Extension:FlowProcessor

From MediaWiki.org
Jump to: navigation, search
MediaWiki extensions manual - list
Crystal Clear action run.png
FlowProcessor

Release status: beta

Description
Author(s) Jean-Lou Dupont
Last version 1.3.0
MediaWiki 1.11, 1.12
License No license specified
Download SVN
See SVN ($Id: FlowProcessor.doc.wikitext 1001 2008-04-08 00:40:16Z jeanlou.dupont $)

Check usage (experimental)

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]

require_once( "$IP/extensions/FlowProcessor/FlowProcessor.php" );
  • Since this Extensions is depending on StubManager, add the line after the StubManager include, or else your Wiki won't work.

[edit] PEAR

PEAR is a repository of PHP software code.

pear channel-discover mediawiki.googlecode.com/svn
  • Install extension through PEAR:
pear install mediawiki/FlowProcessor
  • Add the following to LocalSettings.php[2][3]:
require 'MediaWiki/FlowProcessor/FlowProcessor.php';
  • Note that the required version of PEAR must be respected. Currently, the minimum version of PEAR usable with this channel is v1.6.2. Perform the following command to upgrade to the latest version of PEAR:
pear upgrade pear

[edit] Upgrades through PEAR

Sometimes, it is necessary to clear PEAR's cache in order to perform upgrades.

pear clear-cache

or use the force method:

pear upgrade --force mediawiki/FlowProcessor

[edit] PEAR Web Frontend

For 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 up-to-date with this channel, use the following RSS feed__Rss2.jpg.

[edit] Notes

[edit] Other Extensions From the same author

Consult User Jldupont's page.


  1. The most recent release is always available through the extension's PEAR and SVN repositories. This page is not necessarily up-to-date.
  2. 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.
  3. Modifications to LocalSettings.php is 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
Personal tools
Namespaces
Variants
Actions
Site
Support
Download
Development
Communication
Print/export
Toolbox