Revize 052764d3
Přidáno uživatelem Filip Jani před asi 6 roky(ů)
- ID 052764d36ac4ee71d3f1027886c50346b93010e7
- Rodič 0cf5bcf8
.gitignore | ||
---|---|---|
1 |
.idea/ |
|
2 |
vendor/ |
|
3 |
app/config/config.local.neon |
app/bootstrap.php | ||
---|---|---|
1 |
<?php |
|
2 |
|
|
3 |
require __DIR__ . '/../vendor/autoload.php'; |
|
4 |
|
|
5 |
$configurator = new Nette\Configurator; |
|
6 |
|
|
7 |
$configurator->setDebugMode(TRUE); // enable for your remote IP |
|
8 |
$configurator->enableTracy(__DIR__ . '/../log'); |
|
9 |
|
|
10 |
$configurator->setTimeZone('Europe/Prague'); |
|
11 |
$configurator->setTempDirectory(__DIR__ . '/../temp'); |
|
12 |
|
|
13 |
$configurator->createRobotLoader() |
|
14 |
->addDirectory(__DIR__) |
|
15 |
->register(); |
|
16 |
|
|
17 |
$configurator->addConfig(__DIR__ . '/config/config.neon'); |
|
18 |
$configurator->addConfig(__DIR__ . '/config/config.local.neon'); |
|
19 |
$configurator->addConfig(__DIR__ . '/config/model.neon'); |
|
20 |
|
|
21 |
$container = $configurator->createContainer(); |
|
22 |
|
|
23 |
return $container; |
app/config/config.local.example.neon | ||
---|---|---|
1 |
parameters: |
|
2 |
|
|
3 |
|
|
4 |
database: |
|
5 |
dsn: 'mysql:host=127.0.0.1;dbname=test' |
|
6 |
user: |
|
7 |
password: |
app/config/config.neon | ||
---|---|---|
1 |
parameters: |
|
2 |
|
|
3 |
|
|
4 |
application: |
|
5 |
errorPresenter: Error |
|
6 |
mapping: |
|
7 |
*: App\*Module\Presenters\*Presenter |
|
8 |
|
|
9 |
|
|
10 |
session: |
|
11 |
expiration: 14 days |
|
12 |
|
|
13 |
|
|
14 |
services: |
|
15 |
router: App\RouterFactory::createRouter |
app/config/model.neon | ||
---|---|---|
1 |
services: |
|
2 |
- Model\Repository\Repository |
|
3 |
- Model\Repository\BookRepository |
|
4 |
- Model\Repository\BookTypeRepository |
|
5 |
- Model\Repository\LineRepository |
|
6 |
- Model\Repository\LitReferenceRepository |
|
7 |
- Model\Repository\MuseumRepository |
|
8 |
- Model\Repository\ObjectTypeRepository |
|
9 |
- Model\Repository\OriginRepository |
|
10 |
- Model\Repository\RevHistoryRepository |
|
11 |
- Model\Repository\SurfaceRepository |
|
12 |
- Model\Repository\SurfaceTypeRepository |
|
13 |
- Model\Repository\TransliterationRepository |
|
14 |
- Model\Repository\UserLogRepository |
|
15 |
- Model\Repository\UserRepository |
|
16 |
- Model\Repository\UserRoleRepository |
app/model/repository/BookRepository.php | ||
---|---|---|
1 |
<?php |
|
2 |
|
|
3 |
namespace Model\Repository; |
|
4 |
|
|
5 |
/** |
|
6 |
* Repository pro práci s tabulkou `book` |
|
7 |
* |
|
8 |
* @package Model |
|
9 |
*/ |
|
10 |
class BookRepository extends Repository |
|
11 |
{ |
|
12 |
/** @var string Název tabulky */ |
|
13 |
const TABLE_NAME = 'book'; |
|
14 |
protected $tableName = self::TABLE_NAME; |
|
15 |
|
|
16 |
/** Sloupečky tabulky */ |
|
17 |
const COLUMN_ID = 'id_book'; |
|
18 |
const COLUMN_BOOK_ABREV = 'book_abrev'; |
|
19 |
const COLUMN_BOOK_AUTHOR = 'book_autor'; |
|
20 |
const COLUMN_BOOK_DESCRIPTION = 'book_description'; |
|
21 |
const COLUMN_BOOK_NAME = 'book_name'; |
|
22 |
const COLUMN_BOOK_SUBTITLE = 'book_subtitle'; |
|
23 |
const COLUMN_PLACE_OF_PUB = 'place_of_pub'; |
|
24 |
const COLUMN_DATE_OF_PUB = 'date_of_pub'; |
|
25 |
const COLUMN_PAGES = 'pages'; |
|
26 |
const COLUMN_VOLUME = 'volume'; |
|
27 |
const COLUMN_VOLUME_NO = 'volume_no'; |
|
28 |
const COLUMN_REVISION_HISTORY = 'revision_history'; |
|
29 |
} |
app/model/repository/BookTypeRepository.php | ||
---|---|---|
1 |
<?php |
|
2 |
|
|
3 |
namespace Model\Repository; |
|
4 |
|
|
5 |
/** |
|
6 |
* Repository pro práci s tabulkou `book_type` |
|
7 |
* |
|
8 |
* @package model\repository |
|
9 |
*/ |
|
10 |
class BookTypeRepository extends Repository |
|
11 |
{ |
|
12 |
/** @var string Název tabulky */ |
|
13 |
const TABLE_NAME = 'book_type'; |
|
14 |
protected $tableName = self::TABLE_NAME; |
|
15 |
|
|
16 |
/** Sloupečky tabulky */ |
|
17 |
const COLUMN_ID = 'id_book_type'; |
|
18 |
const COLUMN_BOOK_TYPE = 'book_type'; |
|
19 |
} |
app/model/repository/LineRepository.php | ||
---|---|---|
1 |
<?php |
|
2 |
|
|
3 |
namespace Model\Repository; |
|
4 |
|
|
5 |
/** |
|
6 |
* Repository pro práci s tabulkou `line` |
|
7 |
* |
|
8 |
* @package model\repository |
|
9 |
*/ |
|
10 |
class LineRepository extends Repository |
|
11 |
{ |
|
12 |
/** @var string Název tabulky */ |
|
13 |
const TABLE_NAME = 'line'; |
|
14 |
protected $tableName = self::TABLE_NAME; |
|
15 |
|
|
16 |
/** Sloupečky tabulky */ |
|
17 |
const COLUMN_ID = 'id_line'; |
|
18 |
const COLUMN_TRANSLITERATION = 'transliteration'; |
|
19 |
const COLUMN_SURFACE_ID = 'id_surface'; |
|
20 |
const COLUMN_BROKEN = 'broken'; |
|
21 |
const COLUMN_OLD_BOOKANDCHAPTER = 'old_bookandchapter'; |
|
22 |
const COLUMN_LINE_NUMBER = 'line_number'; |
|
23 |
} |
app/model/repository/LitReferenceRepository.php | ||
---|---|---|
1 |
<?php |
|
2 |
|
|
3 |
namespace Model\Repository; |
|
4 |
|
|
5 |
/** |
|
6 |
* Repository pro práci s tabulkou `lit_reference` |
|
7 |
* |
|
8 |
* @package Model\Repository |
|
9 |
*/ |
|
10 |
class LitReferenceRepository extends Repository |
|
11 |
{ |
|
12 |
/** @var string Název tabulky */ |
|
13 |
const TABLE_NAME = 'lit_reference'; |
|
14 |
protected $tableName = self::TABLE_NAME; |
|
15 |
|
|
16 |
/** Sloupečky tabulky */ |
|
17 |
const COLUMN_ID = 'id_lit_reference'; |
|
18 |
const COLUMN_SERIES = 'series'; |
|
19 |
const COLUMN_NUMBER = 'number'; |
|
20 |
const COLUMN_PLATE = 'plate'; |
|
21 |
const COLUMN_TRANSLITERATION_ID = 'id_transliteration'; |
|
22 |
} |
app/model/repository/MuseumRepository.php | ||
---|---|---|
1 |
<?php |
|
2 |
|
|
3 |
namespace Model\Repository; |
|
4 |
|
|
5 |
/** |
|
6 |
* Repository pro práci s tabulkou `museum` |
|
7 |
* |
|
8 |
* @package Model\Repository |
|
9 |
*/ |
|
10 |
class MuseumRepository extends Repository |
|
11 |
{ |
|
12 |
/** @var string Název tabulky */ |
|
13 |
const TABLE_NAME = 'museum'; |
|
14 |
protected $tableName = self::TABLE_NAME; |
|
15 |
|
|
16 |
/** Sloupečky tabulky */ |
|
17 |
const COLUMN_ID = 'id_museum'; |
|
18 |
const COLUMN_TITLE = 'museum'; |
|
19 |
const COLUMN_PLACE = 'place'; |
|
20 |
} |
app/model/repository/ObjectTypeRepository.php | ||
---|---|---|
1 |
<?php |
|
2 |
|
|
3 |
namespace Model\Repository; |
|
4 |
|
|
5 |
/** |
|
6 |
* Repository pro práci s tabulkou `object_type` |
|
7 |
* |
|
8 |
* @package model\repository |
|
9 |
*/ |
|
10 |
class ObjectTypeRepository extends Repository |
|
11 |
{ |
|
12 |
/** @var string Název tabulky */ |
|
13 |
const TABLE_NAME = 'object_type'; |
|
14 |
protected $tableName = self::TABLE_NAME; |
|
15 |
|
|
16 |
/** Sloupečky tabulky */ |
|
17 |
const COLUMN_ID = 'id_object_type'; |
|
18 |
const COLUMN_OBJECT_TYPE = 'object_type'; |
|
19 |
} |
app/model/repository/OriginRepository.php | ||
---|---|---|
1 |
<?php |
|
2 |
|
|
3 |
namespace Model\Repository; |
|
4 |
|
|
5 |
/** |
|
6 |
* Repository pro práci s tabulkou `origin` |
|
7 |
* |
|
8 |
* @package model\repository |
|
9 |
*/ |
|
10 |
class OriginRepository extends Repository |
|
11 |
{ |
|
12 |
/** @var string Název tabulky */ |
|
13 |
const TABLE_NAME = 'origin'; |
|
14 |
protected $tableName = self::TABLE_NAME; |
|
15 |
|
|
16 |
/** Sloupečky tabulky */ |
|
17 |
const COLUMN_ID = 'id_origin'; |
|
18 |
const COLUMN_ORIGIN = 'origin'; |
|
19 |
const COLUMN_OLD_NAME = 'old_name'; |
|
20 |
} |
app/model/repository/Repository.php | ||
---|---|---|
1 |
<?php |
|
2 |
|
|
3 |
namespace Model\Repository; |
|
4 |
|
|
5 |
use Nette; |
|
6 |
|
|
7 |
/** |
|
8 |
* Základní repository s operacemi pro práci s tabulkou |
|
9 |
* |
|
10 |
* @package Model |
|
11 |
*/ |
|
12 |
class Repository |
|
13 |
{ |
|
14 |
use Nette\SmartObject; |
|
15 |
|
|
16 |
/** @var string Název tabulky */ |
|
17 |
protected $tableName; |
|
18 |
|
|
19 |
/** @var \Nette\Database\Context */ |
|
20 |
protected $context; |
|
21 |
|
|
22 |
public function __construct(Nette\Database\Context $context) |
|
23 |
{ |
|
24 |
$this->context = $context; |
|
25 |
} |
|
26 |
|
|
27 |
/** |
|
28 |
* Vrací název tabulky |
|
29 |
* - pokud není definovaný odvodí se název tabulky podle názvu třídy |
|
30 |
* |
|
31 |
* @return string |
|
32 |
*/ |
|
33 |
public function getTableName(): string |
|
34 |
{ |
|
35 |
if (empty($this->tableName)) |
|
36 |
{ |
|
37 |
preg_match('#(\w+)Repository$#', get_class($this), $m); |
|
38 |
$this->tableName = strtolower($m[1]); |
|
39 |
} |
|
40 |
|
|
41 |
return $this->tableName; |
|
42 |
} |
|
43 |
|
|
44 |
/** |
|
45 |
* Vrací Selection reprezentující danou tabulku |
|
46 |
* |
|
47 |
* @return Nette\Database\Table\Selection |
|
48 |
*/ |
|
49 |
public function getTable(): Nette\Database\Table\Selection |
|
50 |
{ |
|
51 |
if (empty($this->tableName)) |
|
52 |
{ |
|
53 |
$this->getTableName(); |
|
54 |
} |
|
55 |
|
|
56 |
return $this->context->table($this->tableName); |
|
57 |
} |
|
58 |
|
|
59 |
/** |
|
60 |
* Vrací všechny řádky z tabulky |
|
61 |
* |
|
62 |
* @return Nette\Database\Table\Selection |
|
63 |
*/ |
|
64 |
public function findAll(): Nette\Database\Table\Selection |
|
65 |
{ |
|
66 |
return $this->getTable(); |
|
67 |
} |
|
68 |
|
|
69 |
/** |
|
70 |
* Vrací řádky podle filtru |
|
71 |
* |
|
72 |
* @param array $by : associativní pole s filtry, např. array('id' => 5) |
|
73 |
* @return Nette\Database\Table\Selection |
|
74 |
*/ |
|
75 |
public function findBy(array $by): Nette\Database\Table\Selection |
|
76 |
{ |
|
77 |
return $this->getTable()->where($by); |
|
78 |
} |
|
79 |
|
|
80 |
/** |
|
81 |
* Vrací záznam z tabulky podle primárního klíče |
|
82 |
* |
|
83 |
* @param int $id |
|
84 |
* @return Nette\Database\Table\ActiveRow |
|
85 |
*/ |
|
86 |
public function findRow(int $id): Nette\Database\Table\ActiveRow |
|
87 |
{ |
|
88 |
return $this->getTable()->get($id); |
|
89 |
} |
|
90 |
|
|
91 |
/** |
|
92 |
* Vložení dat do tabulky |
|
93 |
* |
|
94 |
* @param array $data |
|
95 |
* @return bool|int|Nette\Database\Table\ActiveRow |
|
96 |
*/ |
|
97 |
public function insert(array $data) |
|
98 |
{ |
|
99 |
return $this->getTable()->insert($data); |
|
100 |
} |
|
101 |
|
|
102 |
/** |
|
103 |
* Smaže záznam podle primárního klíče |
|
104 |
* |
|
105 |
* @param int $id |
|
106 |
* @return int |
|
107 |
*/ |
|
108 |
public function delete(int $id): int |
|
109 |
{ |
|
110 |
return $this->findRow($id)->delete(); |
|
111 |
} |
|
112 |
|
|
113 |
/** |
|
114 |
* Uloží nebo updatuje záznam v tabulce |
|
115 |
* - pokud je $id NULL -> vloží nový záznam |
|
116 |
* - pokud $id není NULL -> aktualizace existujícího záznamu |
|
117 |
* |
|
118 |
* @param array $data |
|
119 |
* @param int|NULL $id |
|
120 |
* @return Nette\Database\Table\ActiveRow |
|
121 |
*/ |
|
122 |
public function save(array $data, int $id = NULL): Nette\Database\Table\ActiveRow |
|
123 |
{ |
|
124 |
if ($id == NULL) |
|
125 |
{ |
|
126 |
$record = $this->insert($data); |
|
127 |
} else |
|
128 |
{ |
|
129 |
$record = $this->findRow($id); |
|
130 |
$record->update($data); |
|
131 |
} |
|
132 |
|
|
133 |
return $record; |
|
134 |
} |
|
135 |
} |
app/model/repository/RevHistoryRepository.php | ||
---|---|---|
1 |
<?php |
|
2 |
|
|
3 |
namespace Model\Repository; |
|
4 |
|
|
5 |
/** |
|
6 |
* Repository pro práci s tabulkou `rev_hisotry` |
|
7 |
* |
|
8 |
* @package Model\Repository |
|
9 |
*/ |
|
10 |
class RevHistoryRepository extends Repository |
|
11 |
{ |
|
12 |
/** @var string Název tabulky */ |
|
13 |
const TABLE_NAME = 'rev_history'; |
|
14 |
protected $tableName = self::TABLE_NAME; |
|
15 |
|
|
16 |
/** Sloupečky tabulky */ |
|
17 |
const COLUMN_ID = 'id_rev_history'; |
|
18 |
const COLUMN_TRANSLITERATION_ID = 'id_transliteration'; |
|
19 |
const COLUMN_DATE = 'date'; |
|
20 |
const COLUMN_NAME = 'name'; |
|
21 |
const COLUMN_DESCRIPTION = 'description'; |
|
22 |
} |
app/model/repository/SurfaceRepository.php | ||
---|---|---|
1 |
<?php |
|
2 |
|
|
3 |
namespace Model\Repository; |
|
4 |
|
|
5 |
/** |
|
6 |
* Repository pro práci s tabulkou `surface` |
|
7 |
* |
|
8 |
* @package model\repository |
|
9 |
*/ |
|
10 |
class SurfaceRepository extends Repository |
|
11 |
{ |
|
12 |
/** @var string Název tabulky */ |
|
13 |
const TABLE_NAME = 'surface'; |
|
14 |
protected $tableName = self::TABLE_NAME; |
|
15 |
|
|
16 |
/** Sloupečky tabulky */ |
|
17 |
const COLUMN_ID = 'id_surface'; |
|
18 |
const COLUMN_COLUMN_NUMBER = 'column_number'; |
|
19 |
const COLUMN_TRANSLITERATION_ID = 'id_transliteration'; |
|
20 |
const COLUMN_OBJECT_TYPE_ID = 'id_object_type'; |
|
21 |
const COLUMN_SURFACE_TYPE_ID = 'id_surface_type'; |
|
22 |
} |
app/model/repository/SurfaceTypeRepository.php | ||
---|---|---|
1 |
<?php |
|
2 |
|
|
3 |
namespace Model\Repository; |
|
4 |
|
|
5 |
/** |
|
6 |
* Repository pro práci s tabulkou `surface_type` |
|
7 |
* |
|
8 |
* @package model\repository |
|
9 |
*/ |
|
10 |
class SurfaceTypeRepository extends Repository |
|
11 |
{ |
|
12 |
/** @var string Název tabulky */ |
|
13 |
const TABLE_NAME = 'surface_type'; |
|
14 |
protected $tableName = self::TABLE_NAME; |
|
15 |
|
|
16 |
/** Sloupečky tabulky */ |
|
17 |
const COLUMN_ID = 'id_surface_type'; |
|
18 |
const COLUMN_SURFACE_TYPE = 'surface_type'; |
|
19 |
const COLUMN_SORTER = 'sorter'; |
|
20 |
} |
app/model/repository/TransliterationRepository.php | ||
---|---|---|
1 |
<?php |
|
2 |
|
|
3 |
namespace Model\Repository; |
|
4 |
|
|
5 |
/** |
|
6 |
* Repository pro práci s tabulkou `transliteration` |
|
7 |
* |
|
8 |
* @package Model\Repository |
|
9 |
*/ |
|
10 |
class TransliterationRepository extends Repository |
|
11 |
{ |
|
12 |
/** @var string Název tabulky */ |
|
13 |
const TABLE_NAME = 'transliteration'; |
|
14 |
protected $tableName = self::TABLE_NAME; |
|
15 |
|
|
16 |
/** Sloupečky tabulky */ |
|
17 |
const COLUMN_ID = 'id_transliteration'; |
|
18 |
const COLUMN_CHAPTER = 'chapter'; |
|
19 |
const COLUMN_BOOK_ID = 'id_book'; |
|
20 |
const COLUMN_MUSEUM_NO = 'museum_no'; |
|
21 |
const COLUMN_MUSEUM_ID = 'id_museum'; |
|
22 |
const COLUMN_ORIGIN_ID = 'id_origin'; |
|
23 |
const COLUMN_OLD_BOOKANDCHAPTER = 'old_bookandchapter'; |
|
24 |
const COLUMN_BOOK_TYPE_ID = 'id_book_type'; |
|
25 |
const COLUMN_REG_NO = 'reg_no'; |
|
26 |
const COLUMN_DATE = 'date'; |
|
27 |
const COLUMN_NOTE = 'note'; |
|
28 |
} |
app/model/repository/UserLogRepository.php | ||
---|---|---|
1 |
<?php |
|
2 |
|
|
3 |
namespace Model\Repository; |
|
4 |
|
|
5 |
/** |
|
6 |
* Repository pro práci s tabulkou `user_log` |
|
7 |
* |
|
8 |
* @package model\repository |
|
9 |
*/ |
|
10 |
class UserLogRepository extends Repository |
|
11 |
{ |
|
12 |
/** @var string Název tabulky */ |
|
13 |
const TABLE_NAME = 'user_log'; |
|
14 |
protected $tableName = self::TABLE_NAME; |
|
15 |
|
|
16 |
/** Sloupečky tabulky */ |
|
17 |
const COLUMN_ID = 'id'; |
|
18 |
const COLUMN_LOGGED_DATE = 'logged'; |
|
19 |
const COLUMN_IP = 'ip'; |
|
20 |
const COLUMN_CLIENT = 'client'; |
|
21 |
const COLUMN_USER_ID = 'user_id'; |
|
22 |
} |
app/model/repository/UserRepository.php | ||
---|---|---|
1 |
<?php |
|
2 |
|
|
3 |
namespace Model\Repository; |
|
4 |
|
|
5 |
/** |
|
6 |
* Repository pro práci s tabulkou `user` |
|
7 |
* |
|
8 |
* @package model\repository |
|
9 |
*/ |
|
10 |
class UserRepository extends Repository |
|
11 |
{ |
|
12 |
/** @var string Název tabulky */ |
|
13 |
const TABLE_NAME = 'user'; |
|
14 |
protected $tableName = self::TABLE_NAME; |
|
15 |
|
|
16 |
/** Sloupečky tabulky */ |
|
17 |
const COLUMN_ID = 'id'; |
|
18 |
const COLUMN_USERNAME = 'username'; |
|
19 |
const COLUMN_LOGIN = 'login'; |
|
20 |
const COLUMN_PASSWORD = 'password'; |
|
21 |
const COLUMN_EMAIL = 'email'; |
|
22 |
const COLUMN_CREATED = 'created'; |
|
23 |
const COLUMN_UPDATED = 'updated'; |
|
24 |
} |
app/model/repository/UserRoleRepository.php | ||
---|---|---|
1 |
<?php |
|
2 |
|
|
3 |
namespace Model\Repository; |
|
4 |
|
|
5 |
/** |
|
6 |
* Repository pro práci s tabulkou `user_role` |
|
7 |
* |
|
8 |
* @package model\repository |
|
9 |
*/ |
|
10 |
class UserRoleRepository extends Repository |
|
11 |
{ |
|
12 |
/** @var string Název tabulky */ |
|
13 |
const TABLE_NAME = 'user_role'; |
|
14 |
protected $tableName = self::TABLE_NAME; |
|
15 |
|
|
16 |
/** Sloupečky tabulky */ |
|
17 |
const COLUMN_USER_ID = 'user_id'; |
|
18 |
const COLUMN_ROLE_ID = 'role_id'; |
|
19 |
} |
app/presenters/Error4xxPresenter.php | ||
---|---|---|
1 |
<?php |
|
2 |
|
|
3 |
namespace App\Presenters; |
|
4 |
|
|
5 |
use Nette; |
|
6 |
|
|
7 |
|
|
8 |
final class Error4xxPresenter extends Nette\Application\UI\Presenter |
|
9 |
{ |
|
10 |
public function startup() |
|
11 |
{ |
|
12 |
parent::startup(); |
|
13 |
if (!$this->getRequest()->isMethod(Nette\Application\Request::FORWARD)) { |
|
14 |
$this->error(); |
|
15 |
} |
|
16 |
} |
|
17 |
|
|
18 |
|
|
19 |
public function renderDefault(Nette\Application\BadRequestException $exception) |
|
20 |
{ |
|
21 |
// load template 403.latte or 404.latte or ... 4xx.latte |
|
22 |
$file = __DIR__ . "/templates/Error/{$exception->getCode()}.latte"; |
|
23 |
$this->template->setFile(is_file($file) ? $file : __DIR__ . '/templates/Error/4xx.latte'); |
|
24 |
} |
|
25 |
} |
app/presenters/ErrorPresenter.php | ||
---|---|---|
1 |
<?php |
|
2 |
|
|
3 |
namespace App\Presenters; |
|
4 |
|
|
5 |
use Nette; |
|
6 |
use Nette\Application\Responses; |
|
7 |
use Nette\Http; |
|
8 |
use Tracy\ILogger; |
|
9 |
|
|
10 |
|
|
11 |
final class ErrorPresenter implements Nette\Application\IPresenter |
|
12 |
{ |
|
13 |
use Nette\SmartObject; |
|
14 |
|
|
15 |
/** @var ILogger */ |
|
16 |
private $logger; |
|
17 |
|
|
18 |
|
|
19 |
public function __construct(ILogger $logger) |
|
20 |
{ |
|
21 |
$this->logger = $logger; |
|
22 |
} |
|
23 |
|
|
24 |
|
|
25 |
public function run(Nette\Application\Request $request) |
|
26 |
{ |
|
27 |
$exception = $request->getParameter('exception'); |
|
28 |
|
|
29 |
if ($exception instanceof Nette\Application\BadRequestException) { |
|
30 |
list($module, , $sep) = Nette\Application\Helpers::splitName($request->getPresenterName()); |
|
31 |
return new Responses\ForwardResponse($request->setPresenterName($module . $sep . 'Error4xx')); |
|
32 |
} |
|
33 |
|
|
34 |
$this->logger->log($exception, ILogger::EXCEPTION); |
|
35 |
return new Responses\CallbackResponse(function (Http\IRequest $httpRequest, Http\IResponse $httpResponse) { |
|
36 |
if (preg_match('#^text/html(?:;|$)#', $httpResponse->getHeader('Content-Type'))) { |
|
37 |
require __DIR__ . '/templates/Error/500.phtml'; |
|
38 |
} |
|
39 |
}); |
|
40 |
} |
|
41 |
} |
app/presenters/HomepagePresenter.php | ||
---|---|---|
1 |
<?php |
|
2 |
|
|
3 |
namespace App\Presenters; |
|
4 |
|
|
5 |
use Nette; |
|
6 |
|
|
7 |
|
|
8 |
final class HomepagePresenter extends Nette\Application\UI\Presenter |
|
9 |
{ |
|
10 |
} |
app/presenters/templates/@layout.latte | ||
---|---|---|
1 |
<!DOCTYPE html> |
|
2 |
<html> |
|
3 |
<head> |
|
4 |
<meta charset="utf-8"> |
|
5 |
<meta name="viewport" content="width=device-width"> |
|
6 |
|
|
7 |
<title>{ifset title}{include title|stripHtml} | {/ifset}Nette Web</title> |
|
8 |
</head> |
|
9 |
|
|
10 |
<body> |
|
11 |
<div n:foreach="$flashes as $flash" n:class="flash, $flash->type">{$flash->message}</div> |
|
12 |
|
|
13 |
{include content} |
|
14 |
|
|
15 |
{block scripts} |
|
16 |
<script src="https://nette.github.io/resources/js/netteForms.min.js"></script> |
|
17 |
{/block} |
|
18 |
</body> |
|
19 |
</html> |
app/presenters/templates/Error/403.latte | ||
---|---|---|
1 |
{block content} |
|
2 |
<h1 n:block=title>Access Denied</h1> |
|
3 |
|
|
4 |
<p>You do not have permission to view this page. Please try contact the web |
|
5 |
site administrator if you believe you should be able to view this page.</p> |
|
6 |
|
|
7 |
<p><small>error 403</small></p> |
app/presenters/templates/Error/404.latte | ||
---|---|---|
1 |
{block content} |
|
2 |
<h1 n:block=title>Page Not Found</h1> |
|
3 |
|
|
4 |
<p>The page you requested could not be found. It is possible that the address is |
|
5 |
incorrect, or that the page no longer exists. Please use a search engine to find |
|
6 |
what you are looking for.</p> |
|
7 |
|
|
8 |
<p><small>error 404</small></p> |
app/presenters/templates/Error/405.latte | ||
---|---|---|
1 |
{block content} |
|
2 |
<h1 n:block=title>Method Not Allowed</h1> |
|
3 |
|
|
4 |
<p>The requested method is not allowed for the URL.</p> |
|
5 |
|
|
6 |
<p><small>error 405</small></p> |
app/presenters/templates/Error/410.latte | ||
---|---|---|
1 |
{block content} |
|
2 |
<h1 n:block=title>Page Not Found</h1> |
|
3 |
|
|
4 |
<p>The page you requested has been taken off the site. We apologize for the inconvenience.</p> |
|
5 |
|
|
6 |
<p><small>error 410</small></p> |
app/presenters/templates/Error/4xx.latte | ||
---|---|---|
1 |
{block content} |
|
2 |
<h1 n:block=title>Oops...</h1> |
|
3 |
|
|
4 |
<p>Your browser sent a request that this server could not understand or process.</p> |
app/presenters/templates/Error/500.phtml | ||
---|---|---|
1 |
<!DOCTYPE html><!-- "' --></textarea></script></style></pre></xmp></a></audio></button></canvas></datalist></details></dialog></iframe></listing></meter></noembed></noframes></noscript></optgroup></option></progress></rp></select></table></template></title></video> |
|
2 |
<meta charset="utf-8"> |
|
3 |
<meta name="robots" content="noindex"> |
|
4 |
<title>Server Error</title> |
|
5 |
|
|
6 |
<style> |
|
7 |
#nette-error { all: initial; position: absolute; top: 0; left: 0; right: 0; height: 70vh; min-height: 400px; display: flex; align-items: center; justify-content: center; z-index: 1000 } |
|
8 |
#nette-error div { all: initial; max-width: 550px; background: white; color: #333; display: block } |
|
9 |
#nette-error h1 { all: initial; font: bold 50px/1.1 sans-serif; display: block; margin: 40px } |
|
10 |
#nette-error p { all: initial; font: 20px/1.4 sans-serif; margin: 40px; display: block } |
|
11 |
#nette-error small { color: gray } |
|
12 |
</style> |
|
13 |
|
|
14 |
<div id=nette-error> |
|
15 |
<div> |
|
16 |
<h1>Server Error</h1> |
|
17 |
|
|
18 |
<p>We're sorry! The server encountered an internal error and |
|
19 |
was unable to complete your request. Please try again later.</p> |
|
20 |
|
|
21 |
<p><small>error 500</small></p> |
|
22 |
</div> |
|
23 |
</div> |
|
24 |
|
|
25 |
<script> |
|
26 |
document.body.insertBefore(document.getElementById('nette-error'), document.body.firstChild); |
|
27 |
</script> |
app/presenters/templates/Error/503.phtml | ||
---|---|---|
1 |
<?php |
|
2 |
|
|
3 |
header('HTTP/1.1 503 Service Unavailable'); |
|
4 |
header('Retry-After: 300'); // 5 minutes in seconds |
|
5 |
|
|
6 |
?> |
|
7 |
<!DOCTYPE html> |
|
8 |
<meta charset="utf-8"> |
|
9 |
<meta name="robots" content="noindex"> |
|
10 |
<meta name="generator" content="Nette Framework"> |
|
11 |
|
|
12 |
<style> |
|
13 |
body { color: #333; background: white; width: 500px; margin: 100px auto } |
|
14 |
h1 { font: bold 47px/1.5 sans-serif; margin: .6em 0 } |
|
15 |
p { font: 21px/1.5 Georgia,serif; margin: 1.5em 0 } |
|
16 |
</style> |
|
17 |
|
|
18 |
<title>Site is temporarily down for maintenance</title> |
|
19 |
|
|
20 |
<h1>We're Sorry</h1> |
|
21 |
|
|
22 |
<p>The site is temporarily down for maintenance. Please try again in a few minutes.</p> |
app/presenters/templates/Homepage/default.latte | ||
---|---|---|
1 |
{* This is the welcome page, you can delete it *} |
|
2 |
|
|
3 |
{block content} |
|
4 |
<div id="banner"> |
|
5 |
<h1 n:block=title>Congratulations!</h1> |
|
6 |
</div> |
|
7 |
|
|
8 |
<div id="content"> |
|
9 |
<h2>You have successfully created your <a href="https://nette.org">Nette</a> Web project.</h2> |
|
10 |
|
|
11 |
<p><img src="data:image/png;base64,i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xKTqqukFox1BkFSoGo5+fSb8frP+sc/sTkG3j/zAfl6YDfOn4WOY2JuQV2uCfM2iq0p1RiUTJVBrMb5iJlxbba0EulLW79IFrQdAOuDXqpp01cLULv6TqjWLstcEacqEpUQTslU0xCFgNL982+O08nw6xgTB5izj9bBjtFF+r9106a1YH5B8XHcZ6rDLNwddLPN35iBXOMCVFySjgFRD/TLX3+vcMA+dnJwEO7Mz4PhcT6Gwtb5v/P5mrpVGzMPkclMywwMS63dW0CGrba0bMnFSx0fHR803P/NGNRA1mchzW4f2Zrn7DKIBqvc4wCv/XDmhAc+15bUmeYJzcmi4ynBcVkdPOB57Y04HY8wr1UtKlzvnDOs6FcmUCrgWNgt+98LDvuQixwBFz3nZFtRPUIgw4ASJHBKsB+UvfcAjvCybH/gxGD2Fz3gpphjwNn3BbcZibmkJMdk/1MKZhekMSigpXn/FxXKiupzmVIqwP5l/KLDRTJiB0WegSBuAL33TET7XI+k6p1AAigEAGAodM2C3mlBgmMywlbZAjjrqtSTobEvKwsaGgMhQFPd56b/CzAArAe2YDJd4I4AAAAASUVORK5CYII=" alt=""> |
|
12 |
If you are exploring Nette for the first time, you should read the |
|
13 |
<a href="https://doc.nette.org/quickstart">Quick Start</a>, <a href="https://doc.nette.org">documentation</a>, |
|
14 |
<a href="https://pla.nette.org">tutorials</a> and <a href="https://forum.nette.org">forum</a>.</p> |
|
15 |
|
|
16 |
<h2>We hope you enjoy Nette!</h2> |
|
17 |
</div> |
|
18 |
|
|
19 |
<style> |
|
20 |
html { font: normal 18px/1.3 Georgia, "New York CE", utopia, serif; color: #666; -webkit-text-stroke: 1px rgba(0,0,0,0); overflow-y: scroll; } |
|
21 |
body { background: #3484d2; color: #333; margin: 2em auto; padding: 0 .5em; max-width: 600px; min-width: 320px; } |
|
22 |
|
|
23 |
a { color: #006aeb; padding: 3px 1px; } |
|
24 |
a:hover, a:active, a:focus { background-color: #006aeb; text-decoration: none; color: white; } |
|
25 |
|
|
26 |
#banner { border-radius: 12px 12px 0 0; background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAB5CAMAAADPursXAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAGBQTFRFD1CRDkqFDTlmDkF1D06NDT1tDTNZDk2KEFWaDTZgDkiCDTtpDT5wDkZ/DTBVEFacEFOWD1KUDTRcDTFWDkV9DkR7DkN4DkByDTVeDC9TDThjDTxrDkeADkuIDTRbDC9SbsUaggAAAEdJREFUeNqkwYURgAAQA7DH3d3335LSKyxAYpf9vWCpnYbf01qcOdFVXc14w4BznNTjkQfsscAdU3b4wIh9fDVYc4zV8xZgAAYaCMI6vPgLAAAAAElFTkSuQmCC); } |
|
27 |
|
|
28 |
h1 { font: inherit; color: white; font-size: 50px; line-height: 121px; margin: 0; padding-left: 4%; background: url(https://files.nette.org/images/logo-nette@2.png) no-repeat 95%; background-size: 130px auto; text-shadow: 1px 1px 0 rgba(0, 0, 0, .9); } |
|
29 |
@media (max-width: 600px) { |
|
30 |
h1 { background: none; font-size: 40px; } |
|
31 |
} |
|
32 |
|
|
33 |
#content { background: white; border: 1px solid #eff4f7; border-radius: 0 0 12px 12px; padding: 10px 4%; overflow: hidden; } |
|
34 |
|
|
35 |
h2 { font: inherit; padding: 1.2em 0; margin: 0; } |
|
36 |
|
|
37 |
img { border: none; float: right; margin: 0 0 1em 3em; } |
|
38 |
</style> |
app/router/RouterFactory.php | ||
---|---|---|
1 |
<?php |
|
2 |
|
|
3 |
namespace App; |
|
4 |
|
|
5 |
use Nette; |
|
6 |
use Nette\Application\Routers\Route; |
|
7 |
use Nette\Application\Routers\RouteList; |
|
8 |
|
|
9 |
|
|
10 |
final class RouterFactory |
|
11 |
{ |
|
12 |
use Nette\StaticClass; |
|
13 |
|
|
14 |
/** |
|
15 |
* @return Nette\Application\IRouter |
|
16 |
*/ |
|
17 |
public static function createRouter() |
|
18 |
{ |
|
19 |
$router = new RouteList; |
|
20 |
$router[] = new Route('<presenter>/<action>[/<id>]', 'Homepage:default'); |
|
21 |
return $router; |
|
22 |
} |
|
23 |
} |
composer.json | ||
---|---|---|
1 |
{ |
|
2 |
"name": "nette/web-project", |
|
3 |
"description": "Nette: Standard Web Project", |
|
4 |
"keywords": ["nette"], |
|
5 |
"type": "project", |
|
6 |
"license": ["MIT", "BSD-3-Clause", "GPL-2.0", "GPL-3.0"], |
|
7 |
"require": { |
|
8 |
"php": ">= 7.0", |
|
9 |
"nette/application": "^2.4", |
|
10 |
"nette/bootstrap": "^2.4.2", |
|
11 |
"nette/caching": "^2.5", |
|
12 |
"nette/database": "^2.4", |
|
13 |
"nette/di": "^2.4", |
|
14 |
"nette/finder": "^2.4", |
|
15 |
"nette/forms": "^2.4", |
|
16 |
"nette/http": "^2.4", |
|
17 |
"nette/mail": "^2.4", |
|
18 |
"nette/robot-loader": "^2.4 || ^3.0", |
|
19 |
"nette/security": "^2.4", |
|
20 |
"nette/utils": "^2.4", |
|
21 |
"latte/latte": "^2.4", |
|
22 |
"tracy/tracy": "^2.4" |
|
23 |
}, |
|
24 |
"require-dev": { |
|
25 |
"nette/tester": "^2.0" |
|
26 |
}, |
|
27 |
"minimum-stability": "stable", |
|
28 |
"config": { |
|
29 |
"platform": { |
|
30 |
"php": "7.0" |
|
31 |
} |
|
32 |
} |
|
33 |
} |
composer.lock | ||
---|---|---|
1 |
{ |
|
2 |
"_readme": [ |
|
3 |
"This file locks the dependencies of your project to a known state", |
|
4 |
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", |
|
5 |
"This file is @generated automatically" |
|
6 |
], |
|
7 |
"content-hash": "29742b99e1ba0714587bf91cdbaecb4d", |
|
8 |
"packages": [ |
|
9 |
{ |
|
10 |
"name": "latte/latte", |
|
11 |
"version": "v2.4.8", |
|
12 |
"source": { |
|
13 |
"type": "git", |
|
14 |
"url": "https://github.com/nette/latte.git", |
|
15 |
"reference": "95ca6bab6caaa3efa3b5d7d4537f9a45cb89ed90" |
|
16 |
}, |
|
17 |
"dist": { |
|
18 |
"type": "zip", |
|
19 |
"url": "https://api.github.com/repos/nette/latte/zipball/95ca6bab6caaa3efa3b5d7d4537f9a45cb89ed90", |
|
20 |
"reference": "95ca6bab6caaa3efa3b5d7d4537f9a45cb89ed90", |
|
21 |
"shasum": "" |
|
22 |
}, |
|
23 |
"require": { |
|
24 |
"ext-json": "*", |
|
25 |
"ext-tokenizer": "*", |
|
26 |
"php": ">=5.4.4" |
|
27 |
}, |
|
28 |
"conflict": { |
|
29 |
"nette/application": "<2.4.1" |
|
30 |
}, |
|
31 |
"require-dev": { |
|
32 |
"nette/tester": "~1.7", |
|
33 |
"tracy/tracy": "^2.3" |
|
34 |
}, |
|
35 |
"suggest": { |
|
36 |
"ext-fileinfo": "to use filter |datastream", |
|
37 |
"ext-mbstring": "to use filters like lower, upper, capitalize, ...", |
|
38 |
"nette/utils": "to use filter |webalize" |
|
39 |
}, |
|
40 |
"type": "library", |
|
41 |
"extra": { |
|
42 |
"branch-alias": { |
|
43 |
"dev-master": "2.4-dev" |
|
44 |
} |
|
45 |
}, |
|
46 |
"autoload": { |
|
47 |
"classmap": [ |
|
48 |
"src/" |
|
49 |
] |
|
50 |
}, |
|
51 |
"notification-url": "https://packagist.org/downloads/", |
|
52 |
"license": [ |
|
53 |
"BSD-3-Clause", |
|
54 |
"GPL-2.0", |
|
55 |
"GPL-3.0" |
|
56 |
], |
|
57 |
"authors": [ |
|
58 |
{ |
|
59 |
"name": "David Grudl", |
|
60 |
"homepage": "https://davidgrudl.com" |
|
61 |
}, |
|
62 |
{ |
|
63 |
"name": "Nette Community", |
|
64 |
"homepage": "https://nette.org/contributors" |
|
65 |
} |
|
66 |
], |
|
67 |
"description": "☕ Latte: the intuitive and fast template engine for those who want the most secure PHP sites. Introduces context-sensitive escaping.", |
|
68 |
"homepage": "https://latte.nette.org", |
|
69 |
"keywords": [ |
|
70 |
"context-sensitive", |
|
71 |
"engine", |
|
72 |
"escaping", |
|
73 |
"html", |
|
74 |
"nette", |
|
75 |
"security", |
|
76 |
"template", |
|
77 |
"twig" |
|
78 |
], |
|
79 |
"time": "2018-06-03T17:34:15+00:00" |
|
80 |
}, |
|
81 |
{ |
|
82 |
"name": "nette/application", |
|
83 |
"version": "v2.4.13", |
|
84 |
"source": { |
|
85 |
"type": "git", |
|
86 |
"url": "https://github.com/nette/application.git", |
|
87 |
"reference": "023acd964383de11fbc32cae8f4dfd8043643a0f" |
|
88 |
}, |
|
89 |
"dist": { |
|
90 |
"type": "zip", |
|
91 |
"url": "https://api.github.com/repos/nette/application/zipball/023acd964383de11fbc32cae8f4dfd8043643a0f", |
|
92 |
"reference": "023acd964383de11fbc32cae8f4dfd8043643a0f", |
|
93 |
"shasum": "" |
|
94 |
}, |
|
95 |
"require": { |
|
96 |
"nette/component-model": "^2.3", |
|
97 |
"nette/http": "^2.2", |
|
98 |
"nette/reflection": "^2.2", |
|
99 |
"nette/utils": "^2.4 || ~3.0.0", |
|
100 |
"php": ">=5.6.0" |
|
101 |
}, |
|
102 |
"conflict": { |
|
103 |
"nette/di": "<2.4", |
|
104 |
"nette/forms": "<2.4", |
|
105 |
"nette/latte": "<2.4", |
|
106 |
"nette/nette": "<2.2" |
|
107 |
}, |
|
108 |
"require-dev": { |
|
109 |
"latte/latte": "^2.4.3", |
|
110 |
"mockery/mockery": "^0.9.5", |
|
111 |
"nette/di": "^2.4", |
|
112 |
"nette/forms": "^2.4", |
|
113 |
"nette/robot-loader": "^2.4.2 || ^3.0", |
|
114 |
"nette/security": "^2.4", |
|
115 |
"nette/tester": "^2.0", |
|
116 |
"tracy/tracy": "^2.4" |
|
117 |
}, |
|
118 |
"suggest": { |
|
119 |
"latte/latte": "Allows using Latte in templates", |
|
120 |
"nette/forms": "Allows to use Nette\\Application\\UI\\Form" |
|
121 |
}, |
|
122 |
"type": "library", |
|
123 |
"extra": { |
|
124 |
"branch-alias": { |
|
125 |
"dev-master": "2.4-dev" |
|
126 |
} |
|
127 |
}, |
|
128 |
"autoload": { |
|
129 |
"classmap": [ |
|
130 |
"src/" |
|
131 |
], |
|
132 |
"files": [ |
|
133 |
"src/compatibility.php" |
|
134 |
] |
|
135 |
}, |
|
136 |
"notification-url": "https://packagist.org/downloads/", |
|
137 |
"license": [ |
|
138 |
"BSD-3-Clause", |
|
139 |
"GPL-2.0", |
|
140 |
"GPL-3.0" |
|
141 |
], |
|
142 |
"authors": [ |
|
143 |
{ |
|
144 |
"name": "David Grudl", |
|
145 |
"homepage": "https://davidgrudl.com" |
|
146 |
}, |
|
147 |
{ |
|
148 |
"name": "Nette Community", |
|
149 |
"homepage": "https://nette.org/contributors" |
|
150 |
} |
|
151 |
], |
|
152 |
"description": "🏆 Nette Application: a full-stack component-based MVC kernel for PHP that helps you write powerful and modern web applications. Write less, have cleaner code and your work will bring you joy.", |
|
153 |
"homepage": "https://nette.org", |
|
154 |
"keywords": [ |
|
155 |
"Forms", |
|
156 |
"component-based", |
|
157 |
"control", |
|
158 |
"framework", |
|
159 |
"mvc", |
|
160 |
"mvp", |
|
161 |
"nette", |
|
162 |
"presenter", |
|
163 |
"routing", |
|
164 |
"seo" |
|
165 |
], |
|
166 |
"time": "2018-11-23T22:28:11+00:00" |
|
167 |
}, |
|
168 |
{ |
|
169 |
"name": "nette/bootstrap", |
|
170 |
"version": "v2.4.6", |
|
171 |
"source": { |
|
172 |
"type": "git", |
|
173 |
"url": "https://github.com/nette/bootstrap.git", |
|
174 |
"reference": "268816e3f1bb7426c3a4ceec2bd38a036b532543" |
|
175 |
}, |
|
176 |
"dist": { |
|
177 |
"type": "zip", |
|
178 |
"url": "https://api.github.com/repos/nette/bootstrap/zipball/268816e3f1bb7426c3a4ceec2bd38a036b532543", |
|
179 |
"reference": "268816e3f1bb7426c3a4ceec2bd38a036b532543", |
|
180 |
"shasum": "" |
|
181 |
}, |
|
182 |
"require": { |
|
183 |
"nette/di": "~2.4.7", |
|
184 |
"nette/utils": "~2.4", |
|
185 |
"php": ">=5.6.0" |
|
186 |
}, |
|
187 |
"conflict": { |
|
188 |
"nette/nette": "<2.2" |
|
189 |
}, |
|
190 |
"require-dev": { |
|
191 |
"latte/latte": "~2.2", |
|
192 |
"nette/application": "~2.3", |
|
193 |
"nette/caching": "~2.3", |
|
194 |
"nette/database": "~2.3", |
|
195 |
"nette/forms": "~2.3", |
|
196 |
"nette/http": "~2.4.0", |
|
197 |
"nette/mail": "~2.3", |
|
198 |
"nette/robot-loader": "^2.4.2 || ^3.0", |
|
199 |
"nette/safe-stream": "~2.2", |
|
200 |
"nette/security": "~2.3", |
|
201 |
"nette/tester": "~2.0", |
|
202 |
"tracy/tracy": "^2.4.1" |
|
203 |
}, |
|
204 |
"suggest": { |
|
205 |
"nette/robot-loader": "to use Configurator::createRobotLoader()", |
|
206 |
"tracy/tracy": "to use Configurator::enableTracy()" |
|
207 |
}, |
|
208 |
"type": "library", |
|
209 |
"extra": { |
|
210 |
"branch-alias": { |
|
211 |
"dev-master": "2.4-dev" |
|
212 |
} |
|
213 |
}, |
|
214 |
"autoload": { |
|
215 |
"classmap": [ |
|
216 |
"src/" |
|
217 |
] |
|
218 |
}, |
|
219 |
"notification-url": "https://packagist.org/downloads/", |
|
220 |
"license": [ |
|
221 |
"BSD-3-Clause", |
|
222 |
"GPL-2.0", |
|
223 |
"GPL-3.0" |
|
224 |
], |
|
225 |
"authors": [ |
|
226 |
{ |
|
227 |
"name": "David Grudl", |
|
228 |
"homepage": "https://davidgrudl.com" |
|
229 |
}, |
|
230 |
{ |
|
231 |
"name": "Nette Community", |
|
232 |
"homepage": "https://nette.org/contributors" |
|
233 |
} |
|
234 |
], |
|
235 |
"description": "🅱 Nette Bootstrap: the simple way to configure and bootstrap your Nette application.", |
|
236 |
"homepage": "https://nette.org", |
|
237 |
"keywords": [ |
|
238 |
"bootstrapping", |
|
239 |
"configurator", |
|
240 |
"nette" |
|
241 |
], |
|
242 |
"time": "2018-05-17T12:52:20+00:00" |
|
243 |
}, |
|
244 |
{ |
|
245 |
"name": "nette/caching", |
|
246 |
"version": "v2.5.8", |
|
247 |
"source": { |
|
248 |
"type": "git", |
|
249 |
"url": "https://github.com/nette/caching.git", |
|
250 |
"reference": "7fba7c7ab2585fafb7b31152f2595e1551120555" |
|
251 |
}, |
|
252 |
"dist": { |
|
253 |
"type": "zip", |
|
254 |
"url": "https://api.github.com/repos/nette/caching/zipball/7fba7c7ab2585fafb7b31152f2595e1551120555", |
|
255 |
"reference": "7fba7c7ab2585fafb7b31152f2595e1551120555", |
|
256 |
"shasum": "" |
|
257 |
}, |
|
258 |
"require": { |
|
259 |
"nette/finder": "^2.2 || ~3.0.0", |
|
260 |
"nette/utils": "^2.4 || ~3.0.0", |
|
261 |
"php": ">=5.6.0" |
|
262 |
}, |
|
263 |
"conflict": { |
|
264 |
"nette/nette": "<2.2" |
|
265 |
}, |
|
266 |
"require-dev": { |
|
267 |
"latte/latte": "^2.4", |
|
268 |
"nette/di": "^2.4 || ~3.0.0", |
|
269 |
"nette/tester": "^2.0", |
|
270 |
"tracy/tracy": "^2.4" |
|
271 |
}, |
|
272 |
"suggest": { |
|
273 |
"ext-pdo_sqlite": "to use SQLiteStorage or SQLiteJournal" |
|
274 |
}, |
|
275 |
"type": "library", |
|
276 |
"extra": { |
|
277 |
"branch-alias": { |
|
278 |
"dev-master": "2.5-dev" |
|
279 |
} |
|
280 |
}, |
|
281 |
"autoload": { |
|
282 |
"classmap": [ |
|
283 |
"src/" |
|
284 |
] |
|
285 |
}, |
|
286 |
"notification-url": "https://packagist.org/downloads/", |
|
287 |
"license": [ |
|
288 |
"BSD-3-Clause", |
|
289 |
"GPL-2.0", |
|
290 |
"GPL-3.0" |
|
291 |
], |
|
292 |
"authors": [ |
|
293 |
{ |
|
294 |
"name": "David Grudl", |
|
295 |
"homepage": "https://davidgrudl.com" |
|
296 |
}, |
|
297 |
{ |
|
298 |
"name": "Nette Community", |
|
299 |
"homepage": "https://nette.org/contributors" |
|
300 |
} |
|
301 |
], |
|
302 |
"description": "⏱ Nette Caching: library with easy-to-use API and many cache backends.", |
|
303 |
"homepage": "https://nette.org", |
|
304 |
"keywords": [ |
|
305 |
"cache", |
|
306 |
"journal", |
|
307 |
"memcached", |
|
308 |
"nette", |
|
309 |
"sqlite" |
|
310 |
], |
|
311 |
"time": "2018-03-21T11:04:32+00:00" |
|
312 |
}, |
|
313 |
{ |
|
314 |
"name": "nette/component-model", |
|
315 |
"version": "v2.4.0", |
|
316 |
"source": { |
|
317 |
"type": "git", |
|
318 |
"url": "https://github.com/nette/component-model.git", |
|
319 |
"reference": "6e7980f5ddec31f68a39e767799b1b0be9dd1014" |
|
320 |
}, |
|
321 |
"dist": { |
|
322 |
"type": "zip", |
|
323 |
"url": "https://api.github.com/repos/nette/component-model/zipball/6e7980f5ddec31f68a39e767799b1b0be9dd1014", |
|
324 |
"reference": "6e7980f5ddec31f68a39e767799b1b0be9dd1014", |
|
325 |
"shasum": "" |
|
326 |
}, |
|
327 |
"require": { |
|
328 |
"nette/utils": "^2.5 || ~3.0.0", |
|
329 |
"php": ">=5.6.0" |
|
330 |
}, |
|
331 |
"conflict": { |
|
332 |
"nette/application": "<2.4", |
|
333 |
"nette/nette": "<2.2" |
|
334 |
}, |
|
335 |
"require-dev": { |
|
336 |
"nette/tester": "^2.0", |
|
337 |
"tracy/tracy": "^2.3" |
|
338 |
}, |
|
339 |
"type": "library", |
|
340 |
"extra": { |
|
341 |
"branch-alias": { |
|
342 |
"dev-master": "2.4-dev" |
|
343 |
} |
|
344 |
}, |
|
345 |
"autoload": { |
|
346 |
"classmap": [ |
|
347 |
"src/" |
|
348 |
] |
|
349 |
}, |
|
350 |
"notification-url": "https://packagist.org/downloads/", |
|
351 |
"license": [ |
|
352 |
"BSD-3-Clause", |
|
353 |
"GPL-2.0", |
|
354 |
"GPL-3.0" |
|
355 |
], |
|
356 |
"authors": [ |
|
357 |
{ |
|
358 |
"name": "David Grudl", |
|
359 |
"homepage": "https://davidgrudl.com" |
|
360 |
}, |
|
361 |
{ |
|
362 |
"name": "Nette Community", |
|
363 |
"homepage": "https://nette.org/contributors" |
|
364 |
} |
|
365 |
], |
|
366 |
"description": "⚛ Nette Component Model", |
|
367 |
"homepage": "https://nette.org", |
|
368 |
"keywords": [ |
|
369 |
"components", |
|
370 |
"nette" |
|
371 |
], |
|
372 |
"time": "2018-03-20T16:32:50+00:00" |
|
373 |
}, |
|
374 |
{ |
|
375 |
"name": "nette/database", |
|
376 |
"version": "v2.4.8", |
|
377 |
"source": { |
|
378 |
"type": "git", |
|
379 |
"url": "https://github.com/nette/database.git", |
|
380 |
"reference": "388b172536f49e93c4b775c0adb1db2233a42c9f" |
|
381 |
}, |
|
382 |
"dist": { |
|
383 |
"type": "zip", |
|
384 |
"url": "https://api.github.com/repos/nette/database/zipball/388b172536f49e93c4b775c0adb1db2233a42c9f", |
|
385 |
"reference": "388b172536f49e93c4b775c0adb1db2233a42c9f", |
|
386 |
"shasum": "" |
|
387 |
}, |
|
388 |
"require": { |
|
389 |
"ext-pdo": "*", |
|
390 |
"nette/caching": "^2.2", |
|
391 |
"nette/utils": "^2.4", |
|
392 |
"php": ">=5.6.0" |
|
393 |
}, |
|
394 |
"conflict": { |
|
395 |
"nette/nette": "<2.2" |
|
396 |
}, |
|
397 |
"require-dev": { |
|
398 |
"mockery/mockery": "^1.0.0", |
|
399 |
"nette/di": "^2.4 || ~3.0.0", |
|
400 |
"nette/tester": "^2.0", |
|
401 |
"tracy/tracy": "^2.4" |
|
402 |
}, |
|
403 |
"type": "library", |
|
404 |
"extra": { |
|
405 |
"branch-alias": { |
|
406 |
"dev-master": "2.4-dev" |
|
407 |
} |
|
408 |
}, |
|
409 |
"autoload": { |
|
410 |
"classmap": [ |
|
411 |
"src/" |
|
412 |
] |
|
413 |
}, |
|
414 |
"notification-url": "https://packagist.org/downloads/", |
|
415 |
"license": [ |
|
416 |
"BSD-3-Clause", |
|
417 |
"GPL-2.0", |
|
418 |
"GPL-3.0" |
|
419 |
], |
|
420 |
"authors": [ |
|
421 |
{ |
|
422 |
"name": "David Grudl", |
|
423 |
"homepage": "https://davidgrudl.com" |
|
424 |
}, |
|
425 |
{ |
|
426 |
"name": "Nette Community", |
|
427 |
"homepage": "https://nette.org/contributors" |
|
428 |
} |
|
429 |
], |
|
430 |
"description": "💾 Nette Database: layer with a familiar PDO-like API but much more powerful. Building queries, advanced joins, drivers for MySQL, PostgreSQL, SQLite, MS SQL Server and Oracle.", |
|
431 |
"homepage": "https://nette.org", |
|
432 |
"keywords": [ |
|
433 |
"database", |
|
434 |
"mssql", |
|
435 |
"mysql", |
|
436 |
"nette", |
|
437 |
"notorm", |
|
438 |
"oracle", |
|
439 |
"pdo", |
|
440 |
"postgresql", |
|
441 |
"queries", |
|
442 |
"sqlite" |
|
443 |
], |
|
444 |
"time": "2018-11-26T15:09:27+00:00" |
|
445 |
}, |
|
446 |
{ |
|
447 |
"name": "nette/di", |
|
448 |
"version": "v2.4.15", |
|
449 |
"source": { |
|
450 |
"type": "git", |
|
451 |
"url": "https://github.com/nette/di.git", |
|
452 |
"reference": "d0561b8f77e8ef2ed6d83328860e16c81a5a8649" |
|
453 |
}, |
|
454 |
"dist": { |
|
455 |
"type": "zip", |
|
456 |
"url": "https://api.github.com/repos/nette/di/zipball/d0561b8f77e8ef2ed6d83328860e16c81a5a8649", |
|
457 |
"reference": "d0561b8f77e8ef2ed6d83328860e16c81a5a8649", |
|
458 |
"shasum": "" |
|
459 |
}, |
|
460 |
"require": { |
|
461 |
"ext-tokenizer": "*", |
|
462 |
"nette/neon": "^2.3.3 || ~3.0.0", |
|
463 |
"nette/php-generator": "^2.6.1 || ^3.0.0", |
|
464 |
"nette/utils": "^2.5.0 || ~3.0.0", |
|
465 |
"php": ">=5.6.0" |
|
466 |
}, |
|
467 |
"conflict": { |
|
468 |
"nette/bootstrap": "<2.4", |
|
469 |
"nette/nette": "<2.2" |
|
470 |
}, |
|
471 |
"require-dev": { |
|
472 |
"nette/tester": "^2.0", |
|
473 |
"tracy/tracy": "^2.3" |
|
474 |
}, |
|
475 |
"type": "library", |
|
476 |
"extra": { |
|
477 |
"branch-alias": { |
|
478 |
"dev-master": "2.4-dev" |
|
479 |
} |
|
480 |
}, |
|
481 |
"autoload": { |
|
482 |
"classmap": [ |
|
483 |
"src/" |
|
484 |
] |
|
485 |
}, |
|
486 |
"notification-url": "https://packagist.org/downloads/", |
|
487 |
"license": [ |
|
488 |
"BSD-3-Clause", |
|
489 |
"GPL-2.0", |
Také k dispozici: Unified diff
Revert "Merge branch '7178_vytvoreni_repository' into 'master'"
This reverts merge request !2