View difference between Paste ID: 3RV9TqEV and 3GUbzF0x
SHOW: | | - or go back to the newest paste.
1-
class BasePresenter extends Nette\Application\UI\Presenter
1+
class SomethingFacade extends Nette\Object
2
{
3-
	
3+
4
	protected $parser;
5
	protected $io;
6
7
	public function __construct(
8
		CleverDic\Model\Sections $section, 
9
		CleverDic\Model\Parser $parser, 
10
		CleverDic\Model\IO $io
11-
		CleverDic\Model\IO $io, 
11+
12-
		Nette\DI\Container $container
12+
13
		$this->section = $section;
14
		$this->parser = $parser;
15-
		parent::__construct($container);
15+
16-
		
16+
17
18
19
	public function operationOne($data)
20
	{
21
		$this->...
22
	}
23-
...
23+
24
}
25-
HomepagePresenter.php
25+
26
##########################
27
28
class HomepagePresenter extends BasePresenter
29-
     	public function renderDefault()
29+
30
31-
		$this->template->section = $this->section->getName();
31+
	public function __construct(SomethingFacade $facade, Container $container)
32-
...
32+
33
		parent::__...
34
		$this->...
35
	}
36
37
38
     	public function actionDefault($id)
39
	{
40
		$this->facade->operationOne($id);
41
		//... 
42
	}
43
44
	// ...
45
}