generateFileUsingSimpleTemplate의 변환 규칙 변경

This commit is contained in:
2018-03-17 22:08:34 +09:00
parent 7f885f7a69
commit 96e4c08ee9
4 changed files with 26 additions and 26 deletions
+15 -15
View File
@@ -8,7 +8,7 @@ require(__dir__.'/../vendor/autoload.php');
* @return string
*/
function getGlobalSalt(){
return '_globalSalt_';
return '_tK_globalSalt_';
}
/**
@@ -17,11 +17,11 @@ function getGlobalSalt(){
* @return MeekroDB
*/
function getRootDB(){
$host = '_host_';
$user = '_user_';
$password = '_password_';
$dbName = '_dbName_';
$port = _port_;
$host = '_tK_host_';
$user = '_tK_user_';
$password = '_tK_password_';
$dbName = '_tK_dbName_';
$port = _tK_port_;
$encoding = 'utf8';
static $uDB = NULL;
@@ -35,16 +35,16 @@ function getRootDB(){
}
function newMailObj(){
$mailType = '_mailType_';
$mailSubType = '_mailSubType_';
$mailType = '_tK_mailType_';
$mailSubType = '_tK_mailSubType_';
$checkAuth = _mailCheckAuth_;//boolean
$host = '_mailHost_';
$user = '_mailUser_';
$password = '_mailPassword_';
$address = '_mailAddress_';
$nickname = '_mailNickname_';
$port = _mailPort_;//number
$ignoreCert = _mailIgnoreCert_;//boolean
$host = '_tK_mailHost_';
$user = '_tK_mailUser_';
$password = '_tK_mailPassword_';
$address = '_tK_mailAddress_';
$nickname = '_tK_mailNickname_';
$port = _tK_mailPort_;//number
$ignoreCert = _tK_mailIgnoreCert_;//boolean
if($mailType == 'smtp'){
$objMail = new PHPMailer();
+2 -2
View File
@@ -150,7 +150,7 @@ function hashPassword($salt, $password){
}
/**
* 변환할 내용이 _key_ 형태로 작성된 단순한 템플릿 파일을 이용하여 결과물을 생성해주는 함수.
* 변환할 내용이 _tK_$key_ 형태로 작성된 단순한 템플릿 파일을 이용하여 결과물을 생성해주는 함수.
*/
function generateFileUsingSimpleTemplate(string $srcFilePath, string $destFilePath, array $params, bool $canOverwrite=false){
if($destFilePath === $srcFilePath){
@@ -168,7 +168,7 @@ function generateFileUsingSimpleTemplate(string $srcFilePath, string $destFilePa
$text = file_get_contents($srcFilePath);
foreach($params as $key => $value){
$text = str_replace("_{$key}_", $value);
$text = str_replace("_tK_{$key}_", $value);
}
file_put_contents($destFilePath, $text);
+3 -3
View File
@@ -1,6 +1,6 @@
<?php
class KakaoKey{
const REST_KEY = '_REST_API_KEY_';
const ADMIN_KEY = '_ADMIN_KEY_';
const REDIRECT_URI = '_REDIRECT_URI_';
const REST_KEY = '_tK_REST_API_KEY_';
const ADMIN_KEY = '_tK_ADMIN_KEY_';
const REDIRECT_URI = '_tK_REDIRECT_URI_';
}
+6 -6
View File
@@ -7,11 +7,11 @@ require_once(__dir__.'/../../d_setting/conf.php');
* @return MeekroDB
*/
function getDB(){
$host = '_host_';
$user = '_user_';
$password = '_password_';
$dbName = '_dbName_';
$port = _port_;
$host = '_tK_host_';
$user = '_tK_user_';
$password = '_tK_password_';
$dbName = '_tK_dbName_';
$port = _tK_port_;
$encoding = 'utf8';
static $uDB = NULL;
@@ -26,5 +26,5 @@ function getDB(){
function getServPrefix()
{
return '_prefix_';
return '_tK_prefix_';
}