Permalink
Browse files

removed @Inject

  • Loading branch information...
dg committed Oct 5, 2018
1 parent 6721f28 commit c0ac99a4b7ea3deb7af679885d68a91f693adde7
Showing with 20 additions and 8 deletions.
  1. +10 −4 cs/di-usage.texy
  2. +10 −4 en/di-usage.texy
@@ -203,11 +203,17 @@ Její použití v presenteru by vypadalo následovně:
/--php
class MyPresenter extends Nette\Application\UI\Presenter
{
/** @var Service1 @inject */
public $service1;
/** @var Service1 */
private $service1;

/** @var Service2 @inject */
public $service2;
/** @var Service2 */
private $service2;

public function __construct(Service1 $service1, Service2 $service2)
{
$this->service1 = $service1;
$this->service2 = $service2;
}

protected function createComponentMyControl()
{
@@ -203,11 +203,17 @@ The component could be used in the presenter in the following way:
/--php
class MyPresenter extends Nette\Application\UI\Presenter
{
/** @var Service1 @inject */
public $service1;
/** @var Service1 */
private $service1;

/** @var Service2 @inject */
public $service2;
/** @var Service2 */
private $service2;

public function __construct(Service1 $service1, Service2 $service2)
{
$this->service1 = $service1;
$this->service2 = $service2;
}

protected function createComponentMyControl()
{

0 comments on commit c0ac99a

Please sign in to comment.