Advertisement
Guest User

Martijn van der Woud

a guest
Feb 13th, 2010
187
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. <cfcomponent displayname="MyMappingsConfig" output="false" hint="Manages configuration of mappings">
  2.  
  3.  
  4. <!--- =======================================================================================================
  5. CONSTRUCTOR
  6. ========================================================================================================--->
  7.  
  8.     <cffunction name="init"
  9.                 access="public"
  10.                 returntype="MyMappingsConfig"
  11.                 output="false"
  12.                 hint="constructor">
  13.  
  14.         <cfset makeMappings()>
  15.        
  16.         <cfreturn this>
  17.     </cffunction>              
  18.  
  19.  
  20. <!--- =======================================================================================================
  21. METHODS
  22. ========================================================================================================--->
  23.  
  24.     <cffunction name="makeMappings"
  25.                 access="public"
  26.                 returntype="void"
  27.                 output="false"
  28.                 hint="sets up CF mappings">
  29.  
  30.     <cfset var webRoot = GetDirectoryFromPath(GetCurrentTemplatePath())>
  31.     <cfset var appRoot = ListDeleteAt(webRoot, ListLen(webRoot, "\/"),"\/") & "/">
  32.    
  33.     <cfmapping logical="/config" physical="#appRoot#config">   
  34.     <cfmapping logical="/coldspring" physical="#appRoot#lib/coldspring">
  35.     <cfmapping logical="/mxunit" physical="#appRoot#/lib/mxunit">
  36.            
  37.  
  38.     </cffunction>
  39.  
  40. </cfcomponent>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement