C
Chris G
Guest
I'm trying to create a page generation class which has the functions to build the current page, like:
class page {
**function head($doctype, $title, $meta, $styles, $scripts) {
****// build the <head>
**}
**function body($header, $main, $sub) {
****// build the <body>
**}
}
$generate = new page();
So I can call the class this way:
$generate->body([variables]);
My question is: How can I make it so the function called within the class can handle a function, or multiple pipe separated functions within it?
Example:
$generate->body(location([variables]), featured([variables]) | local([variables]), form(login-signup]));
Is this even possible?
Forgive me if I'm not explaining this well enough, and thank you in advance for your help!
class page {
**function head($doctype, $title, $meta, $styles, $scripts) {
****// build the <head>
**}
**function body($header, $main, $sub) {
****// build the <body>
**}
}
$generate = new page();
So I can call the class this way:
$generate->body([variables]);
My question is: How can I make it so the function called within the class can handle a function, or multiple pipe separated functions within it?
Example:
$generate->body(location([variables]), featured([variables]) | local([variables]), form(login-signup]));
Is this even possible?
Forgive me if I'm not explaining this well enough, and thank you in advance for your help!