Changeset 235

Show
Ignore:
Timestamp:
08/10/06 12:27:54 (2 years ago)
Author:
laurentj
Message:

zip: mise à jour du manifest. jController : documentation, intParam(), floatParam(), boolParam(). jCoordinator, jRequest, jLocale: documentation, utilisation des exceptions, nettoyage.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/build/manifests/jelix-lib.mn

    r223 r235  
    6464  jResponseRdf.class.php 
    6565  jResponseXml.class.php 
     66  jResponseZip.class.php 
    6667 
    6768cd lib/jelix/core/url 
     
    172173  jDatatype.class.php 
    173174  jCmdUtils.class.php 
     175  jZipCreator.class.php 
    174176 
    175177cd lib/json 
  • trunk/lib/jelix/core/jController.class.php

    r156 r235  
    44* @subpackage core 
    55* @version    $Id:$ 
    6 * @author     Laurent Jouanneau 
     6* @author      Laurent Jouanneau 
    77* @contributor Loic Mathaud 
    8 * @copyright  2001-2005 CopixTeam, 2005-2006 Laurent Jouanneau 
     8* @copyright  2005-2006 Laurent Jouanneau 
    99* @link        http://www.jelix.org 
    1010* @licence  http://www.gnu.org/licenses/lgpl.html GNU Lesser General Public Licence, see LICENCE file 
    1111* 
    12 * Classe orginellement issue du framework Copix 2.3dev20050901. http://www.copix.org (CopixActionGroup) 
    13 * Une partie du code est sous Copyright 2001-2005 CopixTeam (licence LGPL) 
    14 * Auteurs initiaux : Gerald Croes et Laurent Jouanneau 
    15 * Adapt�et am�or�pour Jelix par Laurent Jouanneau 
    1612*/ 
    1713 
     14/** 
     15 * interface for controllers used for RESTFull request/response 
     16 */ 
    1817interface jIRestController{ 
    1918    public function get(); 
     
    2322} 
    2423 
    25 class jController{ 
    2624 
     25/** 
     26 * class base for controllers 
     27 *  
     28 * A controller is used to implement one or many actions, one method for each action. 
     29 */ 
     30abstract class jController{ 
     31 
     32    /** 
     33     * parameters for plugins 
     34     * 
     35     * this array should contains all parameters needed by installed plugins for 
     36     * each action, see the documentation of each plugins to know this parameters. 
     37     * keys : name of an action or * for parameters to all action 
     38     * values : array that contains all plugin parameters 
     39     * @var array 
     40     */ 
    2741    public $pluginParams=array(); 
     42 
     43    /** 
     44     * the request object 
     45     * @var jRequest 
     46     */ 
    2847    protected $request; 
    2948 
    3049    /** 
    31    
    32     * @param 
    33     */ 
     50   
     51    * @param jRequest $request the current request object 
     52    */ 
    3453    function __construct ( $request){ 
    3554        $this->request = $request; 
     
    4665 
    4766    /** 
    48     * Gets the value of a request variable. If not defined, gets its default value. 
    49     * @param string $varName the name of the request variable 
    50     * @param mixed $varDefaultValue the default value of the request variable 
    51     * @return mixed the request variable value 
     67    * Gets the value of a request parameter. If not defined, gets its default value. 
     68    * @param string  $parName           the name of the request parameter 
     69    * @param mixed   $parDefaultValue   the default returned value if the parameter doesn't exists 
     70    * @param boolean $useDefaultIfEmpty true: says to return the default value the value is "" 
     71    * @return mixed the request parameter value 
    5272    */ 
    53     protected function param ($varName, $varDefaultValue=null, $useDefaultIfEmpty=false){ 
    54        return $this->request->getParam($varName, $varDefaultValue, $useDefaultIfEmpty); 
     73    protected function param ($parName, $parDefaultValue=null, $useDefaultIfEmpty=false){ 
     74       return $this->request->getParam($parName, $parDefaultValue, $useDefaultIfEmpty); 
    5575    } 
    5676 
     77    /** 
     78    * same as param(), but convert the value to an integer value. If it isn't 
     79    * a numerical value, return null. 
     80    * @param string  $parName           the name of the request parameter 
     81    * @param mixed   $parDefaultValue   the default returned value if the parameter doesn't exists 
     82    * @param boolean $useDefaultIfEmpty true: says to return the default value the value is "" 
     83    * @return integer the request parameter value 
     84    */ 
     85    protected function intParam ($parName, $parDefaultValue=null, $useDefaultIfEmpty=false){ 
     86       $value = $this->request->getParam($parName, $parDefaultValue, $useDefaultIfEmpty); 
     87       if(is_numeric($value))  
     88            return intval($value); 
     89       else 
     90            return null; 
     91    } 
     92 
     93    /** 
     94    * same as param(), but convert the value to a float value. If it isn't 
     95    * a numerical value, return null. 
     96    * @param string  $parName           the name of the request parameter 
     97    * @param mixed   $parDefaultValue   the default returned value if the parameter doesn't exists 
     98    * @param boolean $useDefaultIfEmpty true: says to return the default value the value is "" 
     99    * @return float the request parameter value 
     100    */ 
     101    protected function floatParam ($parName, $parDefaultValue=null, $useDefaultIfEmpty=false){ 
     102       $value = $this->request->getParam($parName, $parDefaultValue, $useDefaultIfEmpty); 
     103       if(is_numeric($value))  
     104            return floatval($value); 
     105       else 
     106            return null; 
     107    } 
     108 
     109    /** 
     110    * same as param(), but convert the value to a boolean value. If it isn't 
     111    * a numerical value, return null. 
     112    * @param string  $parName           the name of the request parameter 
     113    * @param mixed   $parDefaultValue   the default returned value if the parameter doesn't exists 
     114    * @param boolean $useDefaultIfEmpty true: says to return the default value the value is "" 
     115    * @return boolean the request parameter value 
     116    */ 
     117    protected function boolParam ($parName, $parDefaultValue=null, $useDefaultIfEmpty=false){ 
     118       $value = $this->request->getParam($parName, $parDefaultValue, $useDefaultIfEmpty); 
     119       if($value=="true" || $value == "1" || $value=="on" || $value=="yes")  
     120            return true; 
     121       elseif($value=="false" || $value == "0" || $value=="off" || $value=="no")  
     122            return false; 
     123       else 
     124            return null; 
     125    } 
     126 
     127    /** 
     128     * @return array all request parameters 
     129     */ 
     130    protected function params(){ return $this->request->params; } 
     131 
     132    /** 
     133     * get a response object. 
     134     * @param string $name the name of the response type (ex: "html") 
     135     * @param boolean $useOriginal true:don't use the response object redefined by the application 
     136     * @return jResponse the response object 
     137     */ 
    57138    protected function getResponse($name, $useOriginal=false){ 
    58139        return $this->request->getResponse($name, $useOriginal); 
    59140    } 
    60141 
    61     protected function params(){ return $this->request->params; } 
    62  
    63142} 
    64143?> 
  • trunk/lib/jelix/core/jCoordinator.class.php

    r231 r235  
    1111*/ 
    1212 
    13  
     13/** 
     14 * the main class of the jelix core 
     15 * 
     16 * this is the "chief orchestra" of the framework. It's goal is 
     17 * to load the configuration, to get the request parameters 
     18 * used to instancie the correspondant controllers and to run the right method. 
     19 */ 
    1420class jCoordinator { 
    1521 
    1622   /** 
    17     * liste des plugins utilis�    * @var  array 
     23    * plugin list 
     24    * @var  array 
    1825    */ 
    1926    public $plugins=array(); 
    2027 
    2128    /** 
    22      * Reponse courante 
     29     * current response object 
    2330     * @var jResponse 
    2431     */ 
     
    2633 
    2734    /** 
     35     * current request object 
    2836     * @var jRequest 
    2937     */ 
     
    3139 
    3240    /** 
    33      * @var jActionDesc 
     41     * the selector of the current action 
     42     * @var jSelectorAct 
    3443     */ 
    3544    public $action = null; 
    36     /** 
     45 
     46    /** 
     47     * the current module name 
    3748     * @var string 
    3849     */ 
    39     private $configFile; 
    40  
    41     /** 
    42      * @var string 
    43      */ 
    4450    public $moduleName; 
    45     /** 
     51 
     52    /** 
     53     * the current action name 
    4654     * @var string 
    4755     */ 
     
    6977        } 
    7078        // load configuration data 
    71         $this->configFile = $configFile; 
    7279        $gJConfig = jConfig::load($configFile); 
    7380 
     
    8491 
    8592    /** 
    86      * instanciation des plugins 
     93     * load the plugins and their configuration file 
    8794     */ 
    8895    private function _loadPlugins(){ 
     
    105112 
    106113    /** 
    107      * stocke un message d'erreur/warning/notice �rendre en compte par les r�nses 
    108      * @param  string $type  type d'erreur 'error', 'warning', 'notice' 
    109      * @param  integer $code  code d'erreur 
    110      * @param  string $message le message d'erreur 
    111      * @param  string $file  nom du fichier o�st produite l'erreur 
    112      * @param  integer $line  ligne o�st produite l'erreur 
    113      * @return boolean    true= arret immediat ordonn�false = on laisse le gestionnaire d'erreur agir en cons�ence 
     114     * Store an error/warning/notice message. Responses object should take care 
     115     * of the errorMessages properties to display them. 
     116     * @param  string $type  error type : 'error', 'warning', 'notice' 
     117     * @param  integer $code  error code 
     118     * @param  string $message error message 
     119     * @param  string $file    the file name where the error appear 
     120     * @param  integer $line  the line number where the error appear 
     121     * @return boolean    true= the process should stop now, false = the error manager do its job 
    114122     */ 
    115123    public function addErrorMsg($type, $code, $message, $file, $line){ 
     
    123131 
    124132    /** 
    125     * Fonction principale du coordinateur �ppeler dans le index.php pour d�rrer 
    126     * le traitement de l'action 
    127     * @param  jRequest  $request the request data 
     133    * main method : launch the execution of the action. 
     134    * 
     135    * This method should be called in a entry point. 
     136    * @param  jRequest  $request the request object 
    128137    */ 
    129138    public function process ($request){ 
     
    180189 
    181190        if($this->response == null){ 
    182             trigger_error(jLocale::get('jelix~errors.response.missing',$this->action->toString()), E_USER_ERROR); 
    183             return; 
     191            throw new jException('jelix~errors.response.missing',$this->action->toString()); 
    184192        } 
    185193 
     
    200208    } 
    201209 
     210    /** 
     211     * get the controller corresponding to the selector 
     212     * @param jSelectorAct $selector 
     213     */ 
    202214    private function getController($selector){ 
    203215 
     
    206218 
    207219        if(!file_exists($ctrlpath)){ 
    208             trigger_error(jLocale::get('jelix~errors.ad.controller.file.unknow',array($this->actionName,$ctrlpath)),E_USER_ERROR); 
    209             return; 
     220            throw new jException('jelix~errors.ad.controller.file.unknow',array($this->actionName,$ctrlpath)); 
    210221        } 
    211222        require_once($ctrlpath); 
    212223        if(!class_exists($class,false)){ 
    213             trigger_error(jLocale::get('jelix~errors.ad.controller.class.unknow',array($this->actionName,$class, $ctrlpath)),E_USER_ERROR); 
    214             return; 
     224            throw new jException('jelix~errors.ad.controller.class.unknow',array($this->actionName,$class, $ctrlpath)); 
    215225        } 
    216226 
     
    219229            $method = $selector->method = strtolower($_SERVER['REQUEST_METHOD']); 
    220230        }elseif(!method_exists($ctrl,$selector->method)){ 
    221             trigger_error(jLocale::get('jelix~errors.ad.controller.method.unknow',array($this->actionName,$selector->method, $class, $ctrlpath)),E_USER_ERROR); 
    222             return; 
     231            throw new jException('jelix~errors.ad.controller.method.unknow',array($this->actionName,$selector->method, $class, $ctrlpath)); 
    223232        } 
    224233        return $ctrl; 
     
    227236 
    228237    /** 
    229      * 
    230      * @param string $name 
     238     * instancy a response object corresponding to the default response type 
     239     * of the current resquest 
     240     * @return mixed  error string or false 
    231241     */ 
    232242    public function initDefaultResponseOfRequest(){ 
     
    253263    } 
    254264 
    255  
    256     /* 
    257     * permet �n traitement exterieur (page, zone) de recuperer un element de configuration d'un plugin 
    258     * @param string   $plugin_name   nom du plugin 
    259     * @param string   $plugin_parameter_name   nom de la propriete de l'objet de configuration du plugin 
    260     */ 
    261     /*function getPluginConf ($pluginName , $plugin_parameter_name){ 
    262         $pluginName = strtolower ($pluginName); 
    263         if (isset ($this->plugins[$pluginName])&& isset($this->plugins[$pluginName]->config->$plugin_parameter_name) ) { 
    264                return $this->plugins[$pluginName]->config->$plugin_parameter_name; 
    265         } 
    266         return null; 
    267     }*/ 
    268  
    269265    /** 
    270266    * gets a given plugin if registered 
    271     * @param string   $plugin_name   nom du plugin 
    272     * @param boolean  $required  if the plugin is required or not. If true, will trigger a fatal_error if the plugin is not registered. 
     267    * @param string   $pluginName   the name of the plugin 
     268    * @param boolean  $required  says if the plugin is required or not. If true, will generate an exception if the plugin is not registered. 
     269    * @return jIPlugin 
    273270    */ 
    274271    function getPlugin ($pluginName, $required = true){ 
     
    278275        }else{ 
    279276            if ($required){ 
    280                 trigger_error (jLocale::get ('jelix~errors.plugin.unregister', $pluginName), E_USER_ERROR); 
     277                throw new jException('jelix~errors.plugin.unregister', $pluginName); 
    281278            } 
    282279            $plugin = null; 
     
    297294    * Says if the given module $name is enabled 
    298295    * @param string $moduleName 
    299     * @return boolean true : plugin is ok 
     296    * @return boolean true : module is ok 
    300297    */ 
    301298    public function isModuleEnabled ($moduleName){ 
  • trunk/lib/jelix/core/jLocale.class.php

    r231 r235  
    1818 
    1919 
    20 /* 
    21 * Contient un ensemble de chaines concernant une locale donn� 
    22 * et pour tous les charsets 
     20/** 
     21* a bundle content all readed properties ina a given langage, and for all charsets 
    2322*/ 
    2423class jBundle { 
     
    3130    /** 
    3231    * constructor 
    33     * @param jSelector   $file 
    34     * @param string      $locale 
     32    * @param jSelector   $file selector of a properties file 
     33    * @param string      $locale    the code lang 
    3534    */ 
    3635    function __construct ($file, $locale){ 
     
    140139                        }else{ 
    141140                            if($match[4] != '' && substr($match[4],0,1) != '#'){ 
    142                                 trigger_error('Syntaxe error in file properties '.$fichier.' line '.$linenumber, E_USER_NOTICE); 
     141                                throw new Exception('Syntaxe error in file properties '.$fichier.' line '.$linenumber); 
    143142                            } 
    144143                        } 
    145144                    }else { 
    146                         trigger_error('Syntaxe error in file properties '.$fichier.' line '.$linenumber, E_USER_NOTICE); 
     145                        throw new Exception('Syntaxe error in file properties '.$fichier.' line '.$linenumber); 
    147146                    } 
    148147                } 
     
    150149            fclose ($f); 
    151150        }else{ 
    152             trigger_error ('Cannot load the resource '.$fichier, E_USER_ERROR); 
     151            throw new Exception('Cannot load the resource '.$fichier); 
    153152        } 
    154153    } 
     
    156155 
    157156 
    158  
     157/** 
     158 * static class to get a localized string 
     159 */ 
    159160class jLocale { 
    160161    static $bundles = array(); 
    161162 
    162163    /** 
    163     * gets the current lang 
    164     */ 
    165     function getCurrentLang(){ 
     164     * gets the current lang 
     165     * @return string 
     166     */ 
     167    static function getCurrentLang(){ 
    166168        $s=$GLOBALS['gJConfig']->defaultLocale; 
    167169        return substr($s,0, strpos($s,'_')); 
    168170    } 
    169171    /** 
    170     * gets the current country. 
    171     */ 
    172     function getCurrentCountry (){ 
     172     * gets the current country. 
     173     * @return string 
     174     */ 
     175    static function getCurrentCountry (){ 
    173176        $s=$GLOBALS['gJConfig']->defaultLocale; 
    174177        return substr($s,strpos($s,'_')+1); 
     
    179182    *   if it can't get the correct language, it will try to gets the string 
    180183    *   from the default language. 
    181     *   if both fails, it will raise a fatal_error. 
     184    *   if both fails, it will raise an exception. 
     185    * @param string $key the key of the localized string 
     186    * @param array $args arguments to apply to the localized string with sprintf 
     187    * @param string $locale  the lang code. if null, use the default language 
     188    * @param string $charset the charset code. if null, use the default charset 
     189    * @return string the localized string 
    182190    */ 
    183191    static function get ($key, $args=null, $locale=null, $charset=null) { 
     
    201209        }catch(jExceptionSelector $e){ 
    202210            if($key == 'jelix~errors.locale.key.selector.invalid'){ 
    203                 return '(200)The given locale key "'.$args[0].'" is invalid  (for module '.$args[1].', charset '.$args[2].', lang '.$args[3].') (internal error ?)'
     211                throw new Exception('(200)The given locale key "'.$args[0].'" is invalid  (for module '.$args[1].', charset '.$args[2].', lang '.$args[3].') (internal error ?)')
    204212            }else{ 
    205                 trigger_error (jLocale::get ('jelix~errors.locale.key.selector.invalid', array($key,$file->module, $charset, $locale)), E_USER_ERROR); 
    206                 return '(200)Invalid Local Key "'.$args[0].'"'; // au cas o�trigger error n'�it pas trapp�           
     213                throw new jException('jelix~errors.locale.key.selector.invalid', array($key,$file->module, $charset, $locale)); 
     214           
    207215        } 
    208216 
     
    219227            if ($locale    == $gJConfig->defaultLocale){ 
    220228                if ($key == 'jelix~errors.locale.key.unknow'){ 
    221                     $msg = 'Can\'t find message key (which should actually be THIS message): '.$key
     229                    throw new Exception('(210)The given locale key "'.$args[0].'" from module "'.$args[1].'" does not exists in the default lang for the '.$args[2].' charset (and the jelix~errors.locale.key.unknow key cannot be found too)')
    222230                }else{ 
    223                     $msg = jLocale::get ('jelix~errors.locale.key.unknow',array($key,$file->module, $charset, $locale)); 
     231                    throw new jException('jelix~errors.locale.key.unknow',array($key,$file->module, $charset, $locale)); 
    224232                } 
    225                 trigger_error ($msg, E_USER_ERROR); 
    226                 return null; 
    227233            } 
    228234            return jLocale::get ($key, $args, $gJConfig->defaultLocale); 
  • trunk/lib/jelix/core/jRequest.class.php

    r190 r235  
    1010* @licence    GNU Lesser General Public Licence see LICENCE file or http://www.gnu.org/licenses/lgpl.html 
    1111* 
    12 * Some parts of this file are took from Copix Framework v2.3dev20050901, CopixCoordinator.class.php, 
    13 * copyrighted by CopixTeam and released under GNU Lesser General Public Licence 
    14 * author : Gerald Croes, Laurent Jouanneau 
    15 * http://www.copix.org 
    1612*/ 
    1713 
    1814 
    19  
     15/** 
     16 * base class for object which retrieve all parameters of an http request. The 
     17 * process depends on the type of request (ex: xmlrpc..) 
     18 *  
     19 * @copyright line codes which set the url_* properties are took from Copix Framework v2.3dev20050901, CopixCoordinator.class.php, 
     20 * copyrighted by CopixTeam and released under GNU Lesser General Public Licence 
     21 * author : Gerald Croes, Laurent Jouanneau 
     22 * http://www.copix.org 
     23 */ 
    2024abstract class jRequest { 
    2125 
    2226   /** 
    23     * liste des param�es en entr�    * @var array 
     27    * request parameters 
     28    * could set from $_GET, $_POST, or from data processing of $HTTP_RAW_POST_DATA 
     29    * @var array 
    2430    */ 
    2531    public $params; 
    2632 
     33    /** 
     34     * the request type code 
     35     * @var string 
     36     */ 
    2737    public $type; 
    2838 
     39    /** 
     40     * the type of the default response 
     41     * @var string 
     42     */ 
    2943    public $defaultResponseType = ''; 
    3044 
    31     /*  param�es de l'url courante */ 
     45    /** 
     46     * the path to the entry point in the url 
     47     * @var string 
     48     */ 
    3249    public $url_script_path; 
     50 
     51    /** 
     52     * the name of the entry point 
     53     * @var string 
     54     */ 
    3355    public $url_script_name; 
     56 
     57    /** 
     58     * the pathinfo part of the url 
     59     * @var string 
     60     */ 
    3461    public $url_path_info; 
    3562 
     63 
     64    /** 
     65     *  
     66     * @var jUrl 
     67     */ 
    3668    public $url; 
    3769 
    3870    function __construct(){  } 
    3971 
    40     function init(){ 
     72    /** 
     73     * initialize the request : analyse of http request etc.. 
     74     */ 
     75    public function init(){ 
    4176        $this->_initUrlDatas(); 
    4277        $this->_initParams(); 
    4378    } 
    4479 
    45  
     80    /** 
     81     * analyse the http request and set the params property 
     82     */ 
    4683    abstract protected function _initParams(); 
    4784 
     85    /** 
     86     * inits the url_* properties 
     87     */ 
    4888    protected function _initUrlDatas(){ 
    4989        global $gJConfig; 
     
    74114    } 
    75115 
     116    /** 
     117    * Gets the value of a request parameter. If not defined, gets its default value. 
     118    * @param string  $name           the name of the request parameter 
     119    * @param mixed   $defaultValue   the default returned value if the parameter doesn't exists 
     120    * @param boolean $useDefaultIfEmpty true: says to return the default value the value is "" 
     121    * @return mixed the request parameter value 
     122    */ 
    76123    public function getParam($name, $defaultValue=null, $useDefaultIfEmpty=false){ 
    77124 
     
    88135 
    89136    /** 
    90      * indique la liste des classes de reponses autoris� pour le type de requete 
    91      * si renvoi false : autorise n'importe quoi 
    92      * @see jActionDesc::getResponse 
     137     * return a list of class name of allowed response corresponding to the request 
     138     * @return array the list, or false which means everything 
     139     * @see jRequest::getResponse() 
    93140     */ 
    94141    public function allowedResponses(){ return false;} 
    95142 
     143    /** 
     144     * @param string $respclass the name of a response class 
     145     */ 
    96146    public function isAllowedResponse($respclass){ 
    97147        if($ar=$this->allowedResponses()){ 
     
    101151    } 
    102152 
     153    /** 
     154     * get a response object. 
     155     * @param string $name the name of the response type (ex: "html") 
     156     * @param boolean $useOriginal true:don't use the response object redefined by the application 
     157     * @return jResponse the response object 
     158     */ 
    103159    public function getResponse($type='', $useOriginal = false){ 
    104160        global $gJCoord, $gJConfig; 
     
    109165        if($useOriginal){ 
    110166            if(!isset($gJConfig->_coreResponses[$type])){ 
    111                trigger_error(jLocale::get('jelix~errors.ad.response.type.unknow',array($gJCoord->action->resource,$type,$gJCoord->action->getPath())),E_USER_ERROR); 
    112                return null; 
     167               throw new jException('jelix~errors.ad.response.type.unknow',array($gJCoord->action->resource,$type,$gJCoord->action->getPath())); 
    113168            } 
    114169            $respclass = $gJConfig->_coreResponses[$type]; 
    115170        }else{ 
    116171            if(!isset($gJConfig->responses[$type])){ 
    117                trigger_error(jLocale::get('jelix~errors.ad.response.type.unknow',array($gJCoord->action->resource,$type,$gJCoord->action->getPath())),E_USER_ERROR); 
    118                return null; 
     172               throw new jException('jelix~errors.ad.response.type.unknow',array($gJCoord->action->resource,$type,$gJCoord->action->getPath())); 
    119173            } 
    120174            $respclass = $gJConfig->responses[$type]; 
     
    125179           require_once ($path); 
    126180        }else{ 
    127            trigger_error(jLocale::get('jelix~errors.ad.response.not.loaded',array($gJCoord->action->resource,$type,$gJCoord->action->getPath())),E_USER_ERROR); 
    128            return null; 
     181           throw new jException('jelix~errors.ad.response.not.loaded',array($gJCoord->action->resource,$type,$gJCoord->action->getPath())); 
    129182        } 
    130183 
    131184        if(!$this->isAllowedResponse($respclass)){ 
    132            trigger_error(jLocale::get('jelix~errors.ad.response.type.notallowed',array($gJCoord->action->resource,$type,$gJCoord->action->getPath())),E_USER_ERROR); 
    133            return null; 
     185           throw new jException('jelix~errors.ad.response.type.notallowed',array($gJCoord->action->resource,$type,$gJCoord->action->getPath())); 
    134186        } 
    135187 
Download in other formats: Unified Diff Zip Archive