title: apply_filters from within a Class (WordPress)
body: <p>I'm writing a plugin that makes use of the <code>wp_mail</code> function. However I want to change the From: address. WP provides some filters - <code>wp_mail_from_name</code> and <code>wp_mail_from</code> - but I'm not sure how to call them from within a Class.</p>
  
  <p>If I place them outside of a function there's a parse error (unexpected T_STRING, expecting T_FUNCTION).</p>
  
  <p>If I place them within a function nothing seems to happen</p>
  
  <pre><code>class myPlugin {    
      public function setFromname($fromname) {
          apply_filters( 'wp_mail_from_name', $fromname );
          $this-&gt;fromname = $fromname;
      }
      public function setFromemail($fromemail) {
          apply_filters( 'wp_mail_from', $fromemail );
          $this-&gt;fromemail = $fromemail;
      }
  }
  </code></pre>
  
  <p>How is it possible to affect these filters within a Class?</p>