kuvalda-amqp/console/AmqpController.php

40 lines
692 B
PHP
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<?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;
}
}