[dev] API Interface Rewrite

Michael M Slusarz slusarz at horde.org
Mon Aug 3 18:22:13 UTC 2009


[Add a couple of more ideas that came to me right after I sent the message]

Quoting Michael M Slusarz <slusarz at horde.org>:

> My initial thought (pseudocode version) is this:
>
> // Rename files to lib/Api.php so they are autoloadable.
> class App_Api
> {
>     // Does this application support a mobile view?
>     public $mobileview = [boolean];
>
>     // The version of the application (gets rid of version.php files)
>     public $version = [string];
>
>     // The existing services array
>     protected $_services = array();
>
>     public function [API name - no more '_app_' prefix] ()
>     {
>     }
>
>     ...
>
>     // Reserved function: returns permissions info. Need to return  
> in a function since data may include
>     // gettext strings, which can not be defined in class variables.
>     public function perms()
>     {
>         return array();
>     }
>
>     // Reserved function: returns the Horde_Menu object to display.   
> Used, for example, in Prefs UI output.
>     public function getMenu()
>     {
>         return new Horde_Menu();
>     }
>
>     // Prefs UI stuff: Do we want to move code from lib/prefs.php  
> file into the API file?
> }

michael

-- 
___________________________________
Michael Slusarz [slusarz at horde.org]



More information about the dev mailing list