Pastebin launched a little side project called VERYVIRAL.com, check it out ;-) Want more features on Pastebin? Sign Up, it's FREE!
Guest

Untitled

By: a guest on Mar 28th, 2012  |  syntax: None  |  size: 0.43 KB  |  views: 109  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. calling template
  2. <cfset userService = new UserService()>
  3. <cfset personService = new PersonService()>
  4.  
  5. UserService.cfc
  6. component {
  7.         writeOutput("Hello From User Service");
  8.         public UserService function init(){
  9.                 return this;
  10.         }
  11. }
  12.  
  13. PersonService.cfc
  14. <cfcomponent>
  15.         <cfoutput>Hello From PersonService</cfoutput>
  16.         <cffunction name="init" access="public" returntype="PersonService">
  17.                 <cfreturn this>
  18.         </cffunction>
  19. </cfcomponent>