1. Go to this page and download the library: Download codebar-ag/laravel-docuware 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/ */
codebar-ag / laravel-docuware example snippets
use CodebarAg\DocuWare\Connectors\DocuWareConnector;
use CodebarAg\DocuWare\DTO\Config\ConfigWithCredentials;
$connector = new DocuWareConnector(
configuration: new ConfigWithCredentials(
username: 'username',
password: 'password',
)
);
use CodebarAg\DocuWare\Connectors\DocuWareConnector;
use CodebarAg\DocuWare\DTO\Config\ConfigWithCredentialsTrustedUser;
$connector = new DocuWareConnector(
configuration: new ConfigWithCredentialsTrustedUser(
username: 'username',
password: 'password',
impersonatedUsername: 'impersonatedUsername',
)
);
namespace App\Connectors;
use CodebarAg\DocuWare\Connectors\DocuWareConnector;
use CodebarAg\DocuWare\DTO\Config\ConfigWithCredentials;
class YourOwnDocuWareConnector extends DocuWareConnector
{
public function __construct() {
$configuration = new ConfigWithCredentials(
username: 'username',
password: 'password',
);
parent::__construct($configuration);
}
}
use App\Connectors\YourOwnDocuWareConnector;
use CodebarAg\DocuWare\DTO\Config\ConfigWithCredentials;
$connector = new YourOwnDocuWareConnector();
use CodebarAg\DocuWare\Events\DocuWareResponseLog;
// Log each response from the DocuWare REST API.
DocuWareResponseLog::class => [
//
],
return [
/*
|--------------------------------------------------------------------------
| Cache driver
|--------------------------------------------------------------------------
| You may like to define a different cache driver than the default Laravel cache driver.
|
*/
'cache_driver' => env('DOCUWARE_CACHE_DRIVER', env('CACHE_DRIVER', 'file')),
/*
|--------------------------------------------------------------------------
| Requests timeout
|--------------------------------------------------------------------------
| This variable is optional and only used if you want to set the request timeout manually.
|
*/
'timeout' => env('DOCUWARE_TIMEOUT', 15),
/*
|--------------------------------------------------------------------------
| DocuWare Credentials
|--------------------------------------------------------------------------
|
| Before you can communicate with the DocuWare REST-API it is necessary
| to enter your credentials. You should specify a url containing the
| scheme and hostname. In addition add your username and password.
|
*/
'credentials' => [
'url' => env('DOCUWARE_URL'),
'username' => env('DOCUWARE_USERNAME'),
'password' => env('DOCUWARE_PASSWORD'),
],
/*
|--------------------------------------------------------------------------
| Passphrase
|--------------------------------------------------------------------------
|
| In order to create encrypted URLs we need a passphrase. This enables a
| secure exchange of DocuWare URLs without anyone being able to modify
| your query strings. You can find it in the organization settings.
|
*/
'passphrase' => env('DOCUWARE_PASSPHRASE'),
/*
|--------------------------------------------------------------------------
| Configurations
|--------------------------------------------------------------------------
|
*/
'configurations' => [
'search' => [
'operation' => 'And',
/*
* Force Refresh
* Determine if result list is retrieved from the cache when ForceRefresh is set
* to false (default) or always a new one is executed when ForceRefresh is set to true.
*/
'force_refresh' => true,
'