Permalink
Browse files

Ticket #1448 - allow to implements methods in controllers with __call

  • Loading branch information...
0flav authored and laurentj committed Mar 27, 2012
1 parent 835d48c commit a06d0595890442a23def4b0c4867f4b65c5a1f36
Showing with 6 additions and 3 deletions.
  1. +3 −0 lib/jelix/CREDITS
  2. +3 −3 lib/jelix/core/jCoordinator.class.php
View
@@ -84,6 +84,9 @@ Gildas Givaja (aka Giviz)
- testor, bug fixes
- bug fix in jXmlRpc.class.php (#192)
Flav
- allow to implements methods in controllers with __call (#1448)
Frédéric Guillot (aka fg)
- patch for multiple authentification in a same session (#207)
- bug fixes in support of XML-RPC request and response
@@ -3,11 +3,11 @@
* @package jelix
* @subpackage core
* @author Laurent Jouanneau
* @contributor Thibault Piront (nuKs), Julien Issler, Dominique Papin
* @contributor Thibault Piront (nuKs), Julien Issler, Dominique Papin, Flav
* @copyright 2005-2012 laurent Jouanneau
* @copyright 2007 Thibault Piront
* @copyright 2008 Julien Issler
* @copyright 2008-2010 Dominique Papin
* @copyright 2008-2010 Dominique Papin, 2012 Flav
* @link http://www.jelix.org
* @licence GNU Lesser General Public Licence see LICENCE file or http://www.gnu.org/licenses/lgpl.html
*/
@@ -229,7 +229,7 @@ private function getController($selector){
$ctrl = new $class($this->request);
if($ctrl instanceof jIRestController){
$method = $selector->method = strtolower($_SERVER['REQUEST_METHOD']);
}elseif(!method_exists($ctrl, $selector->method)){
}elseif(!is_callable(array($ctrl, $selector->method))){
throw new jException('jelix~errors.ad.controller.method.unknown',array($this->actionName, $selector->method, $class, $ctrlpath));
}
return $ctrl;

0 comments on commit a06d059

Please sign in to comment.