grantholle/pear-services-yadis

A psr-4 compliant port of pear/services_yadis, an implementation of the Yadis Specification 1.0 protocol

2.0.0 2023-02-15 09:52 UTC

This package is auto-updated.

Last update: 2024-11-15 13:27:05 UTC


README

Implementation of the Yadis 1.0 protocol.

Installation

composer require grantholle/pear-services-yadis

Usage

use Pear\Services\Yadis\Yadis;

$openid = 'http://padraic.astrumfutura.com';
$yadis = new Yadis($openid);
$yadis->addNamespace('openid', 'http://openid.net/xmlns/1.0');
$serviceList = $yadis->discover();

foreach ($serviceList as $service) {
    $types = $service->getTypes();
    echo $types[0], ' at ', implode(', ', $service->getUris()), PHP_EOL;
    echo 'Priority is ', $service->getPriority(), PHP_EOL;
}