In .NET I have done that I passed Interfaces as parameters in class methods. I want to know is it possible in PHP?
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:
Interface INotification
{
public set()
public send()
}
And then I do:
class MyClass
{
public setNotifier(INotification $notifier)
{
}
}
So Is it possible that I can access set() and send() here after implementing them in a class? I want to know how this C# Example work that they set parameters of an Interface type.
Thanks