Skip to content

Commit

Permalink
new directory structure throughout documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
dg committed Apr 18, 2024
1 parent 88c8361 commit f293408
Show file tree
Hide file tree
Showing 260 changed files with 1,228 additions and 1,276 deletions.
10 changes: 5 additions & 5 deletions application/bg/routing.texy
Original file line number Diff line number Diff line change
Expand Up @@ -477,10 +477,10 @@ $router->addRoute('index<?.html \.html?|\.php|>', /* ... */);
Интеграция .[#toc-integration]
==============================

За да свържем маршрутизатора си с приложението, трябва да информираме за това контейнера DI. Най-лесният начин е да се подготви фабрика, която ще създаде обект маршрутизатор, и да се каже на конфигурацията на контейнера да го използва. Да предположим, че напишем метод за това, `App\Router\RouterFactory::createRouter()`:
За да свържем маршрутизатора си с приложението, трябва да информираме за това контейнера DI. Най-лесният начин е да се подготви фабрика, която ще създаде обект маршрутизатор, и да се каже на конфигурацията на контейнера да го използва. Да предположим, че напишем метод за това, `App\Core\RouterFactory::createRouter()`:

```php
namespace App\Router;
namespace App\Core;

use Nette\Application\Routers\RouteList;

Expand All @@ -499,7 +499,7 @@ class RouterFactory

```neon
services:
- App\Router\RouterFactory::createRouter
- App\Core\RouterFactory::createRouter
```

Всички зависимости, като например връзки към бази данни и т.н., се предават на метода на фабриката като параметри, като се използва [автоматично свързване |dependency-injection:autowiring]:
Expand Down Expand Up @@ -663,7 +663,7 @@ $router->addRoute(/* ... */);
Затова отново ще добавим метод, който ще създаде например маршрутизатор:

```php
namespace App\Router;
namespace App\Core;

use Nette\Routing\RouteList;

Expand Down Expand Up @@ -694,7 +694,7 @@ $httpRequest = $container->getByType(Nette\Http\IRequest::class);
Или ще създадем обектите директно:

```php
$router = App\Router\RouterFactory::createRouter();
$router = App\Core\RouterFactory::createRouter();
$httpRequest = (new Nette\Http\RequestFactory)->fromGlobals();
```

Expand Down
10 changes: 5 additions & 5 deletions application/cs/routing.texy
Original file line number Diff line number Diff line change
Expand Up @@ -477,10 +477,10 @@ $router->addRoute('index<?.html \.html?|\.php|>', /* ... */);
Začlenění do aplikace
=====================

Abychom vytvořený router zapojili do aplikace, musíme o něm říci DI kontejneru. Nejsnazší cesta je připravit továrnu, která objekt routeru vyrobí, a sdělit v konfiguraci kontejneru, že ji má použít. Dejme tomu, že k tomu účelu napíšeme metodu `App\Router\RouterFactory::createRouter()`:
Abychom vytvořený router zapojili do aplikace, musíme o něm říci DI kontejneru. Nejsnazší cesta je připravit továrnu, která objekt routeru vyrobí, a sdělit v konfiguraci kontejneru, že ji má použít. Dejme tomu, že k tomu účelu napíšeme metodu `App\Core\RouterFactory::createRouter()`:

```php
namespace App\Router;
namespace App\Core;

use Nette\Application\Routers\RouteList;

Expand All @@ -499,7 +499,7 @@ Do [konfigurace |dependency-injection:services] pak zapíšeme:

```neon
services:
- App\Router\RouterFactory::createRouter
- App\Core\RouterFactory::createRouter
```

Jakékoliv závislosti, třeba na databázi atd, se předají tovární metodě jako její parametry pomocí [autowiringu|dependency-injection:autowiring]:
Expand Down Expand Up @@ -663,7 +663,7 @@ Samostatným použitím myslíme využití schopností routeru v aplikaci, kter
Takže opět si vytvoříme metodu, která nám sestaví router, např.:

```php
namespace App\Router;
namespace App\Core;

use Nette\Routing\RouteList;

Expand Down Expand Up @@ -694,7 +694,7 @@ $httpRequest = $container->getByType(Nette\Http\IRequest::class);
Anebo objekty přímo vyrobíme:

```php
$router = App\Router\RouterFactory::createRouter();
$router = App\Core\RouterFactory::createRouter();
$httpRequest = (new Nette\Http\RequestFactory)->fromGlobals();
```

Expand Down
10 changes: 5 additions & 5 deletions application/de/routing.texy
Original file line number Diff line number Diff line change
Expand Up @@ -477,10 +477,10 @@ $router->addRoute('index<?.html \.html?|\.php|>', /* ... */);
Einbindung .[#toc-integration]
==============================

Um unseren Router in die Anwendung einzubinden, müssen wir ihn dem DI-Container mitteilen. Am einfachsten ist es, die Fabrik vorzubereiten, die das Router-Objekt erstellt, und der Container-Konfiguration mitzuteilen, dass sie es verwenden soll. Schreiben wir also eine Methode für diesen Zweck `App\Router\RouterFactory::createRouter()`:
Um unseren Router in die Anwendung einzubinden, müssen wir ihn dem DI-Container mitteilen. Am einfachsten ist es, die Fabrik vorzubereiten, die das Router-Objekt erstellt, und der Container-Konfiguration mitzuteilen, dass sie es verwenden soll. Schreiben wir also eine Methode für diesen Zweck `App\Core\RouterFactory::createRouter()`:

```php
namespace App\Router;
namespace App\Core;

use Nette\Application\Routers\RouteList;

Expand All @@ -499,7 +499,7 @@ Dann schreiben wir in [configuration |dependency-injection:services]:

```neon
services:
- App\Router\RouterFactory::createRouter
- App\Core\RouterFactory::createRouter
```

Alle Abhängigkeiten, wie z. B. eine Datenbankverbindung usw., werden der Factory-Methode als Parameter über [Autowiring |dependency-injection:autowiring] übergeben:
Expand Down Expand Up @@ -663,7 +663,7 @@ Unter getrennter Nutzung verstehen wir die Verwendung der Router-Funktionen in e
Wir werden also wieder eine Methode erstellen, die einen Router aufbaut, zum Beispiel:

```php
namespace App\Router;
namespace App\Core;

use Nette\Routing\RouteList;

Expand Down Expand Up @@ -694,7 +694,7 @@ $httpRequest = $container->getByType(Nette\Http\IRequest::class);
Oder wir erstellen die Objekte direkt:

```php
$router = App\Router\RouterFactory::createRouter();
$router = App\Core\RouterFactory::createRouter();
$httpRequest = (new Nette\Http\RequestFactory)->fromGlobals();
```

Expand Down
10 changes: 5 additions & 5 deletions application/el/routing.texy
Original file line number Diff line number Diff line change
Expand Up @@ -477,10 +477,10 @@ $router->addRoute('index<?.html \.html?|\.php|>', /* ... */);
Ενσωμάτωση .[#toc-integration]
==============================

Για να συνδέσουμε τον δρομολογητή μας στην εφαρμογή, πρέπει να ενημερώσουμε το DI container σχετικά με αυτόν. Ο ευκολότερος τρόπος είναι να προετοιμάσουμε το εργοστάσιο που θα κατασκευάσει το αντικείμενο του δρομολογητή και να πούμε στη διαμόρφωση του δοχείου να το χρησιμοποιήσει. Ας πούμε λοιπόν ότι γράφουμε μια μέθοδο για το σκοπό αυτό `App\Router\RouterFactory::createRouter()`:
Για να συνδέσουμε τον δρομολογητή μας στην εφαρμογή, πρέπει να ενημερώσουμε το DI container σχετικά με αυτόν. Ο ευκολότερος τρόπος είναι να προετοιμάσουμε το εργοστάσιο που θα κατασκευάσει το αντικείμενο του δρομολογητή και να πούμε στη διαμόρφωση του δοχείου να το χρησιμοποιήσει. Ας πούμε λοιπόν ότι γράφουμε μια μέθοδο για το σκοπό αυτό `App\Core\RouterFactory::createRouter()`:

```php
namespace App\Router;
namespace App\Core;

use Nette\Application\Routers\RouteList;

Expand All @@ -499,7 +499,7 @@ class RouterFactory

```neon
services:
- App\Router\RouterFactory::createRouter
- App\Core\RouterFactory::createRouter
```

Οποιεσδήποτε εξαρτήσεις, όπως μια σύνδεση βάσης δεδομένων κ.λπ., περνούν στη μέθοδο factory ως παράμετροι με τη χρήση [αυτόματης σύνδεσης |dependency-injection:autowiring]:
Expand Down Expand Up @@ -663,7 +663,7 @@ $router->addRoute(/* ... */);
Έτσι και πάλι θα δημιουργήσουμε μια μέθοδο που θα κατασκευάσει ένα δρομολογητή, για παράδειγμα:

```php
namespace App\Router;
namespace App\Core;

use Nette\Routing\RouteList;

Expand Down Expand Up @@ -694,7 +694,7 @@ $httpRequest = $container->getByType(Nette\Http\IRequest::class);
Ή θα δημιουργήσουμε αντικείμενα απευθείας:

```php
$router = App\Router\RouterFactory::createRouter();
$router = App\Core\RouterFactory::createRouter();
$httpRequest = (new Nette\Http\RequestFactory)->fromGlobals();
```

Expand Down
10 changes: 5 additions & 5 deletions application/en/routing.texy
Original file line number Diff line number Diff line change
Expand Up @@ -477,10 +477,10 @@ $router->addRoute('index<?.html \.html?|\.php|>', /* ... */);
Integration
===========

In order to connect the our router into the application, we must tell the DI container about it. The easiest way is to prepare the factory that will build the router object and tell the container configuration to use it. So let's say we write a method for this purpose `App\Router\RouterFactory::createRouter()`:
In order to connect the our router into the application, we must tell the DI container about it. The easiest way is to prepare the factory that will build the router object and tell the container configuration to use it. So let's say we write a method for this purpose `App\Core\RouterFactory::createRouter()`:

```php
namespace App\Router;
namespace App\Core;

use Nette\Application\Routers\RouteList;

Expand All @@ -499,7 +499,7 @@ Then we write in [configuration |dependency-injection:services]:

```neon
services:
- App\Router\RouterFactory::createRouter
- App\Core\RouterFactory::createRouter
```

Any dependencies, such as a database connection etc., are passed to the factory method as its parameters using [autowiring |dependency-injection:autowiring]:
Expand Down Expand Up @@ -663,7 +663,7 @@ By separated usage, we mean the use of the router's capabilities in an applicati
So again we will create a method that will build a router, for example:

```php
namespace App\Router;
namespace App\Core;

use Nette\Routing\RouteList;

Expand Down Expand Up @@ -694,7 +694,7 @@ $httpRequest = $container->getByType(Nette\Http\IRequest::class);
Or we will create objects directly:

```php
$router = App\Router\RouterFactory::createRouter();
$router = App\Core\RouterFactory::createRouter();
$httpRequest = (new Nette\Http\RequestFactory)->fromGlobals();
```

Expand Down
10 changes: 5 additions & 5 deletions application/es/routing.texy
Original file line number Diff line number Diff line change
Expand Up @@ -477,10 +477,10 @@ $router->addRoute('index<?.html \.html?|\.php|>', /* ... */);
Integración .[#toc-integration]
===============================

Para conectar nuestro router a la aplicación, debemos informar al contenedor DI sobre él. La forma más sencilla es preparar la fábrica que construirá el objeto router y decirle a la configuración del contenedor que lo utilice. Digamos que escribimos un método para este propósito `App\Router\RouterFactory::createRouter()`:
Para conectar nuestro router a la aplicación, debemos informar al contenedor DI sobre él. La forma más sencilla es preparar la fábrica que construirá el objeto router y decirle a la configuración del contenedor que lo utilice. Digamos que escribimos un método para este propósito `App\Core\RouterFactory::createRouter()`:

```php
namespace App\Router;
namespace App\Core;

use Nette\Application\Routers\RouteList;

Expand All @@ -499,7 +499,7 @@ Luego escribimos en [configuración |dependency-injection:services]:

```neon
services:
- App\Router\RouterFactory::createRouter
- App\Core\RouterFactory::createRouter
```

Cualquier dependencia, como una conexión de base de datos, etc., se pasa al método de fábrica como sus parámetros utilizando [autowiring |dependency-injection:autowiring]:
Expand Down Expand Up @@ -663,7 +663,7 @@ Por uso separado, nos referimos al uso de las capacidades del router en una apli
Así que de nuevo crearemos un método que construirá un enrutador, por ejemplo

```php
namespace App\Router;
namespace App\Core;

use Nette\Routing\RouteList;

Expand Down Expand Up @@ -694,7 +694,7 @@ $httpRequest = $container->getByType(Nette\Http\IRequest::class);
O crearemos los objetos directamente:

```php
$router = App\Router\RouterFactory::createRouter();
$router = App\Core\RouterFactory::createRouter();
$httpRequest = (new Nette\Http\RequestFactory)->fromGlobals();
```

Expand Down
10 changes: 5 additions & 5 deletions application/fr/routing.texy
Original file line number Diff line number Diff line change
Expand Up @@ -477,10 +477,10 @@ $router->addRoute('index<?.html \.html?|\.php|>', /* ... */);
Intégration .[#toc-integration]
===============================

Afin de connecter notre routeur à l'application, nous devons en informer le conteneur DI. Le moyen le plus simple est de préparer la fabrique qui construira l'objet routeur et de dire à la configuration du conteneur de l'utiliser. Disons que nous écrivons une méthode dans ce but `App\Router\RouterFactory::createRouter()`:
Afin de connecter notre routeur à l'application, nous devons en informer le conteneur DI. Le moyen le plus simple est de préparer la fabrique qui construira l'objet routeur et de dire à la configuration du conteneur de l'utiliser. Disons que nous écrivons une méthode dans ce but `App\Core\RouterFactory::createRouter()`:

```php
namespace App\Router;
namespace App\Core;

use Nette\Application\Routers\RouteList;

Expand All @@ -499,7 +499,7 @@ Puis nous écrivons dans la [configuration |dependency-injection:services]:

```neon
services:
- App\Router\RouterFactory::createRouter
- App\Core\RouterFactory::createRouter
```

Toutes les dépendances, telles qu'une connexion à une base de données, etc., sont transmises à la méthode factory en tant que paramètres en utilisant le [câblage automatique |dependency-injection:autowiring]:
Expand Down Expand Up @@ -663,7 +663,7 @@ Par utilisation séparée, nous entendons l'utilisation des capacités du routeu
Donc encore une fois nous allons créer une méthode qui va construire un routeur, par exemple :

```php
namespace App\Router;
namespace App\Core;

use Nette\Routing\RouteList;

Expand Down Expand Up @@ -694,7 +694,7 @@ $httpRequest = $container->getByType(Nette\Http\IRequest::class);
Ou bien nous créerons directement des objets :

```php
$router = App\Router\RouterFactory::createRouter();
$router = App\Core\RouterFactory::createRouter();
$httpRequest = (new Nette\Http\RequestFactory)->fromGlobals();
```

Expand Down
10 changes: 5 additions & 5 deletions application/hu/routing.texy
Original file line number Diff line number Diff line change
Expand Up @@ -477,10 +477,10 @@ $router->addRoute('index<?.html \.html?|\.php|>', /* ... */);
Integráció .[#toc-integration]
==============================

Ahhoz, hogy a routerünket az alkalmazásba kapcsoljuk, tájékoztatnunk kell róla a DI konténert. A legegyszerűbb, ha elkészítjük a gyárat, amely a router objektumot fogja felépíteni, és megmondjuk a konténer konfigurációjának, hogy használja azt. Tegyük fel, hogy írunk egy metódust erre a célra `App\Router\RouterFactory::createRouter()`:
Ahhoz, hogy a routerünket az alkalmazásba kapcsoljuk, tájékoztatnunk kell róla a DI konténert. A legegyszerűbb, ha elkészítjük a gyárat, amely a router objektumot fogja felépíteni, és megmondjuk a konténer konfigurációjának, hogy használja azt. Tegyük fel, hogy írunk egy metódust erre a célra `App\Core\RouterFactory::createRouter()`:

```php
namespace App\Router;
namespace App\Core;

use Nette\Application\Routers\RouteList;

Expand All @@ -499,7 +499,7 @@ Ezután beírjuk a [konfigurációba |dependency-injection:services]:

```neon
services:
- App\Router\RouterFactory::createRouter
- App\Core\RouterFactory::createRouter
```

Az esetleges függőségeket, például az adatbázis-kapcsolatot stb., az [autowiring |dependency-injection:autowiring] segítségével paraméterként átadjuk a gyári metódusnak:
Expand Down Expand Up @@ -663,7 +663,7 @@ A szeparált használat alatt a router képességeinek olyan alkalmazásban tör
Tehát ismét létrehozunk egy metódust, amely létrehoz egy útválasztót, például:

```php
namespace App\Router;
namespace App\Core;

use Nette\Routing\RouteList;

Expand Down Expand Up @@ -694,7 +694,7 @@ $httpRequest = $container->getByType(Nette\Http\IRequest::class);
Vagy közvetlenül hozzuk létre az objektumokat:

```php
$router = App\Router\RouterFactory::createRouter();
$router = App\Core\RouterFactory::createRouter();
$httpRequest = (new Nette\Http\RequestFactory)->fromGlobals();
```

Expand Down
10 changes: 5 additions & 5 deletions application/it/routing.texy
Original file line number Diff line number Diff line change
Expand Up @@ -477,10 +477,10 @@ $router->addRoute('index<?.html \.html?|\.php|>', /* ... */);
Integrazione .[#toc-integration]
================================

Per collegare il nostro router all'applicazione, dobbiamo comunicarlo al contenitore DI. Il modo più semplice è preparare il factory che costruirà l'oggetto router e dire al contenitore di configurazione di usarlo. Diciamo quindi di scrivere un metodo a questo scopo `App\Router\RouterFactory::createRouter()`:
Per collegare il nostro router all'applicazione, dobbiamo comunicarlo al contenitore DI. Il modo più semplice è preparare il factory che costruirà l'oggetto router e dire al contenitore di configurazione di usarlo. Diciamo quindi di scrivere un metodo a questo scopo `App\Core\RouterFactory::createRouter()`:

```php
namespace App\Router;
namespace App\Core;

use Nette\Application\Routers\RouteList;

Expand All @@ -499,7 +499,7 @@ Poi scriviamo nella [configurazione |dependency-injection:services]:

```neon
services:
- App\Router\RouterFactory::createRouter
- App\Core\RouterFactory::createRouter
```

Tutte le dipendenze, come la connessione al database, ecc. vengono passate al metodo factory come parametri, utilizzando l'[autowiring |dependency-injection:autowiring]:
Expand Down Expand Up @@ -663,7 +663,7 @@ Per uso separato si intende l'uso delle funzionalità del router in un'applicazi
Quindi creeremo di nuovo un metodo che costruirà un router, ad esempio:

```php
namespace App\Router;
namespace App\Core;

use Nette\Routing\RouteList;

Expand Down Expand Up @@ -694,7 +694,7 @@ $httpRequest = $container->getByType(Nette\Http\IRequest::class);
Oppure creeremo direttamente gli oggetti:

```php
$router = App\Router\RouterFactory::createRouter();
$router = App\Core\RouterFactory::createRouter();
$httpRequest = (new Nette\Http\RequestFactory)->fromGlobals();
```

Expand Down
10 changes: 5 additions & 5 deletions application/pl/routing.texy
Original file line number Diff line number Diff line change
Expand Up @@ -477,10 +477,10 @@ $router->addRoute('index<?.html \.html?|\.php|>', /* ... */);
Integracja aplikacji .[#toc-integration]
========================================

Aby zintegrować stworzony router z aplikacją, musimy powiedzieć o nim kontenerowi DI. Najprostszym sposobem na to jest przygotowanie fabryki tworzącej obiekt routera i powiedzenie konfiguracji kontenera, aby go użyć. Załóżmy, że w tym celu napiszemy metodę `App\Router\RouterFactory::createRouter()`:
Aby zintegrować stworzony router z aplikacją, musimy powiedzieć o nim kontenerowi DI. Najprostszym sposobem na to jest przygotowanie fabryki tworzącej obiekt routera i powiedzenie konfiguracji kontenera, aby go użyć. Załóżmy, że w tym celu napiszemy metodę `App\Core\RouterFactory::createRouter()`:

```php
namespace App\Router;
namespace App\Core;

use Nette\Application\Routers\RouteList;

Expand All @@ -499,7 +499,7 @@ Następnie wpisujemy do [konfiguracji |dependency-injection:services]:

```neon
services:
- App\Router\RouterFactory::createRouter
- App\Core\RouterFactory::createRouter
```

Wszelkie zależności, na przykład od bazy danych itp, są przekazywane do metody fabrycznej jako jej parametry przez [autowiring |dependency-injection:autowiring]:
Expand Down Expand Up @@ -663,7 +663,7 @@ Przez użycie samodzielne rozumiemy wykorzystanie możliwości routera w aplikac
Czyli znowu tworzymy metodę, która buduje dla nas np. router:

```php
namespace App\Router;
namespace App\Core;

use Nette\Routing\RouteList;

Expand Down Expand Up @@ -694,7 +694,7 @@ $httpRequest = $container->getByType(Nette\Http\IRequest::class);
Możemy też wykonać obiekty bezpośrednio:

```php
$router = App\Router\RouterFactory::createRouter();
$router = App\Core\RouterFactory::createRouter();
$httpRequest = (new Nette\Http\RequestFactory)->fromGlobals();
```

Expand Down
Loading

0 comments on commit f293408

Please sign in to comment.