Zend_Tool uses the IncludePathLoader to find all
the providers that you can run. It recursivly iterates all
include path directories and opens all files that end
with "Manifest.php" or "Provider.php". All classes in these
files are inspected if they implement either
Instances of the provider interface make up for the real functionality
and all their public methods are accessible as provider actions.
The ProviderManifestable interface however requires the implementation of a method
getProviders() which returns an array of
instantiated provider interface instances.
The following naming rules apply on how you can access the providers that were found by the IncludePathLoader:
The last part of your classname split by underscore is used for the provider name, e.g. "My_Provider_Hello" leads to your provider being accessible by the name "hello".
If your provider has a method
getName()it will be used instead of the previous method to determine the name.
If your provider has "Provider" as prefix, e.g. it is called
My_HelloProviderit will be stripped from the name so that the provider will be called "hello".
The IncludePathLoader does not follow symlinks, that means you cannot link provider functionality into your include paths, they have to be physically present in the include paths.
Example 962. Exposing Your Providers with a Manifest
You can expose your providers to
Zend_Tool by offering a
manifest with a special filename ending with "Manifest.php".
A Provider Manifest is an implementation of the
and requires the
getProviders() method to return
an array of instantiated providers. In anticipation of our first
we will create the following manifest:
public function getProviders()