Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- function bind($controller, $action) {
- /*
- * returns a closure that loads the controller in
- * question and executes the action.
- */
- return function($params) use ($controller, $action) {
- include $controller . '.php';
- return call_user_func_array($controller . '::' . $action, $params);
- }
- }
- ?>
Add Comment
Please, Sign In to add comment