]> git.mxchange.org Git - quix0rs-gnu-social.git/blobdiff - plugins/Sample/SamplePlugin.php
Fixed type hints:
[quix0rs-gnu-social.git] / plugins / Sample / SamplePlugin.php
index f2d333bbcb2c0f826d40b36bfda7d32b6c788b38..c61c021dc44ee3625a3095a5e335fd6e7e612b1b 100644 (file)
@@ -174,41 +174,6 @@ class SamplePlugin extends Plugin
         return true;
     }
 
-    /**
-     * Load related modules when needed
-     *
-     * Most non-trivial plugins will require extra modules to do their work. Typically
-     * these include data classes, action classes, widget classes, or external libraries.
-     *
-     * This method receives a class name and loads the PHP file related to that class. By
-     * tradition, action classes typically have files named for the action, all lower-case.
-     * Data classes are in files with the data class name, initial letter capitalized.
-     *
-     * Note that this method will be called for *all* overloaded classes, not just ones
-     * in this plugin! So, make sure to return true by default to let other plugins, and
-     * the core code, get a chance.
-     *
-     * @param string $cls Name of the class to be loaded
-     *
-     * @return boolean hook value; true means continue processing, false means stop.
-     */
-    function onAutoload($cls)
-    {
-        $dir = dirname(__FILE__);
-
-        switch ($cls)
-        {
-        case 'HelloAction':
-            include_once $dir . '/' . strtolower(mb_substr($cls, 0, -6)) . '.php';
-            return false;
-        case 'User_greeting_count':
-            include_once $dir . '/'.$cls.'.php';
-            return false;
-        default:
-            return true;
-        }
-    }
-
     /**
      * Map URLs to actions
      *
@@ -257,10 +222,10 @@ class SamplePlugin extends Plugin
         return true;
     }
 
-    function onPluginVersion(&$versions)
+    function onPluginVersion(array &$versions)
     {
         $versions[] = array('name' => 'Sample',
-                            'version' => STATUSNET_VERSION,
+                            'version' => GNUSOCIAL_VERSION,
                             'author' => 'Brion Vibber, Evan Prodromou',
                             'homepage' => 'http://status.net/wiki/Plugin:Sample',
                             'rawdescription' =>