Code Coverage
 
Classes and Traits
Functions and Methods
Lines
Total
0.00% covered (danger)
0.00%
0 / 1
50.00% covered (warning)
50.00%
1 / 2
CRAP
50.00% covered (warning)
50.00%
3 / 6
MessageDispatcher
0.00% covered (danger)
0.00%
0 / 1
50.00% covered (warning)
50.00%
1 / 2
2.50
50.00% covered (warning)
50.00%
3 / 6
 __construct(\aae\dispatch\caller\CallerInterface $caller, \aae\dispatch\receiver\ReceiverInterface $receiver)
100.00% covered (success)
100.00%
1 / 1
1
100.00% covered (success)
100.00%
3 / 3
 dispatch(/*\aae\dispatch\TransmissionPackage */$transmissionPackage)
0.00% covered (danger)
0.00%
0 / 1
2
0.00% covered (danger)
0.00%
0 / 3
<?php
/**
 *
 */
namespace aae\dispatch {
    /**
     * @author Axel Ancona Esselmann
     * @package aae\dispatch
     */
    class MessageDispatcher {
        private $_caller, $_receiver;
        public function __construct(\aae\dispatch\caller\CallerInterface $caller, \aae\dispatch\receiver\ReceiverInterface $receiver) {
            $this->_caller = $caller;
            $this->_receiver = $receiver;
        }
        public function dispatch(/*\aae\dispatch\TransmissionPackage */$transmissionPackage) {
            #print_r($transmissionPackage);
            $transmissionResult = $this->_caller->transmit(array("transmissionString" => $transmissionPackage));
            print_r($transmissionResult);
        }
    }
}