[UPDATE] translate korean comments into Englsh

git-svn-id: http://xe-core.googlecode.com/svn/sandbox@7150 201d5d3c-b55e-5fd7-737f-ddc643e51545
This commit is contained in:
hankm2004 2010-01-15 06:38:25 +00:00
parent b3d6fc3eb7
commit 80a472be46

View file

@ -2,13 +2,14 @@
/** /**
* @class XmlJsFilter * @class XmlJsFilter
* @author taggon (gonom9@gmail.com) * @author taggon (gonom9@gmail.com)
* @brief filter xml문서를 해석하여 js파일로 만듬 * @brief filter class traslate xml content into javascript code
* @version 0.2 * @version 0.2
* *
* xml filter 파일은 js script로 컴파일 되어 캐싱됨 * it convert xml code into js file and save the result as a cache file
* * @code
* <filter name="js function 이름" act="서버에 요청할 action 이름" confirm_msg_code="submit시에 prompt로 물어볼 메세지의 코드" > * {
* <form> <-- 항목의 체크 * <filter name="name of javascript funcion" act="action name" confirm_msg_code="message string to be prompted when submitting the form" >
* <form> <-- code to validate data in the form
* <node target="name" required="true" minlength="1" maxlength="5" filter="email,userid,alpha,number" equalto="target" /> * <node target="name" required="true" minlength="1" maxlength="5" filter="email,userid,alpha,number" equalto="target" />
* </form> * </form>
* <parameter> <-- 항목을 조합하여 key=val js array로 return, act는 필수 * <parameter> <-- 항목을 조합하여 key=val js array로 return, act는 필수
@ -18,26 +19,29 @@
* <tag name="error" /> <-- error이름의 결과값을 받겠다는 * <tag name="error" /> <-- error이름의 결과값을 받겠다는
* </response> * </response>
* </filter> * </filter>
* * }
* - form - node *
* target = element의 이름 * @detail {
* required = true/ false 있어야 하는지에 대한 체크 * - syntax description of <form> node
* minlength, maxlength = 최소/최대 길이 * target = name of for element
* filter = javascript로 체크하기 위한 체크 필터 * required = flag indicating whether a field is mandatory or not
* email : email의 형식 ( aaa.aaa@aaa.com) * minlength, maxlength = mininum, maxinum length of string allowed for the field
* userid : 영문+숫자+_, 글자는 영문, 소문자 * filter = name of filter to be used for javascript validation. Following is the description of filter available
* alpha : 영문값만 허용 * 1) email : validate the confirmance of the value against an email format
* number : 숫자만 허용 * 2) userid : validate the confirmance of the value against the format of user id. (combination of number[0-9],alphabet(lower case) and '_', underscore starting with an alphatic character)
* equalto = target , 현재 폼과 지정 target의 값이 동일해야 * 3) alpha : check if the value is consists of alphabatic characters.
* 4) number : check if the value is consists of numerical digits
* 5) equalto = target : indicate that values in the form should be equal to those in target
* *
* - parameter - param * - parameter - param
* name = key : key를 이름으로 가지고 value의 값을 가지는 array 생성 * name = key : indicate that a new array, 'key' will be created and a value will be assigned to it
* target = target_name : target form element의 값을 가져옴 * target = target_name : target form element의 값을 가져옴
* *
* - response * - response
* tag = key : return받을 결과값의 변수명 * tag = key : name of variable that will contain the result of the execution
* }
**/ **/
class XmlJsFilter extends XmlParser { class XmlJsFilter extends XmlParser {
var $version = '0.2.1'; var $version = '0.2.1';
var $compiled_path = './files/cache/js_filter_compiled/'; ///< 컴파일된 캐시 파일이 놓일 위치 var $compiled_path = './files/cache/js_filter_compiled/'; ///< 컴파일된 캐시 파일이 놓일 위치
@ -54,8 +58,9 @@
} }
/** /**
* @brief xml파일과 compiled된js파일의 시간 비교 유무 비교등을 처리 * @brief compile a xml_file only when a corresponding js file does not exists or is outdated
**/ * @return Returns NULL regardless of the success of failure of the operation
**/
function compile() { function compile() {
if(!file_exists($this->xml_file)) return; if(!file_exists($this->xml_file)) return;
if(!file_exists($this->js_file)) $this->_compile(); if(!file_exists($this->js_file)) $this->_compile();
@ -64,7 +69,7 @@
} }
/** /**
* @brief 실제 xml_file을 컴파일하여 js_file을 생성 * @brief compile a xml_file into js_file
**/ **/
function _compile() { function _compile() {
global $lang; global $lang;
@ -286,10 +291,10 @@
} }
/** /**
* @brief $xml_file로 compiled_xml_file이름을 return * @brief return a file name of js file corresponding to the xml file
**/ **/
function _getCompiledFileName($xml_file) { function _getCompiledFileName($xml_file) {
return sprintf('%s%s.%s.compiled.js',$this->compiled_path, md5($this->version.$xml_file),Context::getLangType()); return sprintf('%s%s.%s.compiled.js',$this->compiled_path, md5($this->version.$xml_file),Context::getLangType());
} }
} }
?> ?>