📄 base.cfc
字号:
<!---
Name : base.cfc
Author : Raymond Camden
Created : October 12, 2006
Last Updated : October 12, 2006
History : Added header.
Purpose : Base CFC
LICENSE
Copyright 2006 Raymond Camden
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
--->
<cfcomponent output="false">
<cfset variables.appid = "">
<!---
CFLib info:
/**
* Converts a UNIX epoch time to a ColdFusion date object.
*
* @param epoch Epoch time, in seconds. (Required)
* @return Returns a date object.
* @author Chris Mellon (mellon@mnr.org)
* @version 1, June 21, 2002
*/
--->
<cffunction name="epochTimeToDate" access="public" returnType="date" output="false">
<cfargument name="epoch" type="numeric" required="true">
<cfreturn dateAdd("s", epoch, "January 1 1970 00:00:00")>
</cffunction>
<cffunction name="getAppID" access="public" returnType="string" output="false"
hint="Returns the AppID. Used by various services.">
<cfreturn variables.appid>
</cffunction>
<cffunction name="setAppID" access="public" returnType="void" output="false"
hint="Sets the AppID if you do not want to use the default.">
<cfargument name="appid" type="string" required="true">
<cfset variables.appid = arguments.appid>
</cffunction>
</cfcomponent>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -