0
I have the following function
function about_about(){
$this->render();
}
However, I have another 100 pages, which will only have the render(), how can I do a function just to save code and time? Where I set the pages that will be displayed and give the render(), remembering that about_about, in this example, is the name of the page that comes by url, in this case, the name of the method.
Do you want to call the same method by different URL? Like creating a generic controller?
– Allan Andrade
Man, I don’t know about PHP.. but there is no possibility of you creating a class, which has this method that is common to all and make all other classes inherit the first no?
– Rubico
That’s right Alan, I want to call several methods with the same ending... because they will all render, e.g.: Function x(){ render(); } Function y(){ render(); }...
– Sr. André Baill