Skip to content

Commit

Permalink
php-generator: updated
Browse files Browse the repository at this point in the history
  • Loading branch information
dg committed Aug 29, 2018
1 parent e6faf40 commit 733fd44
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 6 deletions.
5 changes: 2 additions & 3 deletions cs/php-generator.texy
Expand Up @@ -13,7 +13,6 @@ Začněme rovnou příkladem tvorby třídy pomocí [ClassType |api:Nette\PhpGen
$class = new Nette\PhpGenerator\ClassType('Demo');

$class
->setAbstract()
->setFinal()
->setExtends('ParentClass')
->addImplement('Countable')
Expand All @@ -34,7 +33,7 @@ Vrátí následující výsledek:
*
* @property-read Nette\Forms\Form $form
*/
abstract final class Demo extends ParentClass implements Countable
final class Demo extends ParentClass implements Countable
{
use Nette\SmartObject;
}
Expand Down Expand Up @@ -90,7 +89,7 @@ Výsledkem je:

Pokud vlastnost, konstanta, metoda nebo parametr již existuje, bude přepsán.

PHP Generator podporuje všechny nové vlastnosti PHP 7.2:
PHP Generator podporuje všechny nové vlastnosti PHP 7.3:

/--php
$class = new Nette\PhpGenerator\ClassType('Demo');
Expand Down
5 changes: 2 additions & 3 deletions en/php-generator.texy
Expand Up @@ -13,7 +13,6 @@ Let's start with a straightforward example of generating class using [ClassType
$class = new Nette\PhpGenerator\ClassType('Demo');

$class
->setAbstract()
->setFinal()
->setExtends('ParentClass')
->addImplement('Countable')
Expand All @@ -34,7 +33,7 @@ It will render this result:
*
* @property-read Nette\Forms\Form $form
*/
abstract final class Demo extends ParentClass implements Countable
final class Demo extends ParentClass implements Countable
{
use Nette\SmartObject;
}
Expand Down Expand Up @@ -90,7 +89,7 @@ It results in:

If the property, constant, method or parameter already exist, it will be overwritten.

PHP Generator supports all new PHP 7.2 features:
PHP Generator supports all new PHP 7.3 features:

/--php
$class = new Nette\PhpGenerator\ClassType('Demo');
Expand Down

0 comments on commit 733fd44

Please sign in to comment.