Hooks ... exactly what they are

I saw hooks in the Kohana PHP structure, and they work as some kind of callback function called by a specific event (Kohana events, which are a kind of method overload).

I saw hooks in Wordpress, and I don’t know what it is and how to use it (just saw them yesterday).

I am looking for events in "unstructured" php, I can not find them.

Are interceptors used only in an event-based environment? What are they anyway (in general, not only in PHP)? Why are they good, if not in an event-based environment.

+3
source share
3 answers

, , ; , - , -, , . PHP , , /. , . , fooobar.com/questions/1735883/....

, PHP , , , . , , . ( , , ..)

, , WordPress, , , , CSS, CSS_DEFINITION_EVENT ( , WordPress, CSS HTML). . PHP (, ) , PHP ( PHP -), , , , PHP () .

+3

PHP , . (, ), , - . 404.

+1

Source: https://habr.com/ru/post/1735882/


All Articles