[pLog-svn] r1660 - in plog/trunk/class: . plugin

oscar at devel.plogworld.net oscar at devel.plogworld.net
Wed Mar 30 21:15:14 GMT 2005


Author: oscar
Date: 2005-03-30 21:15:13 +0000 (Wed, 30 Mar 2005)
New Revision: 1660

Modified:
   plog/trunk/class/Doxyfile
   plog/trunk/class/plugin/pluginbase.class.php
   plog/trunk/class/plugin/pluginmanager.class.php
Log:
more modules documented

Modified: plog/trunk/class/Doxyfile
===================================================================
--- plog/trunk/class/Doxyfile	2005-03-30 21:03:33 UTC (rev 1659)
+++ plog/trunk/class/Doxyfile	2005-03-30 21:15:13 UTC (rev 1660)
@@ -416,7 +416,7 @@
 # directories like "/usr/src/myproject". Separate the files or directories 
 # with spaces.
 
-INPUT                  = object/ dao/ logger/ gallery/ locale/ config/ file/ database/ data/forms security/ xml/ controller/ mail/ bayesian/ misc/ net/ data/ view/
+INPUT                  = object/ dao/ logger/ gallery/ locale/ config/ file/ database/ data/forms security/ xml/ controller/ mail/ bayesian/ misc/ net/ data/ view/ plugin/
 
 # If the value of the INPUT tag contains directories, you can use the 
 # FILE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp 

Modified: plog/trunk/class/plugin/pluginbase.class.php
===================================================================
--- plog/trunk/class/plugin/pluginbase.class.php	2005-03-30 21:03:33 UTC (rev 1659)
+++ plog/trunk/class/plugin/pluginbase.class.php	2005-03-30 21:15:13 UTC (rev 1660)
@@ -1,10 +1,16 @@
 <?php
 
     /**
-     * @package plugin
+     * \defgroup Plugin
+     *
+     * There is better documentation concerning plugins in the wiki:
+     *
+     * http://wiki.plogworld.net/index.php/PLog_1.0/Plugins
+     *
+     * The documentation here is only to be used as a reference for the methods
+     * available in this class.
      */
 
-
 	include_once( PLOG_CLASS_PATH."class/object/object.class.php" );
     include_once( PLOG_CLASS_PATH."class/database/adodb/adodb.inc.php" );
     include_once( PLOG_CLASS_PATH."class/config/config.class.php" );
@@ -20,45 +26,9 @@
 	include_once( PLOG_CLASS_PATH."class/plugin/pluginbase.class.php" );
 
     /**
-     * This is the base class from which every plugin object should inherit.
+     * \ingroup Plugin
      *
-     * Plugins can also offer a configuration interface in case there is anything
-     * that can be configured. Plugins can set the $this->configMessage to the desired
-     * html code that represents the interface or use the setConfigurationMessage
-     * method.
-     *
-     * The most usual kind of interface will be a form if the plugin is expecting something
-     * from the user. The form can have as many fields as needed but the following two are
-     * mandatory if we are to make the admin interface recognize that the user is trying to
-     * configure a plugin:
-     * <ul>
-     * <li>op = updatePluginConfig</li>
-     * <li>pluginId = the plugin's own identifier</li>
-     * </ul>
-     *
-     * The first one will help the admin interface recognize what we are trying to  do
-     * (any other value will be ignored or can have unexpected results) and the second
-     * one will identify which plugin we are trying to configure.
-     *
-     * Once the user presses the "Submit" button, the plugin manager will call the
-     * configure() method of the plugin using the data received from the form as the
-     * parameter.
-     *
-     * Plugins have also now two more additional objects: blogInfo and blogSettings. The first
-     * one is a BlogInfo object containing information about the blog that is executing this
-     * plugin. blogSettings is an object of the BlogSettings class that contains all the settings
-     * of this blog. Use with care :)
-     *
-     * Finally, just mention that it is not mandatory to generate an html form. It could also
-     * be that we are running a statistics plugin and we could use this feature to generate the
-     * report.
-     *
-     * Please see the configure() method and the PluginTest class (plugintest.class.php)
-     * for a real-life sample.
-     *
-     * @see BlogInfo
-     * @see BlogSettings
-     * @see PluginTest
+     * This is the base class from which every plugin object should inherit.
      */
     class PluginBase extends Object 
 	{

Modified: plog/trunk/class/plugin/pluginmanager.class.php
===================================================================
--- plog/trunk/class/plugin/pluginmanager.class.php	2005-03-30 21:03:33 UTC (rev 1659)
+++ plog/trunk/class/plugin/pluginmanager.class.php	2005-03-30 21:15:13 UTC (rev 1660)
@@ -1,10 +1,5 @@
 <?php
 
-    /**
-     * @package plugin
-     */
-
-
     include_once( PLOG_CLASS_PATH."class/object/object.class.php" );
     include_once( PLOG_CLASS_PATH."class/file/file.class.php" );
     include_once( PLOG_CLASS_PATH."class/config/config.class.php" );
@@ -22,9 +17,21 @@
     define( "PLUGIN_MANAGER_DEFAULT_PLUGIN_FILE_PATTERN", "plugin*.class.php" );
 
     /**
-     * Implements a 'plugin manager' a class that takes care of loading plugins,
-     * objects subclassing the Plugin class which add some additional features to
-     * the program
+     * \ingroup Plugin
+     * 
+     * Implements a 'plugin manager' a class that takes care of loading plugins, initializing
+     * them, allowing plugins to register for certain events, etc.
+     *
+     * This class will rarely be called by user classes, since all the plugin initialization and
+     * delivery of messages is handled by the core classes.
+     *
+     * You should not create objects of this class. In case you need a handle to the global 
+     * PluginManager, please use the singlethod getPluginManager as follows:
+     *
+     * <pre>
+     *  $pm =& PluginManager::getPluginManager();
+     *  $pm->notifyEvent( ... );
+     * </pre>
      */
     class PluginManager extends Object
     {
@@ -50,6 +57,7 @@
          *
          * @param pluginDir Specifies from which folders templates should
          * be loaded from.
+         * @param filePattern
          */
         function PluginManager( $pluginDir = PLUGIN_MANAGER_DEFAULT_PLUGIN_FOLDER, $filePattern = PLUGIN_MANAGER_DEFAULT_PLUGIN_FILE_PATTERN )
         {
@@ -205,7 +213,7 @@
 		}
 		
 		/**
-			* saves the list of plugins to the config backend
+         * saves the list of plugins to the config backend
 		 */
 		function savePluginList( $list )
 		{
@@ -214,6 +222,9 @@
 			$config->save();
 		}
 		
+		/**
+		 * @private
+		 */
 		function refreshPluginList()
 		{
 			$this->_pluginList = $this->getPluginListFromFolder();
@@ -222,6 +233,9 @@
 			return true;
 		}
 
+        /**
+         * @private
+         */
         function _loadPluginLocale( $pluginId, $locale )
         {
             return( Locales::getPluginLocale( $pluginId, $locale ));




More information about the pLog-svn mailing list