kuvalda-amqp/console/AmqpController.php

40 lines
692 B
PHP
Raw Normal View History

2024-11-20 12:51:47 +03:00
<?php
/**
* @link https://www.kuvalda.ru/
* @copyright
* @license
*/
namespace dominion\amqp\console;
use Yii;
use yii\console\Controller;
use yii\console\ExitCode;
use dominion\amqp\AmqpHelper;
/**
* Работа с очередеми
*
* @author Rybkin Sasha <ribkin@dominion.ru>
* @since 0.1
*/
class AmqpController extends Controller
{
/**
* Создать все очереди
* @return int Exit code
*/
public function actionCreateAllQueue()
{
$amqp = new AmqpHelper;
foreach(Yii::$app->params['amqp']['queue'] as $key =>$value)
{
$amqp->getQueueObject($key);
}
return ExitCode::OK;
}
}