PHP 클래스 Mmoreram\RSQueueBundle\Command\ConsumerCommand

Events : Each time a consumer recieves a new element, this throws a new rsqueue.consumer Event Exceptions : If any of inserted queues or channels is not defined in config file as an alias, a new InvalidAliasException will be thrown Likewise, if any ot inserted associated methods does not exist or is not callable, a new MethodNotFoundException will be thrown
상속: extends Mmoreram\RSQueueBundle\Command\Abstracts\AbstractRSQueueCommand
파일 보기 프로젝트 열기: mmoreram/rsqueue-bundle 1 사용 예제들

보호된 메소드들

메소드 설명
addQueue ( String $queueAlias, String $queueMethod ) : SubscriberCommand Adds a queue to subscribe on
configure ( ) Configure command
execute ( Symfony\Component\Console\Input\InputInterface $input, Symfony\Component\Console\Output\OutputInterface $output ) Execute code.

메소드 상세

addQueue() 보호된 메소드

Checks if queue assigned method exists and is callable
protected addQueue ( String $queueAlias, String $queueMethod ) : SubscriberCommand
$queueAlias String Queue alias
$queueMethod String Queue method
리턴 SubscriberCommand self Object

configure() 보호된 메소드

Some options are included * timeout ( default: 0) * iterations ( default: 0) * sleep ( default: 0) Important !! All Commands with this consumer behaviour must call parent() configure method
protected configure ( )

execute() 보호된 메소드

Each time new payload is consumed from queue, consume() method is called. When iterations get the limit, process literaly dies
protected execute ( Symfony\Component\Console\Input\InputInterface $input, Symfony\Component\Console\Output\OutputInterface $output )
$input Symfony\Component\Console\Input\InputInterface An InputInterface instance
$output Symfony\Component\Console\Output\OutputInterface An OutputInterface instance