[horde] registering APIs

Jan Schneider jan at horde.org
Fri Oct 15 15:04:27 PDT 2004


Zitat von Steve Ivy <steve at contentconnections.com>:

> Hello,
>
> I'm trying to implement an API for my horde app, and I'm getting this
> error:
>
>  >"The method "myApp/getPathArrayForTool" is not defined in the Horde
> Registry."
>
> I've got the following in my myApp/lib/api.php
>
>  >$_services['getPathArrayForTool'] = array (
>  >    'args' => array('tool_id'),
>  >    'type' => 'stringArray',
>  >);
>
>  >function _myApp_getPathArrayForTool ($tool_id)
>  >{
>  > ...
>  > return $ary;
>  >}
>
> I've looked at a couple other horde apps, but I can't find an example
> of anything else I should be doing to make this work. What am I
> missing?

Either use Registry::callByPackage() or add a 'provides' entry to the
section of your app in registry.php.

Jan.

-- 
Do you need professional PHP or Horde consulting?
http://horde.org/consulting/



More information about the horde mailing list