40 lines
692 B
PHP
40 lines
692 B
PHP
|
<?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;
|
|||
|
}
|
|||
|
|
|||
|
}
|