PHP code example of rezzza / mail-extra-bundle
1. Go to this page and download the library: Download rezzza/mail-extra-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/ */
rezzza / mail-extra-bundle example snippets
namespace MyNamespace\Transformer;
use Rezzza\MailExtraBundle\Transformer\AbstractTransformer;
use Rezzza\MailExtraBundle\Transformer\TransformerInterface;
class MyTransfrormer extends AbstractTransformer implements TransformerInterface
{
/**
* {@inheritdoc)
*/
public function transform(\Swift_Mime_Message $message)
{
// transform message
}
/**
* {@inheritdoc)
*/
public function supports(\Swift_Mime_Message $message)
{
return true; // if the message is supported by this transformer ?
}
}
$transformerProcessor = $this->get('rezzza.transformer.processor'); // or replace by direct definition
$transformerProcessor->activate('my_transformer'); // activate
$transformerProcessor->deactivate('my_transformer'); // deactivate