PHP code example of e2221 / bitwarden

1. Go to this page and download the library: Download e2221/bitwarden 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/ */

    

e2221 / bitwarden example snippets


$service = new BitwardenService(new MyBitwardenDelegate());
$items = $service->searchItems('web5902');

/** @var BitwardenItem $item */
$item = $items[0];
var_dump($item->getId());
var_dump($item->getName());
var_dump($item->getLogin()?->getUsername());
var_dump($item->getLogin()?->getPassword());

composer