[dev] Littles questions for using API's methods
Gerard Breiner
gerard.breiner at ias.u-psud.fr
Fri Jun 1 08:51:13 UTC 2012
Hello Jan,
Yes, Kronolith works on our horde site… No I do not get any other calendar/methods….
But, I've just check conf/registry.local.php and added provides => 'calendar' at the part "kronolith". Now I get the list calendar/methods.
I'm sorry for the inconvenience… Nevertheless, your answer had help me to find and correct my mistake.
Many thanks Jan …
Best regards.
Gérard
Le 1 juin 2012 à 09:55, Jan Schneider a écrit :
>
> Zitat von Gerard Breiner <gerard.breiner at ias.u-psud.fr>:
>
>> Hello,
>>
>> I'm new on these list?. I'm working on a script for exporting all calendar of each kronolith users to our davical server.
>> Therefore I'm learning how to call api's methods from a script. So I read http://wiki.horde.org/Doc/Dev/RegistryUsageH4?referrer=Doc%%2FDev about the Horde_Registry? Then I tried a little script :
>>
>> [CODE]
>> #!/usr/bin/env php
>> <?php
>> set_include_path('/www/horde4/pear/php' . PATH_SEPARATOR . get_include_path());
>> require_once dirname(__FILE__) . '/../lib/Application.php';
>> Horde_Registry::appInit('kronolith', array(
>> 'cli' => true,
>> 'authentication' => 'none',
>> 'user_admin' => 'foo',
>> 'nocompress' => true
>> ));
>>
>> // Call a Registry method.
>> $calendars = $registry->call('calendar/listCalendars');
>> [/CODE]
>>
>> I get :
>> Fatal error :
>> The method "calendar/listCalendars" is not defined in the Horde Registry.
>>
>> So I checked if this method exist...
>>
>> [CODE]
>> $list = $registry->listMethods();
>> var_dump($list);
>> [/CODE]
>>
>> I get a list of method "packageName/methods" but not the one I'm interested in?
>> Yet, listCalendars() is defined in kronolith/lib/Api.php?
>> What is wrong in my code ?
>
> Is your Kronolith instance otherwise working? Do you get any other calendar/ methods?
>
> --
> Jan Schneider
> The Horde Project
> http://www.horde.org/
>
>
> --
> dev mailing list
> Frequently Asked Questions: http://wiki.horde.org/FAQ
> To unsubscribe, mail: dev-unsubscribe at lists.horde.org
More information about the dev
mailing list