1. Go to this page and download the library: Download yousign/zdd-message-bundle 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/ */
namespace App\Message;
use Yousign\ZddMessageBundle\Config\ZddMessageConfigInterface;
class MessageConfig implements ZddMessageConfigInterface
{
/**
* Return the list of messages to assert.
*/
public function getMessageToAssert(): array
{
return [
App\Message\MyMessage::class,
App\Message\AnotherMessage::class,
//...
];
}
/**
* If your message contains no scalar value as parameter such like value enums, value object more complex object,
* you should use this method to return value for each type hint.
*/
public function generateValueForCustomPropertyType(string $type): mixed
{
return match ($type) {
'App\ValueObject\Email' => new App\ValueObject\Email('[email protected]'),
'App\Enum\MyEnum' => App\Enum\MyEnum::MY_VALUE,
default => null,
};
}
}
Loading please wait ...
Before you can download the PHP files, the dependencies should be resolved. This can take some minutes. Please be patient.