Skip to content

Commit

Permalink
[FEATURE#128384] feat(sprinterService): Ajout d'un tableau associatif…
Browse files Browse the repository at this point in the history
… libre pour passer des options... libres...

```Elle sont libres mes options, il y en a même qui les ont vu volées```
  • Loading branch information
aurelienCastellarnau committed Jun 18, 2019
1 parent 6e0cba6 commit ab42c72
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 9 deletions.
4 changes: 2 additions & 2 deletions features/bootstrap/FeatureContext.php
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ function () use ($container) {
/**
* @Given je veux envoyer le template :template avec le student :student
*/
public function jsVeuxEnvoyerLeTemplateAvecLeStudent($template, $student_array) {
public function jeVeuxEnvoyerLeTemplateAvecLeStudent($template, $student_array) {
$container = $this->getKernel()->getContainer();
$path = $this->requests_path . "/templates";
$uploaded = new UploadedFile($path . "/" . $template, $template);
Expand All @@ -61,7 +61,7 @@ function () use ($container, $template, $file, $student) {
/**
* @Given je veux envoyer le template :template avec le student :student et un print_flag moisi
*/
public function jsVeuxEnvoyerLeTemplateAvecLeStudentEtUnPrintFlagMoisi($template, $student_array) {
public function jeVeuxEnvoyerLeTemplateAvecLeStudentEtUnPrintFlagMoisi($template, $student_array) {
$container = $this->getKernel()->getContainer();
$path = $this->requests_path . "/templates";
$uploaded = new UploadedFile($path . "/" . $template, $template);
Expand Down
4 changes: 0 additions & 4 deletions features/bootstrap/bootstrap.php

This file was deleted.

3 changes: 2 additions & 1 deletion features/suites/results/sprinter_body.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,6 @@
"Name": "data.csv",
"Content": "c3R1ZGVudF9pZDtzdHVkZW50X3VzZXJfaWQ7c3R1ZGVudF9wcm9zcGVjdF9pZDtzdHVkZW50X2xvZ2luO3N0dWRlbnRfYmlydGhkYXk7c3R1ZGVudF9iaXJ0aGRheV9wbGFjZTtzdHVkZW50X25hdGlvbmFsaXR5O3N0dWRlbnRfZW1haWxfZXRuYTtzdHVkZW50X3RlbF9wcm87c3R1ZG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XRlZF9hdDtsYXN0X3Rlcm1fZGVuaWVkX2F0CjI7Mjs7YW5jZXNjX2w7MTk4My0wMy0wNFQwMDowMDowMCswMDowMDsiQm9uZHkgKDkzKSI7RlJBTkNBSVNFO2FuY2VzY19sQGV0bmEtYWx0ZXJuYW5jZS5uZXQ7Ozs7Ozs7O0JBQzsyMDAwLTAxLTAxVDAwOjAwOjAwKzAwOjAwOzIwMDktMDYtMDZUMDA6MDA6MDArMDA6MDA7Ozs7Ozs7Ozs7O01vbnNpZXVyOzs7Ozs7Ozs7OztNYWRhbWU7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7TW9uc2lldXI7QU5DRVNDSEk7TGF1cmVudDsibGF1cmVudC5hbmNlc2NoaUBnbWFpbC5jb20gIjswNjI1MjYzNTMxOzsiMzEsIGF2ZW51ZSBNYXJpZSBDdXJpZSAiOzs3NzYwMDsiQlVTU1kgU1QgR0VPUkdFUyI7RlJBTkNFOzQ7ZXRuYTM7MjAwODtJRFY7MjAwNy0wOS0wMVQwMDowMDowMCswMDowMDsyMDA4LTA4LTMxVDAwOjAwOjAwKzAwOjAwOzt2YWxpZDsyMDE1LTAyLTE4VDE0OjU4OjI1KzAwOjAwOzs="
},
"printflag": false
"printflag": false,
"opts": []
}
7 changes: 5 additions & 2 deletions src/Services/SprinterService.php
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,9 @@ public function sendPrint(
$print_flag,
$routing_key = null,
// string on csv format
$sprinter_data = ''
$sprinter_data = '',
// un array d'options laissé libre
$sprinter_opts = []
) {
if (!\is_string($sprinter_data) || empty($sprinter_data)) {
throw new \Exception('Bad data provided for printing', 400);
Expand All @@ -88,6 +90,7 @@ public function sendPrint(
'template' => $template,
'data' => $data,
'printflag' => $print_flag,
'opts' => $sprinter_opts,
];
$routing_key = $routing_key ?: $this->routing_key;
$msgBody = json_encode($params);
Expand All @@ -98,7 +101,7 @@ public function sendPrint(
);
}
$routing_key = $routing_key ?: $this->routing_key;
$this->producer->publish(json_encode($params), $routing_key);
$this->producer->publish($msgBody, $routing_key);

return $routing_key;
}
Expand Down

0 comments on commit ab42c72

Please sign in to comment.