Kronolith_FreeBusy::getUrl PHP Метод

getUrl() публичный статический Метод

Searches address books for the freebusy URL for a given email address.
public static getUrl ( string $email ) : mixed
$email string The email address to look for.
Результат mixed The url on success or false on failure.
    public static function getUrl($email)
    {
        $sources = json_decode($GLOBALS['prefs']->getValue('search_sources'));
        if (empty($sources)) {
            $sources = array();
        }
        try {
            $result = $GLOBALS['registry']->call('contacts/getField', array($email, 'freebusyUrl', $sources, true, true));
        } catch (Horde_Exception $e) {
            return false;
        }
        if (is_array($result)) {
            return array_shift($result);
        }
        return $result;
    }