Permalink
Browse files

updated php-generator

  • Loading branch information...
dg committed Apr 26, 2018
1 parent d7cd4f8 commit c9694ae478c0cc28b7fdb176775b38c9e7261d7f
Showing with 30 additions and 0 deletions.
  1. +15 −0 cs/php-generator.texy
  2. +15 −0 en/php-generator.texy
@@ -122,6 +122,21 @@ class Demo
}
\--

Tabulátory versus mezery
------------------------

Vygenerovaný kód používá pro odsazování tabulátory, díky čemuž je lze snadno změnit na libovolný počet mezer:

/--php
use Nette\PhpGenerator\Helpers;

$class = new Nette\PhpGenerator\ClassType('Demo');
// ...

echo Helpers::tabsToSpaces((string) $class); // odsazení 4 mezerami
echo Helpers::tabsToSpaces((string) $class, 2); // odsazení 2 mezerami
\--

Literály
--------

@@ -122,6 +122,21 @@ class Demo
}
\--

Tabs versus spaces
------------------

The generated code uses tabs for indentation, which makes it very easy to change it to any number of spaces:

/--php
use Nette\PhpGenerator\Helpers;

$class = new Nette\PhpGenerator\ClassType('Demo');
// ...

echo Helpers::tabsToSpaces((string) $class); // 4 spaces indentation
echo Helpers::tabsToSpaces((string) $class, 2); // 2 spaces indentation
\--

Literals
--------

0 comments on commit c9694ae

Please sign in to comment.