Code Coverage |
||||||||||
Lines |
Functions and Methods |
Classes and Traits |
||||||||
| Total | |
0.00% |
0 / 8 |
|
0.00% |
0 / 2 |
CRAP | |
0.00% |
0 / 1 |
| SimpleQueueController | |
0.00% |
0 / 8 |
|
0.00% |
0 / 2 |
6 | |
0.00% |
0 / 1 |
| __construct | |
0.00% |
0 / 4 |
|
0.00% |
0 / 1 |
2 | |||
| ingestJSON | |
0.00% |
0 / 4 |
|
0.00% |
0 / 1 |
2 | |||
| 1 | <?php |
| 2 | |
| 3 | namespace BuyerKiosk\SimpleQueue\Controllers; |
| 4 | |
| 5 | |
| 6 | use BuyerKiosk\SimpleQueue\SimpleQueue; |
| 7 | class SimpleQueueController extends \BuyerKiosk\Core\Controllers\BaseController { |
| 8 | private $store; |
| 9 | private $log; |
| 10 | private $redis; |
| 11 | public function __construct($app, \Store $store) |
| 12 | { |
| 13 | parent::__construct($app); |
| 14 | $this->store = $store; |
| 15 | $this->log = new \KLogger($_ENV['LOG_DIR']."simpleQueue.log", \KLogger::DEBUG); |
| 16 | $this->redis = new \Predis\Client($_ENV['REDIS_URL']); |
| 17 | } |
| 18 | |
| 19 | public function ingestJSON($data) { |
| 20 | |
| 21 | $this->log->LogDebug("Ingesting JSON"); |
| 22 | $simpleQueue = new SimpleQueue($this->store); |
| 23 | $data = json_decode($data, true); |
| 24 | $simpleQueue->ingestData($data); |
| 25 | } |
| 26 | |
| 27 | |
| 28 | } |