midcom_helper__componentloaderThis class is a Factory that is responsible for loading and establishing the interface to a MidCOM Component.
When the component loader receives a request it roughly works in three stages:
Stage 2 will then load the interfaces.php file from the midcom directory. The existence of all required Interface classes is then checked. If this check is successful, the concrete classes of the various interface concepts are instantiated and stored internally. The component is initialized by the call to MIDCOM::initialize() which should load everything necessary.
Stage 3 is the final stage where the loader stays in memory in order to return references (!) to the loaded component's Interface Classes upon request.
In case you need an instance of the component loader to verify or transform component paths, use the function midcom_application::get_component_loader, which returns a reference to the loader.
Located in /midcom/helper/_componentloader.php (line 52)
Array
$_component_classes
(line 71)
This is a part of the component cache. It stores references to the COMPONENT classes of the different loaded components, indexed by their MidCOM Path.
Array
$_component_properties
(line 90)
This is a part of the component cache. It stores the properties of the already loaded components.
Array
$_contentadmin_classes
(line 81)
This is a part of the component cache. It stores references to the Content Administration variant of the COMPONENT classes of the different loaded components, indexed by their MidCOM Path.
Array
$_interface_classes
(line 101)
This is a part of the component cache. It stores references to the interface classes of the different loaded components, indexed by their MidCOM Path.
Array
$_loaded
(line 61)
This indexed array stores the MidCOM paths of all loaded components. Its elements are used as keys for the cache storage.
Array
$_midcom_classes
(line 112)
This is a part of the component cache. It stores references to the MIDCOM classes of the different loaded component, indexed by their MidCOM Path.
Array
$_nap_classes
(line 134)
This is a part of the component cache. It stores references to the NAP classes of the different loaded component, indexed by their MidCOM Path.
Array
$_output_classes
(line 123)
This is a part of the component cache. It stores references to the OUTPUT classes of the different loaded component, indexed by their MidCOM Path.
The constructor will initialize the class. Nothing special is done here.
Returns a reference to an instance of the specified component's
COMPONENT class. The component is given in $path as a MidCOM path. Such an instance will be cached by the framework so that only one instance is always active for each component. Missing components will be dynamically loaded into memory.
Returns a property value for the component identified by the
MidCOM Path $path and the property key $key. It will return NULL if the property key is unknown. Remeber to make a type sensitive comparison here. If the component is not loaded, the framework tries to load it, see _componentloader::load for further details.
Returns a reference to an instance of the specified component's
Content Admin COMPONENT class. The component is given in $path as a MidCOM path. Such an instance will be cached by the framework so that only one instance is always active for each component. Missing components will be dynamically loaded into memory.
Returns a reference to an instance of the specified component's interface class. The component is given in $path as a MidCOM path.
Such an instance will be cached by the framework so that only one instance is always active for each component. Missing components will be dynamically loaded into memory.
Returns a reference to an instance of the specified component's MIDCOM class. The component is given in $path as a MidCOM path.
Such an instance will be cached by the framework so that only one instance is always active for each component. Missing components will be dynamically loaded into memory.
Returns a reference to an instance of the specified component's
NAP class. The component is given in $path as a MidCOM path. Such an instance will be cached by the framework so that only one instance is always active for each component. Missing components will be dynamically loaded into memory.
Returns TRUE if the component identified by the MidCOM path $url is already loaded and available for usage.
Retrieve a list of all loaded components. The Array will contain an unsortet collection of MidCOM Paths.
This function will invoke _load directly. If the loading process is unsucessful, it will call generate_error.
This function tries to load all available components by traversing
the complete(!) Snippetdir Tree. Note, that this might take some time, so use it carefully. After this function returns you can get a list of all available and valid component paths' through list_loaded_components. It will only query the root snippetdirs matching the known top-level-domains (two-letter ones, com, net, org, name, biz, museum). This is done to speed up processing as Asgard or Nemein.Net for example clutter the SG0 with lots of snippetdirs that are no MidCOM components. Note that the load_all command also iterates through the MidCOM tree.
Helper, converting a component path (de.linkm.newsticker) to a class prefix (de_linkm_newsticker).
Helper, converting a component path (de.linkm.newsticker) to a snippetpath (/de/linkm/newsticker).
Helper, converting a snippetpath (/de/linkm/newsticker) to a class prefix (de_linkm_newsticker).
This function will load the component specified by the MidCOM path $path. If the component could not be loaded successfully due to integrity errors (missing SnippetDirs, Classes, etc.), it will return false and populate $midcom_errstr accordingly.
This function is a helper of load_all. It iterates through the available
subdirs of the directory $path. It ignores the known MidCOM subdirs like "style". for all others it first tries to load them as a component, and then invokes _load_all_dir again for that dir to cover the subdirs. It stops if no snippetdirs are left. The string $prefix is the MidCOM Path prefix for the snippetdir $id.
_validate_path is used to validate the component located at the snippetdir Path $snippetpath. This is a fully qualified snippetdir path to the component in question.
Will validate the given MidCOM Path $path for syntactical
correctness. Currently this is a RegEx check that checks for invalid characters in $path, so _validate_url does explicitly not check whether the referenced component does exist and whether it is structurally valid.
Documentation generated on Mon, 21 Nov 2005 18:25:42 +0100 by phpDocumentor 1.3.0RC3