This class is a Factory that is responsible for loading and
establishing the interface to a MidCOM Component.
Working with components
Normally, two things are important when you deal with other components:
First, if you want to list other components, or for example check whether they
are available, you should use the component manifest listing, known as $manifests.
It gives you all meta-information about the components.
This should actually suffice for most normal operations.
If you develop framework tools (like administration interfaces), you will also
need access to the component interface class, which can be obtained by
get_interface_class(). This class is derived from the component interface
baseclass and should give you everything you need to work with the component
and its information itself.
Other than that, you should not have to deal with the components, perhaps with
the only exception of is_loaded() and load() to ensure other components are loaded
in case you need them and they are not a pure-code library.
When the component loader receives a request it roughly works in
Verify that the given component is valid in terms of the MidCOM Specification.
Initialize the Component. Check whether all required concept classes exist.
Return the various interface concepts upon each request
from the framework.
Stage 1 will do all basic sanity checking. If anything is missing, step 1
fails and the componentloader refuses to load the component.
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
initialize() which should load everything necessary.
Stage 3 is the final stage where the loader stays in memory in
order to return the loaded component's Interface instances upon request.
In case you need an instance of the component loader to verify or
transform component paths, use midcom::get()->componentloader
This lists all available components in the systems in the form of their manifests,
indexed by the component name. Whenever possible you should refer to this listing
to gain information about the components available.
This indexed array stores the MidCOM paths of all loaded
components. Its elements are used as keys for the cache storage.
$_tried_to_load : array
This array contains a list of components that were tried to be loaded.
The components are added to this list even if the system only tried
to load it and failed. This way we protect against duplicate class errors
and the like if a defective class is tried to be loaded twice.
The array maps component names to loading results. The loading result is
either false or true as per the result of the load call.
Build a complete set of custom data associated with a given component
identifier. In case a given component does not have the key set and the boolean parameter
is set to true, an empty array is added implicitly.
The custom data component index to look for.
Set this flag to true to get an (empty) entry for all components which
don't have customdata applicable to the component index given. This is disabled by default.
All found component data indexed by known components.