I'm creating my own MVC framework with my own routes engine. When I call a page, my URL is like that : http://www.domain.com/lang/controller/method/
Everything is ok with this configuration but when I send parameters by POST, I want them in my function declaration.
For example :
$_POST => Array ( [login] => myLogin, [pwd] => myPassword)
for the function ConnectUser($login, $password).
My controller is a singleton. So, my function call is like that : \core\controller\UserController::getInstance()->ConnectUser($login, $password).
I generate my call in a string. When I do
$funcCall = $strCall . "::getInstance()->" . $_GET['action'] . "()";
forward_static_call_array($funcCall, $_POST);
I get this error :
forward_static_call_array() expects parameter 1 to be a valid callback,
class 'core\controller\UserController' does not have a method 'getInstance()->Connect()'
Do you have an idea on my problem?