The WFModuleInvocation object is a wrapper around WFModule. This allows the modules to be nicely decoupled from the callers. Thus, the http handler can create a WFModuleInvocation based on the URL, while a WFModuleView can create one based on parameters set by a caller.
This is particularly useful for using the module infrastructure to render HTML for emails, etc.
WFModuleInvocation is also used to keep track of "composited" pages. That is, pages can contain arbitrarily nested pages WFModuleView. This allows easy creation of portal-type environments and promotes re-use of pages as components. Since most reusable components of web pages are more complicated than single widgets (ie WFView or WFWidget subclasses), the ability to use modules as components allows for the creation of re-usable components that harness the power of the Module/Page system. This way, components can use bindings, formatters, GUI builder, etc and thus make it much easier for developers to build re-usable components for their applications.
The ROOT module always has a skin, and its output will be skinned by default. Sub-modules by default have no skin. Callers may be interested in either the module's skin skin() on the "root" skin rootSkin() of the module.
Developers may still want to develop new WFWidget and WFView subclasses, but these should be limited to their appropriate scope, which is non-application specific UI widgets.
Located in /framework/WFModule.php (line 37)
WFObject | --WFModuleInvocation
Easily convert an invocation path into the resulting HTML.
Perfect for buliding emails, AJAX popups, etc.
NOTE: this mechanism doesn't allow you to communitcate with the module before execution.
If you want to pass data to a WFModuleInvocation before executing, you'll need to instantiate WFModuleInvocation yourself and call execute() manually.
Constructor used to create a new WFModuleInvocation.
A WFModuleInvocation wraps the execution of a module. It contains all of the environment information needed to actually load and cause a module to execute and return the rendered result.
Execute the module wrapped by this invocation.
This function is where the invocationPath is parsed, the WFModule instantiated, and the module executed.
Get the invocationPath that was used to create this WFModuleInvocation.
Is this module the root invocation?
Get the name of the module that this invocation is wrapping.
Get the module path to the current module.
Will always be normalized to the form: path/to/myModule
Get the "modules" directory used to access this module.
This is not necessarily the entire path to the module; the entire path to the module is modulesDir() + modulePath()
Get the name of the page that this invocation will call in the module.
Get the parameters that were provided in the invocationPath.
Get the parameters that were provided in the invocationPath, as a '/'-separated string.
Get the parent invocation.
should this invocation of this module respond to forms?
Get the root invocation for this invocation. This may be the current invocation.
Please note that it is possible to have multiple "root" invocations -- this routine just finds the root of the "current" tree.
Get the skin used by the ROOT module of this module hierarchy.
This function should be used if you want access to the skin that will be wrapping the current page, regardless of where in the module hierarchy the caller is.
Set the "modules" directory used to access this module.
This is not necessarily the entire path to the module; the entire path to the module is modulesDir() + modulePath()
Set whether or not the module in this invocation should respond to forms.
set the skin delegate for this invocation.
Should this invocation target the root invocation's module, or the current module?
For modules that target the root module, their forms will always post to the root module. This will result in keeping the current "compositing" of the root module.
For modules that target the current module, their forms will always post to the current module. This will result in making the sub-module the root module if a form is submitted.
Get the skin for this module invocation.
This function should be used if you want to know if this module itself has a skin. Contrast with rootSkin().
Does this invocation target the root invocation's module, or the current module?
Inherited From WFObject
WFObject::__construct()
WFObject::exposedProperties()
WFObject::getClass()
WFObject::keyPathToTargetAndKey()
WFObject::setValueForKey()
WFObject::setValueForKeyPath()
WFObject::validateValueForKey()
WFObject::validateValueForKeyPath()
WFObject::valueForKey()
WFObject::valueForKeyPath()
WFObject::valueForUndefinedKey()
WFObject::__toString()
Documentation generated on Thu, 17 Apr 2008 13:51:57 -0400 by phpDocumentor 1.4.1