Answers.Body: <p>In addition to Ben Parizek answer, here is a full example code to get value of a "foo" setting from a "bar" plugin, using magic get methods.</p>
  
  <pre><code>$pluginSettings = craft()-&gt;plugins-&gt;getPlugin('bar')-&gt;getSettings();
  $foo = $pluginSettings-&gt;foo;
  </code></pre>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2014-06-29T19:53:16.367Z
Answers.Text: Where the magic exists, it's worth using... Thanks!
Answers.UserDisplayName: Lindsey D
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2014-06-29T14:10:59.063Z
Answers.LastActivityDate: 2014-06-29T19:55:56.543Z
Answers.LastEditDate: 2014-06-29T19:55:56.543Z
Answers.UserDisplayName: yann_yinn
Answers.Body: <p>Try:</p>
  
  <pre><code>craft()-&gt;plugins-&gt;getPlugin('myPlugin')-&gt;getSettings()
  </code></pre>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2014-06-24T02:36:08.633Z
Answers.LastActivityDate: 2014-06-24T03:39:01.623Z
Answers.LastEditDate: 2014-06-24T03:39:01.623Z
Answers.UserDisplayName: Ben Parizek
Body: <p>In the main <code>Plugin.php</code> file of my plugin, I can retrieve the plugin's settings like this:</p>
  
  <pre><code>$this-&gt;getSettings()
  </code></pre>
  
  <p><strong>How do I retrieve those same settings from elsewhere in the plugin?</strong></p>
  
  <p>I want to reference those setting from my <code>Service.php</code> file.</p>
  
Tags: <plugin-development>
Title: How do I reference the settings of my plugin?
ThreadText: # How do I reference the settings of my plugin?
  
  (Asked by: username_0 on 2014-06-24)
  
  In the main `Plugin.php` file of my plugin, I can retrieve the plugin's settings like this:
  
  ```
  $this->getSettings()
  
  ```
  
  **How do I retrieve those same settings from elsewhere in the plugin?**
  
  I want to reference those setting from my `Service.php` file.
  
  **Tags:** plugin-development
  
  
  ---
  
  ## 2 answers
  
  ### Answer by username_2 on 2014-06-24. Score: 15 | Accepted answer
  
  Try:
  
  ```
  craft()->plugins->getPlugin('myPlugin')->getSettings()
  
  ```
  
  
  ---
  
  ### Answer by username_1 on 2014-06-29. Score: 10
  
  In addition to username_2 answer, here is a full example code to get value of a "foo" setting from a "bar" plugin, using magic get methods.
  
  ```
  $pluginSettings = craft()->plugins->getPlugin('bar')->getSettings();
  $foo = $pluginSettings->foo;
  
  ```
  
  > **Comments:**
  > **username_0**: Where the magic exists, it's worth using... Thanks!  
  
  ---
  
  