title: PHP: Passing Interface as Parameter
body: <p>In .NET I have done that I passed Interfaces as parameters in class methods. I want to know is it possible in PHP?</p>
  
  <p>My scnerio is that I have a class dealing with mqin system functionality. Now I want to integrate Notification system with it. I want to keep notification system separate since it is not the main part of the system plus I can use it somewhere else. If I have the following structure:</p>
  
  <pre><code>Interface INotification
  {
    public set()
    public send()
  }
  </code></pre>
  
  <p>And then I do:</p>
  
  <pre><code>class MyClass
  {
     public setNotifier(INotification $notifier)
    {
    }
  }
  </code></pre>
  
  <p>So Is it possible that I can access set() and send() here after implementing them in a class? I want to know how <a href="https://stackoverflow.com/questions/325561/passing-interface-as-a-parameter-to-an-extension-method">this C# Example</a> work that they set parameters of an Interface type. </p>
  
  <p>Thanks</p>