Skip to content

Commit

Permalink
move nette files to bridge directory
Browse files Browse the repository at this point in the history
  • Loading branch information
MartkCz committed May 4, 2022
1 parent c308623 commit a2a7fe6
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 52 deletions.
2 changes: 1 addition & 1 deletion .docs/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@

## Benchmark

Average output is ~5ms
Average output is ~9ms for pdf and ~ 1ms for svg

## Setup

Expand Down
Original file line number Diff line number Diff line change
@@ -1,18 +1,17 @@
<?php declare(strict_types = 1);

namespace Contributte\Invoice\DI;
namespace Contributte\Invoice\Bridge\Nette\DI;

use Contributte\Invoice\Data\Account;
use Contributte\Invoice\Data\Company;
use Contributte\Invoice\Invoice;
use Contributte\Invoice\Provider\InvoiceDataProvider;
use Nette\DI\CompilerExtension;
use Nette\DI\Definitions\Statement;
use Nette\Schema\Expect;
use Nette\Schema\Schema;
use stdClass;

class InvoiceExtension extends CompilerExtension
final class InvoiceExtension extends CompilerExtension
{

public function getConfigSchema(): Schema
Expand Down Expand Up @@ -42,9 +41,6 @@ public function loadConfiguration(): void
$this->getCompany(),
$this->getAccounts(),
]);

$builder->addDefinition($this->prefix('invoice'))
->setFactory(Invoice::class);
}

private function getCompany(): ?Statement
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?php declare(strict_types = 1);

namespace Contributte\Invoice\Responses;
namespace Contributte\Invoice\Bridge\Nette\Response;

use Nette\Application\Response;
use Nette\Http\IRequest;
Expand All @@ -18,6 +18,7 @@ public function __construct(
public function send(IRequest $httpRequest, IResponse $httpResponse): void
{
$httpResponse->setContentType('application/pdf', 'utf-8');

echo $this->content;
}

Expand Down
44 changes: 0 additions & 44 deletions src/Invoice.php

This file was deleted.

0 comments on commit a2a7fe6

Please sign in to comment.