README.md 1.09 KB
Newer Older
Tomáš Pospíšil's avatar
Tomáš Pospíšil committed
1
# TracyBars
Tomáš Pospíšil's avatar
Tomáš Pospíšil committed
2

Tomáš Pospíšil's avatar
Tomáš Pospíšil committed
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
## Instalace

Do composer.json přidat

     "repositories": [  
	      {  
		      "type": "composer",  
		      "url": "https://composer.praguebest.cz"  
	      }  
      ],

a spustit

    composer require praguebest/tracyBars`  

V projektu pak registrovat následovně:

    use Praguebest\BarPanel\Registrator;  
    use Praguebest\Tools\WebSwitcherUrls;  
    use Praguebest\Tools\DatabaseInfo;  
      
    Registrator::getInstance(TEMPLATE_COMPILE_DIR, CACHE_DIR)  
        ->registerDebugger(APPLICATION_ROOT . 'errors', EMAIL_DEVELOPER, DEVELOPER_IPS)  
        ->registerWebswitcher(new WebSwitcherUrls('hyundai.pb', 'hyundai.praguebest.cz', 'hyundai.cz'), new DatabaseInfo(DB_NAME, DB_URL_LINK))  
        ->registerDBProfiler();

1) Třídu WTSmarty podědit od třídy TraceableSmarty
2)

- Pro Mastershop: Do Db->query() přidat

  `DBProfiler::getInstance()->profile($this->sql, $tookTime);`

  Viz např. Harfasport
- Pro Epublisher: Do Database->execute přidat

  `return DBProfiler::getInstance()->profilePublisher($this->_statement, $params, $this->_params);`

  Viz např. Hyundai