Extension:ForeachFunction

Purpose
This extension provides 'looping' functionality (e.g. 'foreach') for iterating through arrays.

Feature

 * Security: only pages with protection on 'edit' can use the keywords provided by this extension

Simple Array

 * The global object's property will be retrieved; the property should be an 'array'
 * The global object's method will be called: an array is expected as return value
 * The global array variable will be referenced using 'key' as key
 * The global array variable will be referenced (as a whole)
 * The static property of class name will be referenced (as a whole)
 * The global array variable will be referenced using 'key' as key
 * The global array variable will be referenced (as a whole)
 * The static property of class name will be referenced (as a whole)
 * The static property of class name will be referenced (as a whole)
 * The static property of class name will be referenced (as a whole)

Simple Array with Conditional
'match value' is represented by $match$ in the pattern field. When the 'value' of the current array entry matches the 'match' variable provided, then $match$ is replaced with 'match value'.
 * where {X:Y} can be:
 * { Global Object Name: Property }
 * { Global Object Name: Method }
 * { Global Array Variable: Key }
 * { Class Name: Static Property }

Array of Arrays

 * The global object's property will be retrieved; the property should be an 'array'
 * The global object's method will be called: an array is expected as return value
 * The global array variable will be referenced using 'key' as key
 * The global array variable will be referenced (as a whole)
 * The global array variable will be referenced using 'key' as key
 * The global array variable will be referenced (as a whole)
 * The global array variable will be referenced (as a whole)
 * The global array variable will be referenced (as a whole)

Dependancies

 * Extension:StubManager
 * Extension:ParserPhase2 extension

History

 * Added 'CLASS NAME::STATIC PROPERTY' support
 * Added 'addExemptNamespaces' function
 * Added '#foreachc' parser function