Skip to content

Commit 3e9c4f0

Browse files
committed
latte 3.1.2
1 parent f3c9b93 commit 3e9c4f0

2 files changed

Lines changed: 8 additions & 8 deletions

File tree

latte/cs/develop.texy

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ Jak vykreslit šablonu? Stačí k tomu tento jednoduchý kód:
2727
```php
2828
$latte = new Latte\Engine;
2929
// adresář pro cache
30-
$latte->setTempDirectory('/path/to/tempdir');
30+
$latte->setCacheDirectory('/path/to/tempdir');
3131

3232
$params = [ /* proměnné šablony */ ];
3333
// or $params = new TemplateParameters(/* ... */);
@@ -184,18 +184,18 @@ Ve striktním režimu parsování Latte kontroluje, zda nechybí uzavírací HTM
184184

185185
```php
186186
$latte = new Latte\Engine;
187-
$latte->setStrictParsing();
187+
$latte->setFeature(Latte\Feature::StrictParsing);
188188
```
189189

190190
Generování šablon s hlavičkou `declare(strict_types=1)` zapnete takto:
191191

192192
```php
193193
$latte = new Latte\Engine;
194-
$latte->setStrictTypes();
194+
$latte->setFeature(Latte\Feature::StrictTypes);
195195
```
196196

197197
.[note]
198-
Od verze Latte 3.1 jsou strict types povoleny ve výchozím nastavení. Můžete je deaktivovat pomocí `$latte->setStrictTypes(false)`.
198+
Od verze Latte 3.1 jsou strict types povoleny ve výchozím nastavení. Můžete je deaktivovat pomocí `$latte->setFeature(Latte\Feature::StrictTypes, false)`.
199199

200200

201201
Migrační varování .{data-version:3.1}

latte/en/develop.texy

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ How to render a template? Just use this simple code:
2727
```php
2828
$latte = new Latte\Engine;
2929
// cache directory
30-
$latte->setTempDirectory('/path/to/tempdir');
30+
$latte->setCacheDirectory('/path/to/tempdir');
3131

3232
$params = [ /* template variables */ ];
3333
// or $params = new TemplateParameters(/* ... */);
@@ -184,18 +184,18 @@ In strict parsing mode, Latte checks for missing closing HTML tags and also disa
184184

185185
```php
186186
$latte = new Latte\Engine;
187-
$latte->setStrictParsing();
187+
$latte->setFeature(Latte\Feature::StrictParsing);
188188
```
189189

190190
To generate templates with the `declare(strict_types=1)` header, do the following:
191191

192192
```php
193193
$latte = new Latte\Engine;
194-
$latte->setStrictTypes();
194+
$latte->setFeature(Latte\Feature::StrictTypes);
195195
```
196196

197197
.[note]
198-
Since Latte 3.1, strict types are enabled by default. You can disable them with `$latte->setStrictTypes(false)`.
198+
Since Latte 3.1, strict types are enabled by default. You can disable them with `$latte->setFeature(Latte\Feature::StrictTypes, false)`.
199199

200200

201201
Migration Warnings .{data-version:3.1}

0 commit comments

Comments
 (0)