[kronolith] Howto use the kronolith API

Ferdinand Gruber fer.grub at yahoo.de
Wed Feb 10 20:06:43 UTC 2021


Am 10.02.21 um 17:11 schrieb Michael J Rubinsky:
>
> Quoting Ferdinand Gruber <fer.grub at yahoo.de>:
>
>> Am 06.02.21 um 18:20 schrieb Michael J Rubinsky:
>>>
>>> Quoting Ferdinand Gruber <fer.grub at yahoo.de>:
>>>
>>>> Hi,
>>>>
>>>> please can anyone give me a simple example how to use the kronolith 
>>>> API in my own PHP project.
>>>>
>>>> I have been using the script kronolith-import-icals.php in a PHP 
>>>> project for a long time to import events from a separate form into 
>>>> my kronolith calendar.
>>>>
>>>
>>>
>>> I'm not sure why this would be better than using the import script 
>>> you are already using, as this essentially results in the same actions.
>>>
>> Now I changed a little the code from the CLI script 
>> kronolith-import-icals.php and tried it in my PHP script:
>>
>>     require_once '/srv/www/htdocs/horde/kronolith/lib/Application.php';
>>     Horde_Registry::appInit('kronolith', array());
>>
>>     $registry->setAuth($user, array("password"=>$pw));
>>
>>     try {
>>         $result = $registry->call('calendar/import', array($ical, 
>> 'text/calendar', $cal));
>>     } catch (Horde_Exception $e) {
>>         $cli->fatal($e->getMessage());
>>     }
>>
>> At the second line of that code I get this error message:
>>
>> Unparenthesized `a ? b : c ? d : e` is deprecated. Use either `(a ? b 
>> : c) ? d : e` or `a ? b : (c ? d : e)` Veraltete PHP Funktion.
>
> That's a deprecation warning in PHP 7.4 from the autoloader cache 
> code. That shouldn't be a fatal error. Regardless, it should be fixed. 
> I'll patch that Soon(tm).

... after that on my system I get a broadcast message:

Broadcast message from systemd-journald:

HORDE[19000]: Klasse Content_Tagger nicht gefunden. Bitte stellen Sie 
sicher, dass die "Content"-Anwendung installiert ist. [pid 19000 on line 
1679 of "/usr/share/php7/PEAR/Horde/Registry.php"]

Translation:

Content_Tagger class not found. Please make sure that the "Content" 
application is installed

-- 
Regards from Austria
Ferdinand Gruber



More information about the kronolith mailing list