You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Let's start with a straightforward example of generating class using [ClassType](https://api.nette.org/3.0/Nette/PhpGenerator/ClassType.html):
47
+
Let's start with a straightforward example of generating class using [ClassType](https://api.nette.org/php-generator/Nette/PhpGenerator/ClassType.html):
48
48
49
49
```php
50
50
$class = new Nette\PhpGenerator\ClassType('Demo');
@@ -83,7 +83,7 @@ $printer = new Nette\PhpGenerator\Printer;
83
83
echo $printer->printClass($class);
84
84
```
85
85
86
-
We can add constants ([Constant](https://api.nette.org/3.0/Nette/PhpGenerator/Constant.html)) and properties ([Property](https://api.nette.org/3.0/Nette/PhpGenerator/Property.html)):
86
+
We can add constants ([Constant](https://api.nette.org/php-generator/Nette/PhpGenerator/Constant.html)) and properties ([Property](https://api.nette.org/php-generator/Nette/PhpGenerator/Property.html)):
87
87
88
88
```php
89
89
$class->addConstant('ID', 123)
@@ -358,7 +358,7 @@ $obj = new class ($val) {
358
358
Global Function
359
359
---------------
360
360
361
-
Code of functions will generate class [GlobalFunction](https://api.nette.org/3.0/Nette/PhpGenerator/GlobalFunction.html):
361
+
Code of functions will generate class [GlobalFunction](https://api.nette.org/php-generator/Nette/PhpGenerator/GlobalFunction.html):
362
362
363
363
```php
364
364
$function = new Nette\PhpGenerator\GlobalFunction('foo');
@@ -383,7 +383,7 @@ function foo($a, $b)
383
383
Closure
384
384
-------
385
385
386
-
Code of closures will generate class [Closure](https://api.nette.org/3.0/Nette/PhpGenerator/Closure.html):
386
+
Code of closures will generate class [Closure](https://api.nette.org/php-generator/Nette/PhpGenerator/Closure.html):
387
387
388
388
```php
389
389
$closure = new Nette\PhpGenerator\Closure;
@@ -557,7 +557,7 @@ function foo($a)
557
557
Namespace
558
558
---------
559
559
560
-
Classes, traits and interfaces (hereinafter classes) can be grouped into namespaces ([PhpNamespace](https://api.nette.org/3.0/Nette/PhpGenerator/PhpNamespace.html)):
560
+
Classes, traits and interfaces (hereinafter classes) can be grouped into namespaces ([PhpNamespace](https://api.nette.org/php-generator/Nette/PhpGenerator/PhpNamespace.html)):
561
561
562
562
```php
563
563
$namespace = new Nette\PhpGenerator\PhpNamespace('Foo');
Classes and namespaces can be grouped into PHP files represented by the class [PhpFile](https://api.nette.org/3.0/Nette/PhpGenerator/PhpFile.html):
644
+
Classes and namespaces can be grouped into PHP files represented by the class [PhpFile](https://api.nette.org/php-generator/Nette/PhpGenerator/PhpFile.html):
0 commit comments