Storage driver interface.
Interface for storage drivers. These are used to load template from different resources, such as the file system or a database.
Located in /Sugar/StorageDriver.php (line 56)
Search for the template and return a driver-specific handle.
Given a reference to a template, look up the template and return a drive specific handle. This handle may be anything, including an object, a string, an array, or an integer. The value FALSE is returned to indicate that the template does not exist or cannot be found.
The File storage driver, as an example, simply returns the full path to the template, or FALSE if the template cannot be found.
The handle will be passed to the other storage driver methods for loading data or checking timestamps.
Note that, depending on the driver, it may be possible for a template to be found when getHandle() is called, and thus have a valid handle, but then be deleted or removed before an other methods are called. Fault-tolerant drivers should be prepared.
Returns the timestamp of the handle.
Returns a user-friendly name for the handle.
The purpose of this function is to provide the most user-friendly name for a handle that is possible. If in doubt, simply return the $name parameter.
For an example, the File driver returns the $handle parameter, as this is the full path of the template. The full path is the most user-friendly name, as it identifies where the specific template is. The name alone may be ambiguous if there are multiple template directories.
The returned value should help the user get to the template easily and quickly. It may be useful for some drivers in CMS systems to return a URL to the edit page for the requested template, for instance.
Returns the source for the handle.
Documentation generated on Sat, 18 Sep 2010 05:27:02 +0000 by phpDocumentor 1.4.3