<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:clearspace="http://www.jivesoftware.com/xmlns/jive/rss" version="2.0">
  <channel>
    <title>Adobe Community: Message List - Configuration variables for a REST cfc</title>
    <link>https://forums.adobe.com/community/coldfusion?view=discussions</link>
    <description>Most recent forum messages</description>
    <language>en</language>
    <pubDate>Mon, 03 Nov 2014 16:37:15 GMT</pubDate>
    <generator>Jive Engage 7.0.0.1  (http://jivesoftware.com/products/)</generator>
    <dc:date>2014-11-03T16:37:15Z</dc:date>
    <dc:language>en</dc:language>
    <item>
      <title>Re: Configuration variables for a REST cfc</title>
      <link>https://forums.adobe.com/message/6894900?tstart=0#6894900</link>
      <description>&lt;!-- [DocumentBodyStart:ebd40c16-2be5-4483-a687-6f9057751abc] --&gt;&lt;div class="jive-rendered-content"&gt;&lt;p&gt;I think you can declare them in the beginning of the component prior to any functions.&amp;nbsp; You can include an init function, and just call it the same as you would call any other function.&lt;/p&gt;&lt;p style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;&amp;lt;cffunction name="init"&amp;gt;&lt;/p&gt;&lt;p&gt;&amp;lt;cfreturn this /&amp;gt;&lt;/p&gt;&lt;p&gt;&amp;lt;/cffunction&amp;gt;&lt;/p&gt;&lt;p style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;&amp;lt;cfset tmp = path.to.component.init()&amp;gt;&lt;/p&gt;&lt;p style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;I haven't worked with that, myself, but I've seen lots of code do that.&lt;/p&gt;&lt;p style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;HTH,&lt;/p&gt;&lt;p style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;^_^&lt;/p&gt;&lt;/div&gt;&lt;!-- [DocumentBodyEnd:ebd40c16-2be5-4483-a687-6f9057751abc] --&gt;&lt;img src='/beacon?t=1415918455369' /&gt;</description>
      <pubDate>Mon, 03 Nov 2014 16:37:15 GMT</pubDate>
      <author>forums_noreply@adobe.com</author>
      <guid>https://forums.adobe.com/message/6894900?tstart=0#6894900</guid>
      <dc:date>2014-11-03T16:37:15Z</dc:date>
      <clearspace:dateToText>1 week 3 days ago</clearspace:dateToText>
      <clearspace:objectType>0</clearspace:objectType>
    </item>
    <item>
      <title>Configuration variables for a REST cfc</title>
      <link>https://forums.adobe.com/message/6894620?tstart=0#6894620</link>
      <description>&lt;!-- [DocumentBodyStart:cbaaef3b-63fc-40d8-bea3-abb1995bb14d] --&gt;&lt;div class="jive-rendered-content"&gt;&lt;p&gt;I am creating my first RESTful cfc which will allow a legacy system to interact with a more current system.&amp;nbsp; There are some "configuration" variables that need to be available to a couple of functions in the cfc.&amp;nbsp; These variables are mainly for disk paths and an API key.&amp;nbsp; What is the best practice for setting these variables in my RESTful cfc?&amp;nbsp; Should I just declare them at the beginning of the component outside the functions in the variables scope?&amp;nbsp; Do I need an init function?&amp;nbsp; If I use an init function how does it get called when the other functions are only called via REST?&lt;/p&gt;&lt;/div&gt;&lt;!-- [DocumentBodyEnd:cbaaef3b-63fc-40d8-bea3-abb1995bb14d] --&gt;</description>
      <pubDate>Mon, 03 Nov 2014 15:30:01 GMT</pubDate>
      <author>forums_noreply@adobe.com</author>
      <guid>https://forums.adobe.com/message/6894620?tstart=0#6894620</guid>
      <dc:date>2014-11-03T15:30:01Z</dc:date>
      <clearspace:dateToText>1 week 3 days ago</clearspace:dateToText>
      <clearspace:replyCount>1</clearspace:replyCount>
      <clearspace:objectType>0</clearspace:objectType>
    </item>
  </channel>
</rss>

