Skip to content

Commit

Permalink
README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
ruff committed Dec 25, 2022
1 parent d1f5b73 commit 1e433fd
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 5 deletions.
16 changes: 13 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,10 @@ echo "The Order No. is {$documentno}" . PHP_EOL;
use horstoeko\orderx\OrderProfiles;
use horstoeko\orderx\OrderDocumentBuilder;

$document = OrderDocumentBuilder::CreateNew(OrderProfiles::PROFILE_EXTENDED);
$document = OrderDocumentBuilder::createNew(
OrderProfiles::PROFILE_EXTENDED
);

$document
->setIsDocumentCopy(false)
->setIsTestDocument(false)
Expand Down Expand Up @@ -201,7 +204,10 @@ use horstoeko\orderx\OrderProfiles;
use horstoeko\orderx\OrderDocumentBuilder;
use horstoeko\orderx\OrderDocumentPdfBuilder;

$document = OrderDocumentBuilder::CreateNew(OrderProfiles::PROFILE_EXTENDED);
$document = OrderDocumentBuilder::createNew(
OrderProfiles::PROFILE_EXTENDED
);

$document
->setIsDocumentCopy(false)
->setIsTestDocument(false)
Expand All @@ -211,7 +217,11 @@ $document

// Do some other stuff (see above)

$pdfDocument = new OrderDocumentPdfBuilder($document, dirname(__FILE__) . "/../src/assets/empty.pdf"))
$pdfDocument = new OrderDocumentPdfBuilder(
$document,
dirname(__FILE__) . "/../src/assets/empty.pdf"
);

$pdfDocument
->generateDocument()
->saveDocument(getcwd() . "/order-x.pdf");
Expand Down
12 changes: 10 additions & 2 deletions examples/OrderBuilderComfortSimple.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,10 @@

require dirname(__FILE__) . "/../vendor/autoload.php";

$document = OrderDocumentBuilder::CreateNew(OrderProfiles::PROFILE_EXTENDED);
$document = OrderDocumentBuilder::CreateNew(
OrderProfiles::PROFILE_EXTENDED
);

$document
->setIsDocumentCopy(false)
->setIsTestDocument(false)
Expand Down Expand Up @@ -181,7 +184,12 @@

->writeFile(getcwd() . "/order-x.xml");

(new OrderDocumentPdfBuilder($document, dirname(__FILE__) . "/../src/assets/empty.pdf"))
$pdfDocument = new OrderDocumentPdfBuilder(
$document,
dirname(__FILE__) . "/../src/assets/empty.pdf"
);

$pdfDocument
->generateDocument()
->saveDocument(getcwd() . "/order-x.pdf");

Expand Down

0 comments on commit 1e433fd

Please sign in to comment.