PHP code example of elfuvo / yii2-postman
1. Go to this page and download the library: Download elfuvo/yii2-postman 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/ */
elfuvo / yii2-postman example snippets
[
'container' => [
'definitions' =>[
\elfuvo\postman\processor\ProcessorInterface::class => [
'class' => \app\modules\postman\processor\MailProcessor::class,
'collectors' => [
\elfuvo\postman\collector\TextInputCollector::class,
],
],
\elfuvo\postman\result\ResultInterface::class => \elfuvo\postman\result\CacheContinuesResult::class,
],
]
];
[
'controllerMap' => [
'migrate' => [
'class' => \yii\console\controllers\MigrateController::class,
'migrationTable' => '{{%migration}}',
'useTablePrefix' => true,
'interactive' => false,
'migrationPath' => [
'@elfuvo/postman/migrations',
],
]
]
];
[
'modules' => [
'postman' => [
'class' => \yii\base\Module::class,
'controllerNamespace' => 'elfuvo\postman\controllers\backend',
],
]
];
class DefaultController extends Controller
{
/**
* @return array|string[]
*/
public function actions()
{
return [
'index' => [
'class' => IndexAction::class,
'view' => '@app/modules/postman/views/backend/default/index', // path to custom template
'useQueue' => true, // use or not Yii2 queue for mailing
],
'progress' => ProgressAction::class,
'view' => ViewAction::class,
];
}
}
php composer.phar