This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$promise = new React\Promise\FulfilledPromise(1); | |
$transformer = new Transformer(1, function ($data) use ($promise){ | |
return $promise->then( | |
function () use ($data) { | |
return array('id' => $data['id'], 'stocknummer' => $data['id'], 'dealer_id' => $data['id'], '_vnr' => 1, '_checksum' => sha1(json_encode($data)), '_timestamp' => date('Y-m-d h:i:s')); | |
} | |
); | |
}); | |
//try to change in Client class add _vnr, _checksum and _timestamp | |
$source->pipe($transformer)->pipe($stream); |