1. Go to this page and download the library: Download decodelabs/disciple library. Choose the download type require.
2. Extract the ZIP file and open the index.php.
3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
decodelabs / disciple example snippets
namespace DecodeLabs\Disciple;
interface Adapter
{
public ?string $identity { get; }
public Profile $profile { get; }
public Client $client { get; }
public bool $loggedIn { get; }
public function isA(
string ...$signifiers
): bool;
}
use DecodeLabs\Disciple;
use DecodeLabs\Disciple\Adapter;
use DecodeLabs\Monarch;
use My\App\DiscipleAdapter;
Monarch::getKingdom()->container->set(
Adapter::class,
new DiscipleAdapter($myUserManager)
);
$disciple = Monarch::getService(Disciple::class);