mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-01-24 21:59:55 +09:00
git-svn-id: http://xe-core.googlecode.com/svn/trunk@342 201d5d3c-b55e-5fd7-737f-ddc643e51545
This commit is contained in:
parent
aa6f3b6bf6
commit
c8eb86356e
18 changed files with 61 additions and 27 deletions
|
|
@ -81,8 +81,8 @@
|
|||
// 이미지 태그 img의 src의 값이 ./ 로 시작하면 {$tpl_path}로 변경
|
||||
$buff = preg_replace_callback('!src=[\'"]{1}(.*?)[\'"]{1}!is', array($this, '_compileImgPath'), $buff);
|
||||
|
||||
// 함수를 변경
|
||||
$buff = preg_replace_callback('/\{\@([^\}]+)\}/i', array($this, '_compileVarToFunc'), $buff);
|
||||
// 결과를 출력하지 않는 구문 변경
|
||||
$buff = preg_replace_callback('/\{\@([^\}]+)\}/i', array($this, '_compileVarToSilenceExecute'), $buff);
|
||||
|
||||
// <!--@, --> 의 변경
|
||||
$buff = preg_replace_callback('!<\!--@(.*?)-->!is', array($this, '_compileFuncToCode'), $buff);
|
||||
|
|
@ -126,8 +126,8 @@
|
|||
/**
|
||||
* @brief {@와 } 안의 @... 함수를 print func(..)로 변경
|
||||
**/
|
||||
function _compileVarToFunc($matches) {
|
||||
return '<?php print('.preg_replace('/\$([a-zA-Z0-9\_\-\>]+)/i','$__Context->\\1', trim($matches[1])).');?>';
|
||||
function _compileVarToSilenceExecute($matches) {
|
||||
return '<?php @'.preg_replace('/\$([a-zA-Z0-9\_\-\>]+)/i','$__Context->\\1', trim($matches[1])).';?>';
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue