<?php

namespace Notification;

class Notification
{
    public function __contruct($title = null, $subject = null, $message = null)
    {
        $this->title   = $title;
        $this->subject = $subject;
        $this->message = $message;
    }
    
    public function notify(Provider $provider)
    {
        return $provider->notify($this);
    }
}

interface Provider
{
    public function notify(Notification $notification);
}

class FacebookProvider implements Provider
{
    public function notify(Notification $notification) { // dummy }
}

class SmsProvider implements Provider
{
    public function notify(Notification $notification) { // dummy }
}

$notification = new Notification('title', 'subject', 'message');
$notification->notify(new FacebookProvider('acess_token'));
$notification->notify(new SmsProvider('phone_number'));