Can please someone help me with this peace of code, I am completely lost. I am using foreign program and I need to run function MainFunc() once with unlimited parameter amount. There are two parameter types: "input" and "output", therefore "input" is a function with two parameters. Functions "input" and "output" are implemented elsewhere and does not interest me.
$var->MainFunc()
->input(1,2)
->output(3)
->input(4,5)
->output(6)
->input(7,8)
->output(9)
I can hardcode defined parameters, but I want to take them from other source (DataBase) and there can be many groups (input and output within each group).
Can someone, please, explain me how does this PHP syntax construction works and how can I transform it to pass unlimited parameter amount?