I
I
Ivan Petrov2018-03-11 00:43:16
PHP
Ivan Petrov, 2018-03-11 00:43:16

What does "dispatch" mean in php routers?

What does "dispatch" mean in php routers?
This method probably exists in every router.
Why dispatch ? I don’t understand the meaning, because the router does not send anything, but processes the received url, looks for matches in previously saved routes.

Answer the question

In order to leave comments, you need to log in

2 answer(s)
S
Stalker_RED, 2018-03-11
@Stalker_RED

Often a word has more than one meaning, that's why.
dispatch: варианты перевода
имя существительное
отправка
dispatch, shipment, forwarding, despatch
отправление
administration, departure, dispatch, transmission, despatch, start
отсылка
reference, dispatch, remittance, despatch
депеша
dispatch, despatch, message
корреспонденция
correspondence, dispatch, despatch
быстрота
rapidity, speed, swiftness, quickness, rate, dispatch
дипломатическая депеша
dispatch, despatch
казнь
execution, dispatch, ax, decimation, despatch, axe
убийство
murder, killing, assassination, kill, homicide, dispatch
быстрое выполнение
dispatch, despatch
официальное донесение
dispatch, despatch
предание смерти
despatch, dispatch
глагол
посылать
send, dispatch, transmit, forward, despatch, refer
высылать
expel, deport, send out, banish, dispatch, proscribe
быстро выполнять
expedite, dispatch, despatch
отправлять по назначению
dispatch, despatch
отсылать
send, refer, send off, dispatch, relegate, bundle
экспедировать
dispatch, despatch
быстро проглотить
despatch, dispatch
отправлять на тот свет
despatch, dispatch
убивать
kill, murder, slay, slaughter, assassinate, dispatch
https://translate.google.com/?source=gtx_m#en/ru/d...


And if you look closely at the word dispatcher and router , you can find something in common with them.
He compares something there and looks for matches, and then what? Calls the corresponding module, and passes parameters to it, right?

M
Maksim Fedorov, 2018-03-11
@Maksclub

  • Here is a description for example of the dispatch() method in FastRouter https://github.com/nikic/FastRoute#dispatching-a-uri
    In a very general way, after the found route from the collection, you get attributes, available methods (GET, POST ...) and a handler with the necessary actions (for example, an anonymous callback with an action or a controller method callback)
    I could be wrong about something, I advise you to watch the video (especially the moment of separating the collection of routes from routing, there is no such method, but everything is explained in other ways):
    https://www.youtube.com/watch?v=FkQ0IXnMxfA&index=...

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question