1 <?xml version="1.0" encoding="UTF-8"?>
3 <sect1 id="learning.plugins.intro">
4 <title>Introduction</title>
7 Zend Framework makes heavy use of plugin architectures. Plugins allow for easy extensibility
8 and customization of the framework while keeping your code separate from Zend Framework's
13 Typically, plugins in Zend Framework work as follows:
19 Plugins are classes. The actual class definition will vary based on the component --
20 you may need to extend an abstract class or implement an interface, but the fact
21 remains that the plugin is itself a class.
27 Related plugins will share a common class prefix. For instance, if you have created
28 a number of view helpers, they might all share the class prefix
29 "<classname>Foo_View_Helper_</classname>".
35 Everything after the common prefix will be considered the <emphasis>plugin
36 name</emphasis> or <emphasis>short name</emphasis> (versus the "long name",
37 which is the full classname). For example, if the plugin prefix is
38 "<classname>Foo_View_Helper_</classname>", and the class name is
39 "<classname>Foo_View_Helper_Bar</classname>", the plugin name will be simply
40 "<classname>Bar</classname>".
46 Plugin names are typically case sensitive. The one caveat is that the initial letter
47 can often be either lower or uppercase; in our previous example, both "bar" and
48 "Bar" would refer to the same plugin.
54 Now let's turn to using plugins.