Skip to content

Document list<Type> & array<int, Type> for collection of services #1031

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 7 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 23 additions & 0 deletions application/bg/routing.texy
Original file line number Diff line number Diff line change
Expand Up @@ -342,6 +342,29 @@ $router->addRoute('product/<id>', 'Product:detail');
При достъп до стария URL адрес презентаторът автоматично пренасочва към новия URL адрес, така че търсачките да не индексират тези страници два пъти (вж. [SEO и канонизация |#seo-and-canonization]).


Динамично маршрутизиране с обратни извиквания .[#toc-dynamic-routing-with-callbacks]
------------------------------------------------------------------------------------

Динамичното маршрутизиране с обратни повиквания ви позволява директно да присвоявате функции (обратни повиквания) към маршрутите, които ще се изпълняват при посещение на посочения път. Тази гъвкава функция ви позволява бързо и ефективно да създавате различни крайни точки за вашето приложение:

```php
$router->addRoute('test', function () {
echo 'You are at the /test address';
});
```

Можете също така да дефинирате параметри в маската, които автоматично ще бъдат предадени на вашето обратно извикване:

```php
$router->addRoute('<lang cs|en>', function (string $lang) {
echo match ($lang) {
'cs' => 'Welcome to the Czech version of our website!',
'en' => 'Welcome to the English version of our website!',
};
});
```


Модули .[#toc-modules]
----------------------

Expand Down
23 changes: 23 additions & 0 deletions application/cs/routing.texy
Original file line number Diff line number Diff line change
Expand Up @@ -342,6 +342,29 @@ $router->addRoute('product/<id>', 'Product:detail');
Při přístupu na starou URL presenter automaticky přesměruje na nové URL, takže vám tyto stránky vyhledávače nezaindexují dvakrát (viz [#SEO a kanonizace]).


Dynamické routování s callbacky
-------------------------------

Dynamické routování s callbacky vám umožňuje přiřadit routám přímo funkce (callbacky), které se vykonají, když je daná cesta navštívena. Tato flexibilní funkčnost vám umožní rychle a efektivně vytvářet různé koncové body (endpoints) pro vaši aplikaci:

```php
$router->addRoute('test', function () {
echo 'jste na adrese /test';
});
```

Můžete také definovat v masce parametry, které se automaticky předají do vašeho callbacku:

```php
$router->addRoute('<lang cs|en>', function (string $lang) {
echo match ($lang) {
'cs' => 'Vítejte na české verzi našeho webu!',
'en' => 'Welcome to the English version of our website!',
};
});
```


Moduly
------

Expand Down
23 changes: 23 additions & 0 deletions application/de/routing.texy
Original file line number Diff line number Diff line change
Expand Up @@ -342,6 +342,29 @@ $router->addRoute('product/<id>', 'Product:detail');
Beim Zugriff auf die alte URL leitet der Presenter automatisch auf die neue URL um, damit Suchmaschinen diese Seiten nicht doppelt indizieren (siehe [SEO und Kanonisierung |#SEO and canonization]).


Dynamisches Routing mit Rückrufen .[#toc-dynamic-routing-with-callbacks]
------------------------------------------------------------------------

Dynamisches Routing mit Callbacks ermöglicht es Ihnen, den Routen direkt Funktionen (Callbacks) zuzuweisen, die ausgeführt werden, wenn der angegebene Pfad besucht wird. Diese flexible Funktion ermöglicht es Ihnen, schnell und effizient verschiedene Endpunkte für Ihre Anwendung zu erstellen:

```php
$router->addRoute('test', function () {
echo 'You are at the /test address';
});
```

Sie können auch Parameter in der Maske definieren, die automatisch an Ihren Callback übergeben werden:

```php
$router->addRoute('<lang cs|en>', function (string $lang) {
echo match ($lang) {
'cs' => 'Welcome to the Czech version of our website!',
'en' => 'Welcome to the English version of our website!',
};
});
```


Module .[#toc-modules]
----------------------

Expand Down
23 changes: 23 additions & 0 deletions application/el/routing.texy
Original file line number Diff line number Diff line change
Expand Up @@ -342,6 +342,29 @@ $router->addRoute('product/<id>', 'Product:detail');
Κατά την πρόσβαση στην παλιά διεύθυνση URL, ο παρουσιαστής ανακατευθύνει αυτόματα στη νέα διεύθυνση URL, ώστε οι μηχανές αναζήτησης να μην ευρετηριάζουν αυτές τις σελίδες δύο φορές (βλ. [SEO και κανονικοποίηση |#SEO and canonization]).


Δυναμική δρομολόγηση με Callbacks .[#toc-dynamic-routing-with-callbacks]
------------------------------------------------------------------------

Η δυναμική δρομολόγηση με callbacks σας επιτρέπει να αναθέτετε απευθείας λειτουργίες (callbacks) σε διαδρομές, οι οποίες θα εκτελούνται όταν επισκέπτεστε την καθορισμένη διαδρομή. Αυτή η ευέλικτη λειτουργία σας επιτρέπει να δημιουργείτε γρήγορα και αποτελεσματικά διάφορα τελικά σημεία για την εφαρμογή σας:

```php
$router->addRoute('test', function () {
echo 'You are at the /test address';
});
```

Μπορείτε επίσης να ορίσετε παραμέτρους στη μάσκα, οι οποίες θα μεταβιβαστούν αυτόματα στο callback σας:

```php
$router->addRoute('<lang cs|en>', function (string $lang) {
echo match ($lang) {
'cs' => 'Welcome to the Czech version of our website!',
'en' => 'Welcome to the English version of our website!',
};
});
```


Ενότητες .[#toc-modules]
------------------------

Expand Down
23 changes: 23 additions & 0 deletions application/en/routing.texy
Original file line number Diff line number Diff line change
Expand Up @@ -342,6 +342,29 @@ $router->addRoute('product/<id>', 'Product:detail');
When accessing the old URL, the presenter automatically redirects to the new URL so that search engines do not index these pages twice (see [#SEO and canonization]).


Dynamic Routing with Callbacks
------------------------------

Dynamic routing with callbacks allows you to directly assign functions (callbacks) to routes, which will be executed when the specified path is visited. This flexible feature enables you to quickly and efficiently create various endpoints for your application:

```php
$router->addRoute('test', function () {
echo 'You are at the /test address';
});
```

You can also define parameters in the mask, which will be automatically passed to your callback:

```php
$router->addRoute('<lang cs|en>', function (string $lang) {
echo match ($lang) {
'cs' => 'Welcome to the Czech version of our website!',
'en' => 'Welcome to the English version of our website!',
};
});
```


Modules
-------

Expand Down
23 changes: 23 additions & 0 deletions application/es/routing.texy
Original file line number Diff line number Diff line change
Expand Up @@ -342,6 +342,29 @@ $router->addRoute('product/<id>', 'Product:detail');
Al acceder a la URL antigua, el presentador redirige automáticamente a la URL nueva para que los motores de búsqueda no indexen estas páginas dos veces (véase [SEO y canonización |#SEO and canonization]).


Enrutamiento dinámico con llamadas de retorno .[#toc-dynamic-routing-with-callbacks]
------------------------------------------------------------------------------------

El enrutamiento dinámico con callbacks permite asignar directamente funciones (callbacks) a las rutas, que se ejecutarán cuando se visite la ruta especificada. Esta característica flexible le permite crear rápida y eficientemente varios puntos finales para su aplicación:

```php
$router->addRoute('test', function () {
echo 'You are at the /test address';
});
```

También puede definir parámetros en la máscara, que se pasarán automáticamente a su devolución de llamada:

```php
$router->addRoute('<lang cs|en>', function (string $lang) {
echo match ($lang) {
'cs' => 'Welcome to the Czech version of our website!',
'en' => 'Welcome to the English version of our website!',
};
});
```


Módulos .[#toc-modules]
-----------------------

Expand Down
23 changes: 23 additions & 0 deletions application/fr/routing.texy
Original file line number Diff line number Diff line change
Expand Up @@ -342,6 +342,29 @@ $router->addRoute('product/<id>', 'Product:detail');
Lors de l'accès à l'ancienne URL, le diffuseur redirige automatiquement vers la nouvelle URL afin que les moteurs de recherche n'indexent pas ces pages deux fois (voir [SEO et canonisation |#SEO and canonization]).


Routage dynamique avec des callbacks .[#toc-dynamic-routing-with-callbacks]
---------------------------------------------------------------------------

Le routage dynamique avec rappels vous permet d'affecter directement des fonctions (rappels) aux itinéraires, qui seront exécutées lorsque le chemin spécifié est visité. Cette fonctionnalité flexible vous permet de créer rapidement et efficacement différents points d'arrivée pour votre application :

```php
$router->addRoute('test', function () {
echo 'You are at the /test address';
});
```

Vous pouvez également définir des paramètres dans le masque, qui seront automatiquement transmis à votre callback :

```php
$router->addRoute('<lang cs|en>', function (string $lang) {
echo match ($lang) {
'cs' => 'Welcome to the Czech version of our website!',
'en' => 'Welcome to the English version of our website!',
};
});
```


Modules .[#toc-modules]
-----------------------

Expand Down
23 changes: 23 additions & 0 deletions application/hu/routing.texy
Original file line number Diff line number Diff line change
Expand Up @@ -342,6 +342,29 @@ $router->addRoute('product/<id>', 'Product:detail');
A régi URL elérésekor a bemutató automatikusan átirányítja az új URL-re, hogy a keresőmotorok ne indexeljék kétszer ezeket az oldalakat (lásd [SEO és kanonizáció |#SEO and canonization]).


Dinamikus útválasztás visszahívásokkal .[#toc-dynamic-routing-with-callbacks]
-----------------------------------------------------------------------------

A dinamikus útválasztás visszahívásokkal lehetővé teszi, hogy az útvonalakhoz közvetlenül hozzárendeljen függvényeket (visszahívásokat), amelyek a megadott útvonal meglátogatásakor végrehajtódnak. Ez a rugalmas funkció lehetővé teszi, hogy gyorsan és hatékonyan hozzon létre különböző végpontokat az alkalmazásához:

```php
$router->addRoute('test', function () {
echo 'You are at the /test address';
});
```

A maszkban paramétereket is meghatározhat, amelyek automatikusan átadásra kerülnek a visszahívásnak:

```php
$router->addRoute('<lang cs|en>', function (string $lang) {
echo match ($lang) {
'cs' => 'Welcome to the Czech version of our website!',
'en' => 'Welcome to the English version of our website!',
};
});
```


Modulok .[#toc-modules]
-----------------------

Expand Down
23 changes: 23 additions & 0 deletions application/it/routing.texy
Original file line number Diff line number Diff line change
Expand Up @@ -342,6 +342,29 @@ $router->addRoute('product/<id>', 'Product:detail');
Quando si accede al vecchio URL, il presentatore reindirizza automaticamente al nuovo URL, in modo che i motori di ricerca non indicizzino queste pagine due volte (vedere [SEO e canonizzazione |#SEO and canonization]).


Instradamento dinamico con callback .[#toc-dynamic-routing-with-callbacks]
--------------------------------------------------------------------------

L'instradamento dinamico con callback consente di assegnare direttamente delle funzioni (callback) alle rotte, che verranno eseguite quando viene visitato il percorso specificato. Questa funzione flessibile consente di creare in modo rapido ed efficiente vari endpoint per l'applicazione:

```php
$router->addRoute('test', function () {
echo 'You are at the /test address';
});
```

È anche possibile definire parametri nella maschera, che verranno passati automaticamente alla callback:

```php
$router->addRoute('<lang cs|en>', function (string $lang) {
echo match ($lang) {
'cs' => 'Welcome to the Czech version of our website!',
'en' => 'Welcome to the English version of our website!',
};
});
```


Moduli .[#toc-modules]
----------------------

Expand Down
23 changes: 23 additions & 0 deletions application/pl/routing.texy
Original file line number Diff line number Diff line change
Expand Up @@ -342,6 +342,29 @@ $router->addRoute('product/<id>', 'Product:detail');
Kiedy użytkownik uzyskuje dostęp do starego adresu URL, prezenter automatycznie przekierowuje na nowy adres URL, aby wyszukiwarki nie indeksowały tych stron podwójnie (patrz [SEO i kanoniczność |#SEO-and-Canonization]).


Routing dynamiczny z wywołaniami zwrotnymi .[#toc-dynamic-routing-with-callbacks]
---------------------------------------------------------------------------------

Dynamiczny routing z wywołaniami zwrotnymi umożliwia bezpośrednie przypisywanie funkcji (wywołań zwrotnych) do tras, które zostaną wykonane po odwiedzeniu określonej ścieżki. Ta elastyczna funkcja umożliwia szybkie i wydajne tworzenie różnych punktów końcowych dla aplikacji:

```php
$router->addRoute('test', function () {
echo 'You are at the /test address';
});
```

Można również zdefiniować parametry w masce, które będą automatycznie przekazywane do wywołania zwrotnego:

```php
$router->addRoute('<lang cs|en>', function (string $lang) {
echo match ($lang) {
'cs' => 'Welcome to the Czech version of our website!',
'en' => 'Welcome to the English version of our website!',
};
});
```


Moduły .[#toc-modules]
----------------------

Expand Down
23 changes: 23 additions & 0 deletions application/pt/routing.texy
Original file line number Diff line number Diff line change
Expand Up @@ -342,6 +342,29 @@ $router->addRoute('product/<id>', 'Product:detail');
Ao acessar a antiga URL, o apresentador redireciona automaticamente para a nova URL para que os mecanismos de busca não indexem essas páginas duas vezes (ver [SEO e canonização |#SEO and canonization]).


Roteamento dinâmico com retornos de chamada .[#toc-dynamic-routing-with-callbacks]
----------------------------------------------------------------------------------

O roteamento dinâmico com retornos de chamada permite atribuir diretamente funções (retornos de chamada) às rotas, que serão executadas quando o caminho especificado for visitado. Esse recurso flexível permite a criação rápida e eficiente de vários pontos de extremidade para o seu aplicativo:

```php
$router->addRoute('test', function () {
echo 'You are at the /test address';
});
```

Você também pode definir parâmetros na máscara, que serão automaticamente passados para o callback:

```php
$router->addRoute('<lang cs|en>', function (string $lang) {
echo match ($lang) {
'cs' => 'Welcome to the Czech version of our website!',
'en' => 'Welcome to the English version of our website!',
};
});
```


Módulos .[#toc-modules]
-----------------------

Expand Down
23 changes: 23 additions & 0 deletions application/ro/routing.texy
Original file line number Diff line number Diff line change
Expand Up @@ -342,6 +342,29 @@ $router->addRoute('product/<id>', 'Product:detail');
La accesarea vechiului URL, prezentatorul redirecționează automat către noul URL, astfel încât motoarele de căutare să nu indexeze aceste pagini de două ori (a se vedea [SEO și canonizarea |#SEO and canonization]).


Rutarea dinamică cu callback-uri .[#toc-dynamic-routing-with-callbacks]
-----------------------------------------------------------------------

Rutarea dinamică cu callback-uri vă permite să atribuiți direct funcții (callback-uri) la rute, care vor fi executate atunci când este vizitată calea specificată. Această funcție flexibilă vă permite să creați rapid și eficient diverse puncte finale pentru aplicația dumneavoastră:

```php
$router->addRoute('test', function () {
echo 'You are at the /test address';
});
```

De asemenea, puteți defini parametri în mască, care vor fi trecuți automat către callback-ul dumneavoastră:

```php
$router->addRoute('<lang cs|en>', function (string $lang) {
echo match ($lang) {
'cs' => 'Welcome to the Czech version of our website!',
'en' => 'Welcome to the English version of our website!',
};
});
```


Module .[#toc-modules]
----------------------

Expand Down
23 changes: 23 additions & 0 deletions application/ru/routing.texy
Original file line number Diff line number Diff line change
Expand Up @@ -342,6 +342,29 @@ $router->addRoute('product/<id>', 'Product:detail');
При обращении к старому URL-адресу презентер автоматически перенаправляет на новый URL-адрес, чтобы поисковые системы не индексировали эти страницы дважды (см. [SEO и канонизация|#seo-and-canonization]).


Динамическая маршрутизация с обратными вызовами .[#toc-dynamic-routing-with-callbacks]
--------------------------------------------------------------------------------------

Динамическая маршрутизация с обратными вызовами позволяет напрямую назначать маршрутам функции (обратные вызовы), которые будут выполняться при посещении указанного пути. Эта гибкая возможность позволяет быстро и эффективно создавать различные конечные точки для вашего приложения:

```php
$router->addRoute('test', function () {
echo 'You are at the /test address';
});
```

Вы также можете задать параметры в маске, которые будут автоматически передаваться в обратный вызов:

```php
$router->addRoute('<lang cs|en>', function (string $lang) {
echo match ($lang) {
'cs' => 'Welcome to the Czech version of our website!',
'en' => 'Welcome to the English version of our website!',
};
});
```


Модули .[#toc-modules]
----------------------

Expand Down
Loading