Changeset 248
- Timestamp:
- 09/04/06 01:01:42 (2 years ago)
- Files:
-
- trunk/lib/jelix/auth/jAuth.class.php (modified) (3 diffs)
- trunk/lib/jelix/auth/jAuthDriverDb.class.php (modified) (1 diff)
- trunk/lib/jelix/auth/jAuthUser.class.php (modified) (1 diff)
- trunk/lib/jelix/controllers/jControllerCmdLine.class.php (modified) (4 diffs)
- trunk/lib/jelix/core/jConfig.class.php (modified) (2 diffs)
- trunk/lib/jelix/core/jConfigCompiler.class.php (modified) (8 diffs)
- trunk/lib/jelix/core/jContext.class.php (modified) (1 diff)
- trunk/lib/jelix/core/jController.class.php (modified) (5 diffs)
- trunk/lib/jelix/core/jCoordinator.class.php (modified) (1 diff)
- trunk/lib/jelix/core/jErrorHandler.lib.php (modified) (1 diff)
- trunk/lib/jelix/core/jException.lib.php (modified) (2 diffs)
- trunk/lib/jelix/core/jIncluder.class.php (modified) (6 diffs)
- trunk/lib/jelix/core/jIPlugin.iface.php (modified) (2 diffs)
- trunk/lib/jelix/core/jLocale.class.php (modified) (4 diffs)
- trunk/lib/jelix/core/jRequest.class.php (modified) (1 diff)
- trunk/lib/jelix/core/jResponse.class.php (modified) (4 diffs)
- trunk/lib/jelix/core/request/jClassicRequest.class.php (modified) (2 diffs)
- trunk/lib/jelix/core/request/jCmdLineRequest.class.php (modified) (1 diff)
- trunk/lib/jelix/core/request/jJsonRpcRequest.class.php (modified) (2 diffs)
- trunk/lib/jelix/core/request/jRdfRequest.class.php (modified) (1 diff)
- trunk/lib/jelix/core/request/jXmlRpcRequest.class.php (modified) (1 diff)
- trunk/lib/jelix/core/request/jXulRequest.class.php (modified) (1 diff)
- trunk/lib/jelix/core/response/jResponseBinary.class.php (modified) (1 diff)
- trunk/lib/jelix/core/response/jResponseHtml.class.php (modified) (2 diffs)
- trunk/lib/jelix/core/response/jResponseJsonrpc.class.php (modified) (1 diff)
- trunk/lib/jelix/core/response/jResponseRdf.class.php (modified) (1 diff)
- trunk/lib/jelix/core/response/jResponseRedirect.class.php (modified) (1 diff)
- trunk/lib/jelix/core/response/jResponseRedirectUrl.class.php (modified) (1 diff)
- trunk/lib/jelix/core/response/jResponseText.class.php (modified) (1 diff)
- trunk/lib/jelix/core/response/jResponseXml.class.php (modified) (3 diffs)
- trunk/lib/jelix/core/response/jResponseXmlrpc.class.php (modified) (1 diff)
- trunk/lib/jelix/core/response/jResponseXul.class.php (modified) (1 diff)
- trunk/lib/jelix/core/response/jResponseXulDialog.class.php (modified) (1 diff)
- trunk/lib/jelix/core/response/jResponseXulOverlay.class.php (modified) (1 diff)
- trunk/lib/jelix/core/response/jResponseXulPage.class.php (modified) (1 diff)
- trunk/lib/jelix/core/response/jResponseZip.class.php (modified) (1 diff)
- trunk/lib/jelix/core/url/jUrl.class.php (modified) (4 diffs)
- trunk/lib/jelix/core/url/jUrlCompiler.significant.class.php (modified) (1 diff)
- trunk/lib/jelix/core/url/jUrlEngine.significant.class.php (modified) (4 diffs)
- trunk/lib/jelix/core/url/jUrlEngine.simple.class.php (modified) (1 diff)
- trunk/lib/jelix/dao/jDao.class.php (modified) (3 diffs)
- trunk/lib/jelix/dao/jDaoBase.class.php (modified) (2 diffs)
- trunk/lib/jelix/dao/jDaoCompiler.class.php (modified) (1 diff)
- trunk/lib/jelix/dao/jDaoConditions.class.php (modified) (2 diffs)
- trunk/lib/jelix/dao/jDaoGenerator.class.php (modified) (1 diff)
- trunk/lib/jelix/dao/jDaoParser.class.php (modified) (5 diffs)
- trunk/lib/jelix/db/drivers/mysql/jDbConnection.mysql.class.php (modified) (1 diff)
- trunk/lib/jelix/db/drivers/mysql/jDbResultSet.mysql.class.php (modified) (1 diff)
- trunk/lib/jelix/db/drivers/mysql/jDbTools.mysql.class.php (modified) (1 diff)
- trunk/lib/jelix/db/drivers/postgresql/jDbConnection.postgresql.class.php (modified) (9 diffs)
- trunk/lib/jelix/db/drivers/postgresql/jDbResultSet.postgresql.class.php (modified) (3 diffs)
- trunk/lib/jelix/db/drivers/postgresql/jDbTools.postgresql.class.php (modified) (1 diff)
- trunk/lib/jelix/db/drivers/sqlite/jDbConnection.sqlite.class.php (modified) (4 diffs)
- trunk/lib/jelix/db/drivers/sqlite/jDbResultSet.sqlite.class.php (modified) (1 diff)
- trunk/lib/jelix/db/drivers/sqlite/jDbTools.sqlite.class.php (modified) (5 diffs)
- trunk/lib/jelix/db/jDb.class.php (modified) (2 diffs)
- trunk/lib/jelix/db/jDbConnection.class.php (modified) (2 diffs)
- trunk/lib/jelix/db/jDbPDOConnection.class.php (modified) (4 diffs)
- trunk/lib/jelix/db/jDbResultSet.class.php (modified) (1 diff)
- trunk/lib/jelix/db/jDbTools.class.php (modified) (2 diffs)
- trunk/lib/jelix/db/jDbWidget.class.php (modified) (1 diff)
- trunk/lib/jelix/events/jEvent.class.php (modified) (2 diffs)
- trunk/lib/jelix/events/jEventCompiler.class.php (modified) (1 diff)
- trunk/lib/jelix/events/jEventListener.class.php (modified) (1 diff)
- trunk/lib/jelix/events/jEventListenerFactory.class.php (modified) (3 diffs)
- trunk/lib/jelix/forms/jForms.class.php (modified) (1 diff)
- trunk/lib/jelix/forms/jFormsBase.class.php (modified) (1 diff)
- trunk/lib/jelix/forms/jFormsCompiler.class.php (modified) (2 diffs)
- trunk/lib/jelix/forms/jFormsControl.class.php (modified) (4 diffs)
- trunk/lib/jelix/forms/jFormsDataContainer.class.php (modified) (1 diff)
- trunk/lib/jelix/forms/jFormsDatasource.class.php (modified) (3 diffs)
- trunk/lib/jelix/init.php (modified) (4 diffs)
- trunk/lib/jelix/tpl/jTpl.class.php (modified) (1 diff)
- trunk/lib/jelix/tpl/jTplCompiler.class.php (modified) (1 diff)
- trunk/lib/jelix/tpl/plugins/common/block.ifacl.php (modified) (1 diff)
- trunk/lib/jelix/tpl/plugins/common/block.ifnotacl.php (modified) (1 diff)
- trunk/lib/jelix/tpl/plugins/common/block.ifuserconnected.php (modified) (1 diff)
- trunk/lib/jelix/tpl/plugins/common/block.ifusernotconnected.php (modified) (1 diff)
- trunk/lib/jelix/utils/jClasses.class.php (modified) (4 diffs)
- trunk/lib/jelix/utils/jCmdUtils.class.php (modified) (4 diffs)
- trunk/lib/jelix/utils/jDatatype.class.php (modified) (7 diffs)
- trunk/lib/jelix/utils/jDateTime.class.php (modified) (2 diffs)
- trunk/lib/jelix/utils/jFile.class.php (modified) (1 diff)
- trunk/lib/jelix/utils/jJsonRpc.class.php (modified) (4 diffs)
- trunk/lib/jelix/utils/jLog.class.php (modified) (1 diff)
- trunk/lib/jelix/utils/jXmlRpc.class.php (modified) (4 diffs)
- trunk/lib/jelix/utils/jZipCreator.class.php (modified) (1 diff)
- trunk/lib/jelix/utils/jZone.class.php (modified) (1 diff)
- trunk/Makefile (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/lib/jelix/auth/jAuth.class.php
r194 r248 17 17 18 18 /** 19 * interface pour les classes de drivers d'authentification 19 * interface for auth drivers 20 * @package jelix 21 * @subpackage auth 20 22 */ 21 22 23 interface jIAuthDriver { 23 24 /** 25 * constructor 26 * @param array $params driver parameters, written in the ini file of the auth plugin 27 */ 24 28 function __construct($params); 29 30 /** 31 * creates a new user object, with some first datas.. 32 * @param string $login the user login 33 * @param string $password the user password 34 * @return jAuthUser|object the returned object depends on the driver 35 */ 25 36 public function createUser($login, $password); 37 38 /** 39 * store a new user. 40 * 41 * should be call after a call of createUser and after settinfg some of its properties... 42 * @param jAuthUser|object $user the user data container 43 */ 26 44 public function saveNewUser($user); 45 46 /** 47 * Erase user datas of the user $login 48 * @param string $login the login of the user to remove 49 */ 27 50 public function removeUser($login); 51 52 /** 53 * save updated datas of a user 54 * warning : should not save the password ! 55 * @param jAuthUser|object $user the user data container 56 */ 28 57 public function updateUser($user); 58 59 /** 60 * return user data corresponding to the given login 61 * @param string $login the login of the user 62 * @return jAuthUser|object the user data container 63 */ 29 64 public function getUser($login); 65 66 /** 67 * construct the user list 68 * @param string $pattern '' for all users 69 * @return array array of jAuthUser|object 70 */ 30 71 public function getUserList($pattern); 72 73 /** 74 * change a user password 75 * 76 * @param string $login the login of the user 77 * @param string $newpassword 78 */ 31 79 public function changePassword($login, $newpassword); 80 81 /** 82 * verify that the password correspond to the login 83 * @param string $login the login of the user 84 * @param string $password the password to test 85 * @return boolean 86 */ 32 87 public function verifyPassword($login, $password); 33 88 } … … 36 91 37 92 /** 38 * This is the main class for authentification process 39 */ 93 * This is the main class for authentification process 94 * @package jelix 95 * @subpackage auth 96 */ 40 97 class jAuth { 41 98 … … 111 168 } 112 169 170 /** 171 * 172 */ 113 173 public static function createUser($login,$password){ 114 174 $dr = self::_getDriver(); trunk/lib/jelix/auth/jAuthDriverDb.class.php
r194 r248 19 19 /** 20 20 * driver base de donn�pour l'authentification 21 * @package jelix 22 * @subpackage auth 21 23 */ 22 24 class jAuthDriverDb implements jIAuthDriver { trunk/lib/jelix/auth/jAuthUser.class.php
r155 r248 10 10 */ 11 11 12 // pas de m�ode pour cet objet, car le user peut ne pas etre 13 // une instance de jAuthUser, tout d�nd du driver.. 12 /** 13 * default object to represent a user 14 * 15 * this is only a data container. In fact, auth drivers can provide 16 * other object to embed user data. 17 * @package jelix 18 * @subpackage auth 19 */ 14 20 class jAuthUser { 15 21 public $login = ''; trunk/lib/jelix/controllers/jControllerCmdLine.class.php
r156 r248 12 12 */ 13 13 14 /** 15 * 16 * @package jelix 17 * @subpackage controllers 18 */ 14 19 class jControllerCmdLine extends jController { 15 20 16 21 protected $_options; 17 22 protected $_parameters; 18 23 19 24 protected $allowed_options; 20 25 protected $allowed_parameters; … … 22 27 /** 23 28 * 24 * @param 29 * @param jRequest $request 25 30 */ 26 31 function __construct ($request){ … … 31 36 $action = new jSelectorAct($this->request->params['action']); 32 37 list($this->_options,$this->_parameters) = jCmdUtils::getOptionsAndParams($params,$this->allowed_options[$action->method] , $this->allowed_parameters[$action->method]); 33 38 34 39 } 35 40 … … 41 46 } 42 47 } 43 48 44 49 protected function option($name) { 45 50 if (isset($this->_options[$name])) { trunk/lib/jelix/core/jConfig.class.php
r191 r248 11 11 */ 12 12 13 13 /** 14 * static class which loads the configuration 15 * @package jelix 16 * @subpackage core 17 */ 14 18 class jConfig { 15 19 16 20 /** 21 * this is a static class, so private constructor 22 */ 17 23 private function __construct (){ } 18 24 19 25 /** 20 * lecture de la configuration du framework 26 * load and read the configuration of the application 27 * The combination of all configuration files (the given file 28 * and the defaultconfig.ini.php) is stored 29 * in a single temporary file. So it calls the jConfigCompiler 30 * class if needed 31 * @param string $configFile the config file name 32 * @return object it contains all configuration options 33 * @see jConfigCompiler 21 34 */ 22 23 35 static public function load($configFile){ 24 36 $config=array(); … … 54 66 } 55 67 68 /** 69 * verify the existance of a path 70 */ 56 71 private static function _verifpath($list, $time){ 57 72 $list = split(' *, *',$list); trunk/lib/jelix/core/jConfigCompiler.class.php
r231 r248 11 11 */ 12 12 13 13 /** 14 * jConfigCompiler merge two ini file in a single array and store it in a temporary file 15 * This is a static class 16 * @package jelix 17 * @subpackage core 18 */ 14 19 class jConfigCompiler { 15 20 … … 17 22 18 23 /** 19 * lecture de la configuration du framework 24 * read the given ini file. Merge it with the content of defaultconfig.ini.php 25 * It also calculates some options. It stores the result in a temporary file 26 * @param string $configFile the config file name 27 * @return object an object which contains configuration values 20 28 */ 21 29 static public function read($configFile){ … … 66 74 67 75 /** 68 * compilation et mise en cache de liste de chemins 76 * Analyse and check the "lib:" and "app:" path. 77 * @param array $list list of "lib:*" and "app:*" path 78 * @return array list of full path 69 79 */ 70 80 static private function _loadPathList($list){ … … 90 100 91 101 /** 92 * compilation et mise en cache de liste de chemins des plugins de templates 102 * Analyse and check the "lib:" and "app:" path for plugins 103 * @param array $list list of "lib:*" and "app:*" path 104 * @return array list of full path 93 105 */ 94 106 static private function _loadTplPathList(&$config, $var){ … … 111 123 } 112 124 125 /** 126 * merge two array which are the result of a parse_ini_file call 127 * @param $array the main array 128 * @param $tomerge the array to merge in the first one 129 */ 113 130 static private function _mergeConfig(&$array, $tomerge){ 114 131 … … 129 146 } 130 147 148 /** 149 * store an ini array in a file (contrary of parse_ini_file) 150 * @param $array the array to store 151 * @param $filename the file name 152 */ 131 153 static private function _saveToIni($array,$filename){ 132 154 … … 152 174 } 153 175 176 /** 177 * format a value to store in a ini file 178 * @param string $value the value 179 * @return string the formated value 180 */ 154 181 static private function _iniValue($value){ 155 182 if($value=='' || is_numeric($value) || preg_match("/^[\w]*$/", $value)) … … 160 187 } 161 188 162 163 189 ?> trunk/lib/jelix/core/jContext.class.php
r1 r248 16 16 */ 17 17 18 /** 19 * Module context manager 20 * Its goal is to manage a stack of module context 21 * @package jelix 22 * @subpackage core 23 */ 18 24 class jContext { 19 25 26 static protected $context = array(); 27 20 28 /** 21 * Empilement d'un contexte.22 * @param string $module le nom du module dont on empile le contexte29 * set the context to the given module 30 * @param string $module the module name 23 31 */ 24 32 static function push ($module){ 25 array_push ( $GLOBALS['gJContext'], $module);33 array_push (self::$context, $module); 26 34 } 27 35 28 36 /** 29 * D�lement d'un contexte.30 * @return string element d�l�(le contexte qui n'est plus d'actualit�37 * cancel the current context and set the context to the previous module 38 * @return string the obsolet module name 31 39 */ 32 40 static function pop (){ 33 return array_pop ( $GLOBALS['gJContext']);41 return array_pop (self::$context); 34 42 } 35 43 36 44 /** 37 * r�p� le contexte actuel38 * @return string le nom du contexte actuel si d�ni, sinon retourne false45 * get the module name of the current context 46 * @return string name of the current module 39 47 */ 40 48 static function get (){ 41 return end( $GLOBALS['gJContext']);49 return end(self::$context); 42 50 } 43 51 44 52 /** 45 * r�itialise le contexte.53 * clear the context 46 54 */ 47 55 static function clear (){ 48 $GLOBALS['gJContext']= array ();56 self::$context = array (); 49 57 } 50 58 } trunk/lib/jelix/core/jController.class.php
r235 r248 14 14 /** 15 15 * interface for controllers used for RESTFull request/response 16 * @package jelix 17 * @subpackage core 16 18 */ 17 19 interface jIRestController{ … … 25 27 /** 26 28 * class base for controllers 27 * 29 * 28 30 * A controller is used to implement one or many actions, one method for each action. 31 * @package jelix 32 * @subpackage core 29 33 */ 30 34 abstract class jController{ … … 85 89 protected function intParam ($parName, $parDefaultValue=null, $useDefaultIfEmpty=false){ 86 90 $value = $this->request->getParam($parName, $parDefaultValue, $useDefaultIfEmpty); 87 if(is_numeric($value)) 91 if(is_numeric($value)) 88 92 return intval($value); 89 93 else … … 101 105 protected function floatParam ($parName, $parDefaultValue=null, $useDefaultIfEmpty=false){ 102 106 $value = $this->request->getParam($parName, $parDefaultValue, $useDefaultIfEmpty); 103 if(is_numeric($value)) 107 if(is_numeric($value)) 104 108 return floatval($value); 105 109 else … … 117 121 protected function boolParam ($parName, $parDefaultValue=null, $useDefaultIfEmpty=false){ 118 122 $value = $this->request->getParam($parName, $parDefaultValue, $useDefaultIfEmpty); 119 if($value=="true" || $value == "1" || $value=="on" || $value=="yes") 123 if($value=="true" || $value == "1" || $value=="on" || $value=="yes") 120 124 return true; 121 elseif($value=="false" || $value == "0" || $value=="off" || $value=="no") 125 elseif($value=="false" || $value == "0" || $value=="off" || $value=="no") 122 126 return false; 123 127 else trunk/lib/jelix/core/jCoordinator.class.php
r247 r248 17 17 * to load the configuration, to get the request parameters 18 18 * used to instancie the correspondant controllers and to run the right method. 19 * @package jelix 20 * @subpackage core 19 21 */ 20 22 class jCoordinator { trunk/lib/jelix/core/jErrorHandler.lib.php
r243 r248 16 16 */ 17 17 18 error_reporting (E_ALL);19 20 18 /** 21 * Gestionnaire d'erreur du framework22 * Re mplace le gestionnaire par defaut du moteur PHP23 * @param integer $errno code erreur24 * @param string $errmsg message d'erreur25 * @param string $filename nom du fichier o�st produit l'erreur26 * @param integer $linenum numero de ligne27 * @param array $ vars variables de contexte19 * Error handler for the framework. 20 * Replace the default PHP error handler 21 * @param integer $errno error code 22 * @param string $errmsg error message 23 * @param string $filename filename where the error appears 24 * @param integer $linenum line number where the error appears 25 * @param array $errcontext 28 26 */ 29 27 function jErrorHandler($errno, $errmsg, $filename, $linenum, $errcontext){ trunk/lib/jelix/core/jException.lib.php
r243 r248 11 11 */ 12 12 13 13 /** 14 * Exception handler for the framework. 15 * Replace the default PHP Exception handler 16 * @param Exception $exception the exception object 17 */ 14 18 function jExceptionHandler($exception){ 15 19 global $gJConfig, $gJCoord; … … 71 75 72 76 77 /** 78 * Jelix Exception 79 * It handles locale messages. 80 * message property contains the locale key, and a new property 81 * contains the localized message 82 * @package jelix 83 * @subpackage core 84 */ 85 class jException extends Exception { 73 86 74 class jException extends Exception { 75 public $localeParams = array(); 76 public $localizedMessage = ''; 87 /** 88 * parameters for the locale key 89 */ 90 public $localeParams = array(); 77 91 78 public function __construct($localekey, $localeParams=array(), $code = 1) { 79 try{ 80 $this->localizedMessage = jLocale::get($localekey, $localeParams); 81 }catch(Exception $e){ 82 $this->localizedMessage = $localekey; 83 } 84 if(preg_match('/^\s*\((\d+)\)(.+)$/',$this->localizedMessage,$m)){ 85 $code = $m[1]; 86 $this->localizedMessage = $m[2]; 87 } 88 parent::__construct($localekey, $code); 89 $this->localeParams=$localeParams; 92 /** 93 * the localized message 94 * @var string 95 */ 96 public $localizedMessage = ''; 90 97 91 } 98 /** 99 * @param string $localekey a locale key 100 * @param array $localeParams parameters for the message (for sprintf) 101 * @param integer $code error code (can be provided by the localized message) 102 */ 103 public function __construct($localekey, $localeParams=array(), $code = 1) { 104 try{ 105 $this->localizedMessage = jLocale::get($localekey, $localeParams); 106 }catch(Exception $e){ 107 $this->localizedMessage = $localekey; 108 } 109 if(preg_match('/^\s*\((\d+)\)(.+)$/',$this->localizedMessage,$m)){ 110 $code = $m[1]; 111 $this->localizedMessage = $m[2]; 112 } 113 parent::__construct($localekey, $code); 114 $this->localeParams=$localeParams; 115 } 92 116 93 public function __toString() { 94 return $this->localizedMessage; 95 } 117 /** 118 * magic function for echo 119 * @return string localized message 120 */ 121 public function __toString() { 122 return $this->localizedMessage; 123 } 96 124 97 public function getLocaleMessage(){ 98 return $this->localizedMessage; 99 } 125 /** 126 * getter for the localized message 127 * @return string 128 */ 129 public function getLocaleMessage(){ 130 return $this->localizedMessage; 131 } 100 132 101 133 } 102 134 103 104 105 135 ?> trunk/lib/jelix/core/jIncluder.class.php
r231 r248 17 17 18 18 19 // pour les compilations avec 1 fichier source 19 /** 20 * interface for compiler which needs only one source file 21 * @package jelix 22 * @subpackage core 23 */ 20 24 interface jISimpleCompiler { 25 /** 26 * parse the given file, and store the result in a cache file 27 * @param jSelector $aSelector the file selector 28 * @return boolean true : process ok 29 */ 21 30 public function compile($aSelector); 22 31 } 23 32 24 // pour les compilations avec plusieurs fichiers sources 33 /** 34 * interface for compiler which needs many source files 35 * @package jelix 36 * @subpackage core 37 */ 25 38 interface jIMultiFileCompiler { 39 40 /** 41 * parse one of needed file 42 * @param string $sourceFile the file selector 43 * @param string $module the module name of the file 44 * @return boolean true : process ok 45 */ 26 46 public function compileItem($sourceFile, $module); 47 48 /** 49 * save the results in a temporary file 50 * called at the end of the compilation. 51 * @param string $cachefile the name of cache file 52 */ 27 53 public function endCompile($cachefile); 28 54 } 29 55 30 56 /** 57 * This object is responsible to load cache files 58 * Some jelix files needs to be compiled in PHP (templates, daos etc..) and their 59 * correspondant php content are stored in a cache file. 60 * jIncluder verify that cache file exists, is not obsolete, and if not, 61 * it calls the correspondant compiler. 62 * And then include the cache. 63 * @package jelix 64 * @subpackage core 65 */ 31 66 class jIncluder { 67 /** 68 * list of loaded cache file. 69 * It avoids to do all verification when a file is include many time 70 * @var array 71 */ 32 72 protected static $_includedFiles = array(); 33 73 34 public static function EVENT(){ 35 return array('jEventCompiler', 36 'events/jEventCompiler.class.php', 37 'events.xml', 38 'events.php' 39 ); 40 } 41 74 /** 75 * This is a static class, so private constructor 76 */ 42 77 private function __construct(){} 43 78 44 79 /** 45 * @param jISelector $aSelectorId selecteur du fichier �ompiler 46 * @return array contenant l'objet selecteur correspondant �aSelectorId, et 2 booleans indiquant si il a fallu compiler et si la compilation s'est bien pass� */ 80 * includes cache of the correspondant file selector 81 * check the cache, compile if needed, and include the cache 82 * @param jISelector $aSelectorId the selector corresponding to the file 83 */ 47 84 public static function inc($aSelector=''){ 48 85 global $gJConfig,$gJCoord; 49 86 50 87 if(is_string($aSelector)){ 51 try{ 52 $aSelector = jSelectorFactory::create($aSelector); 53 }catch(jExceptionSelector $e){ 54 return array('selector'=>$aSelector, 'compilation'=>false, 'compileok'=>false); 55 } 88 $aSelector = jSelectorFactory::create($aSelector); 56 89 } 57 90 … … 59 92 60 93 if($cachefile == '' || isset(jIncluder::$_includedFiles[$cachefile])){ 61 return array('selector'=>$aSelector, 'compilation'=>false, 'compileok'=>true);94 return; 62 95 } 63 96 … … 66 99 67 100 if($sourcefile == '' || !file_exists($sourcefile)){ 68 trigger_error(jLocale::get('jelix~errors.includer.source.missing',array( $aSelector->toString(true))), E_USER_ERROR); 69 return array('selector'=>$aSelector, 'compilation'=>false, 'compileok'=>false); 101 throw new jException('jelix~errors.includer.source.missing',array( $aSelector->toString(true))); 70 102 } 71 103 … … 89 121 } 90 122 91 return array('selector'=>$aSelector, 'compilation'=>$mustCompile, 'compileok'=>$compileok);92 123 } 93 124 94 /** 95 * @param array aType 96 = array( 97 'nom classe compilateur', 98 'chemin compilateur relatif �ib/jelix/', 99 'foo.xml', // nom du fichier �ompiler 100 'foo.php', //fichier cache 101 ); 102 * @return array contenant 2 booleans indiquant si il a fallu compiler et si la compilation s'est bien pass� */ 125 /** 126 * include a cache file which is the results of the compilation of multiple file sotred in multiple modules 127 * @param array aType 128 * = array( 129 * 'compilator class name', 130 * 'relative path of the compilator class file to lib/jelix/', 131 * 'foo.xml', // file name to compile (in each modules) 132 * 'foo.php', //cache filename 133 * ); 134 */ 103 135 public static function incAll($aType){ 104 136 … … 106 138 $cachefile = JELIX_APP_TEMP_PATH.'compiled/'.$aType[3]; 107 139 if(isset(jIncluder::$_includedFiles[$cachefile])){ 108 return array('compilation'=>false, 'compileok'=>true);140 return; 109 141 } 110 142 … … 144 176 jIncluder::$_includedFiles[$cachefile]=true; 145 177 } 146 return array('compilation'=>$mustCompile, 'compileok'=>$compileok);147 178 } 148 179 } trunk/lib/jelix/core/jIPlugin.iface.php
r98 r248 14 14 /** 15 15 * interface that should implement all coordinator plugins 16 * @package jelix 17 * @subpackage core 16 18 */ 17 18 19 interface jIPlugin { 19 20 20 21 /** 21 * @param array $config list of configuration parameters22 * @param array $config content of the config ini file of the plugin 22 23 */ 23 24 public function __construct($config); 24 25 25 26 /** 27 * this method is called before each action 26 28 * @param array $params plugin parameters for the current action 27 29 * @return null or jSelectorAct if action should change … … 30 32 31 33 /** 32 * 34 * this method is called after the execution of the action, and before the output of the response 33 35 */ 34 36 public function beforeOutput(); 35 37 38 /** 39 * this method is called after the output. 40 */ 36 41 public function afterProcess (); 37 42 } trunk/lib/jelix/core/jLocale.class.php
r246 r248 19 19 20 20 /** 21 * a bundle content all readed properties ina a given langage, and for all charsets 21 * a bundle contains all readed properties in a given language, and for all charsets 22 * @package jelix 23 * @subpackage core 22 24 */ 23 25 class jBundle { … … 40 42 /** 41 43 * get the translation 44 * @param string $key the locale key 45 * @param string $charset 46 * @return string the localized string 42 47 */ 43 48 public function get ($key, $charset = null){ … … 104 109 * loads a given resource from its path. 105 110 */ 106 function _loadResources ($fichier, $charset){111 private function _loadResources ($fichier, $charset){ 107 112 108 113 if (($f = fopen ($fichier, 'r')) !== false) { … … 156 161 /** 157 162 * static class to get a localized string 163 * @package jelix 164 * @subpackage core 158 165 */ 159 166 class jLocale { 167 /** 168 * 169 */ 160 170 static $bundles = array(); 171 172 /** 173 * static class... 174 */ 175 private function __construct(){} 161 176 162 177 /** trunk/lib/jelix/core/jRequest.class.php
r247 r248 21 21 * author : Gerald Croes, Laurent Jouanneau 22 22 * http://www.copix.org 23 * @package jelix 24 * @subpackage core 23 25 */ 24 26 abstract class jRequest { trunk/lib/jelix/core/jResponse.class.php
r240 r248 13 13 14 14 /** 15 * classe de base pour l'objet charg�e controler et de formater 16 * la r�nse renvoy�au navigateur 15 * class base for response object 16 * A response object is responsible to generate a content in a specific format. 17 * @package jelix&nbs
