Skip to content

Commit a373005

Browse files
author
Kevin Wood-Friend
committed
Abstract out the processes of firing a controller method within _remap() to an separate method
1 parent 7d5d372 commit a373005

File tree

1 file changed

+14
-1
lines changed

1 file changed

+14
-1
lines changed

application/libraries/REST_Controller.php

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -313,7 +313,20 @@ public function _remap($object_called, $arguments)
313313
}
314314

315315
// And...... GO!
316-
call_user_func_array(array($this, $controller_method), $arguments);
316+
$this->_fire_method(array($this, $controller_method), $arguments);
317+
}
318+
319+
/**
320+
* Fire Method
321+
*
322+
* Fires the designated controller method with the given arguments.
323+
*
324+
* @param array $method The controller method to fire
325+
* @param array $args The arguments to pass to the controller method
326+
*/
327+
protected function _fire_method($method, $args)
328+
{
329+
call_user_func_array($method, $args);
317330
}
318331

319332
/**

0 commit comments

Comments
 (0)