Skip to content

Commit eb3a9a5

Browse files
committed
improved example
1 parent 1577c87 commit eb3a9a5

File tree

5 files changed

+50
-8
lines changed

5 files changed

+50
-8
lines changed

example/app/dependencies.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010

1111
$container['MessageRepository'] = function ($c) {
1212
return new MessageRepository([
13-
'path' => $c['settings']['storage']['path'] . '/messages',
13+
'path' => $c['settings']['storage']['path'].'/messages',
1414
]);
1515
};
1616

@@ -23,13 +23,15 @@
2323
$container['logger'] = function ($c) {
2424
$logger = new Logger('app');
2525
$logger->pushHandler(new StreamHandler('php://stdout'));
26+
2627
if (! empty($c['settings']['logger'])) {
2728
$fileHandler = new StreamHandler(
2829
$c['settings']['logger']['path'],
2930
$c['settings']['logger']['level']
3031
);
3132
$logger->pushHandler($fileHandler);
3233
}
34+
3335
return $logger;
3436
};
3537

example/bin/console

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ use Symfony\Component\Console\Application;
88

99
$console = new Application();
1010

11-
$commands = require __DIR__.'/../app/commands.php';
11+
$commands = require __DIR__.'/../config/commands.php';
1212

1313
foreach ($commands as $command) {
1414
$console->add(new $command($app->getContainer()));
File renamed without changes.

example/config/partners.php

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,36 @@
6767
'mdn_options' => 'signed-receipt-protocol=optional, pkcs7-signature; signed-receipt-micalg=optional, sha256',
6868
],
6969

70+
[
71+
'id' => 'RelishTest',
72+
'target_url' => 'https://edi.relishops.com/public/index.php',
73+
'certificate' => isset($local['cert']) ? $local['cert'] : null,
74+
'private_key' => isset($local['pkey']) ? $local['pkey'] : null,
75+
'content_type' => 'application/EDI-Consent',
76+
'compression' => true,
77+
'signature_algorithm' => 'sha1',
78+
'encryption_algorithm' => '3des',
79+
// 'content_transfer_encoding' => 'binary',
80+
'mdn_mode' => PartnerInterface::MDN_MODE_SYNC,
81+
'mdn_options' => 'signed-receipt-protocol=optional, pkcs7-signature; signed-receipt-micalg=optional, sha1',
82+
],
83+
84+
[
85+
'id' => 'SATTest',
86+
'email' => 'sanjinhadzic@relishschoolfood.co.uk',
87+
'target_url' => 'http://sat.relishops.com/as2new/public/index.php',
88+
'certificate' => isset($key3['cert']) ? $key3['cert'] : null,
89+
'private_key' => isset($key3['pkey']) ? $key3['pkey'] : null,
90+
// 'private_key_pass_phrase' => 'password',
91+
// 'content_type' => 'application/edi-x12',
92+
'content_type' => 'application/EDI-Consent',
93+
'compression' => true,
94+
'signature_algorithm' => 'sha1',
95+
'encryption_algorithm' => '3des',
96+
'mdn_mode' => PartnerInterface::MDN_MODE_SYNC,
97+
'mdn_options' => 'signed-receipt-protocol=optional, pkcs7-signature; signed-receipt-micalg=optional, sha1',
98+
],
99+
70100
// local station
71101

72102
[

example/config/settings.php

Lines changed: 16 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,25 @@
11
<?php
22

3+
use Monolog\Logger;
4+
35
return [
6+
/**
7+
* @see http://www.slimframework.com/docs/v3/objects/application.html#application-configuration
8+
*/
49
'displayErrorDetails' => true,
5-
// 'addContentLengthHeader' => false,
6-
// 'logger' => [
7-
// 'level' => Monolog\Logger::DEBUG,
8-
// 'path' => __DIR__ . '/../storage/app.log',
9-
// ],
10-
'management' => [
10+
11+
'logger' => [
12+
'level' => Logger::DEBUG,
13+
'path' => __DIR__ . '/../storage/logs/app.log',
1114
// ...
1215
],
16+
17+
'management' => [
18+
/**
19+
* @see \AS2\Management::$options
20+
*/
21+
],
22+
1323
'storage' => [
1424
'path' => __DIR__.'/../storage',
1525
],

0 commit comments

Comments
 (0)