Skip to content

Commit

Permalink
Refactored assets/files structure in examples folder
Browse files Browse the repository at this point in the history
  • Loading branch information
JanSlabon committed Nov 17, 2022
1 parent 4095efe commit 5a2010f
Show file tree
Hide file tree
Showing 10 changed files with 9 additions and 9 deletions.
2 changes: 1 addition & 1 deletion examples/2fa-demo/controller.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

require_once __DIR__ . '/../../vendor/autoload.php';

$file = __DIR__ . '/../files/Laboratory-Report.pdf';
$file = __DIR__ . '/../assets/camtown/Laboratory-Report.pdf';

session_start();

Expand Down
4 changes: 2 additions & 2 deletions examples/appearance-demo.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
}
$settings = require __DIR__ . '/settings.php';

$file = __DIR__ . '/files/Laboratory-Report.pdf';
$file = __DIR__ . '/assets/etown/Laboratory-Report.pdf';
$certificateSerialNumber = $settings['certificateSerialNumber'];
// A requestID generated by the client to identify this signature operation (6 alphanumeric characters)
$requestId = '123456';
Expand Down Expand Up @@ -59,7 +59,7 @@
$module->setExtraCertificates($certificate['chain']);

$reader = new SetaPDF_Core_Reader_File($file);
$writer = new SetaPDF_Core_Writer_File(__DIR__ . '/signed.pdf');
$writer = new SetaPDF_Core_Writer_File(__DIR__ . '/output/appearance-demo.pdf');
// let's get the document
$document = SetaPDF_Core_Document::load($reader, $writer);

Expand Down
File renamed without changes.
Binary file added examples/assets/etown/Laboratory-Report.pdf
Binary file not shown.
File renamed without changes.
Binary file added examples/assets/lenstown/Laboratory-Report.pdf
Binary file not shown.
Binary file not shown.
Binary file added examples/assets/tektown/Laboratory-Report.pdf
Binary file not shown.
8 changes: 4 additions & 4 deletions examples/demo-ltv.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,12 +21,12 @@
}
$settings = require __DIR__ . '/settings.php';

$file = __DIR__ . '/files/Laboratory-Report.pdf';
$file = __DIR__ . '/assets/lenstown/Laboratory-Report.pdf';
$certificateSerialNumber = $settings['certificateSerialNumber'];
// A requestID generated by the client to identify this signature operation (6 alphanumeric characters)
$requestId = '123456';

$caBundle = realpath(__DIR__ . '/files/globaltrust-all.pem');
$caBundle = realpath(__DIR__ . '/assets/globaltrust-all.pem');

$httpClient = new GuzzleClient([
'handler' => new CurlHandler(),
Expand All @@ -50,7 +50,7 @@
$settings['activationPin']
);
// This information should be cached
$certificates = $client->getCertificatesBySerialNumber($certificateSerialNumber);
$certificates = $client->getCertificateBySerialNumber($certificateSerialNumber);
$certificate = new SetaPDF_Signer_X509_Certificate($certificates['certificate']);

$module = new Module($client, $requestId, $certificateSerialNumber);
Expand All @@ -59,7 +59,7 @@
$module->setDigest(SetaPDF_Signer_Digest::SHA_512);

$reader = new SetaPDF_Core_Reader_File($file);
$writer = new SetaPDF_Core_Writer_File(__DIR__ . '/signed-ltv.pdf');
$writer = new SetaPDF_Core_Writer_File(__DIR__ . '/output/demo-ltv.pdf');
$tmpWriter = new SetaPDF_Core_Writer_TempFile();
// let's get the document
$document = SetaPDF_Core_Document::load($reader, $tmpWriter);
Expand Down
4 changes: 2 additions & 2 deletions examples/demo.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
}
$settings = require __DIR__ . '/settings.php';

$file = __DIR__ . '/files/Laboratory-Report.pdf';
$file = __DIR__ . '/assets/tektown/Laboratory-Report.pdf';
$certificateSerialNumber = $settings['certificateSerialNumber'];
// A requestID generated by the client to identify this signature operation (6 alphanumeric characters)
$requestId = '123456';
Expand Down Expand Up @@ -55,7 +55,7 @@
$module->setDigest(SetaPDF_Signer_Digest::SHA_512);

$reader = new SetaPDF_Core_Reader_File($file);
$writer = new SetaPDF_Core_Writer_File(__DIR__ . '/signed.pdf');
$writer = new SetaPDF_Core_Writer_File(__DIR__ . '/output/demo.pdf');
// let's get the document
$document = SetaPDF_Core_Document::load($reader, $writer);

Expand Down

0 comments on commit 5a2010f

Please sign in to comment.