-
Notifications
You must be signed in to change notification settings - Fork 3
/
NotificationHandlerInterface.php
43 lines (38 loc) · 1.62 KB
/
NotificationHandlerInterface.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
<?php
/*
* This file is part of the Hearsay PubSubHubbub bundle.
*
* The Hearsay PubSubHubbub bundle is free software: you can redistribute it
* and/or modify it under the terms of the GNU Lesser General Public License
* as published by the Free Software Foundation, either version 3 of the
* License, or (at your option) any later version.
*
* The Hearsay PubSubHubbub bundle is distributed in the hope that it will be
* useful, but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public License
* along with the Hearsay PubSubHubbub bundle. If not, see
* <http://www.gnu.org/licenses/>.
*/
namespace Hearsay\PubSubHubbubBundle\Handler;
use Hearsay\PubSubHubbubBundle\Topic\TopicInterface;
use Symfony\Component\HttpFoundation\HeaderBag;
/**
* Interface for objects which can handle hub push notifications.
* @package HearsayPubSubHubbubBundle
* @subpackage Handler
* @author Kevin Montag <[email protected]>
*/
interface NotificationHandlerInterface {
/**
* Respond to a push notification. As per the PubSubHubbub spec,
* implementing classes should avoid performing time-consuming operations
* inside this function.
* @param TopicInterface $topic The topic related to the push.
* @param HeaderBag $headers The headers sent along with the request.
* @param string $content The body of the notification request.
*/
public function handle(TopicInterface $topic, HeaderBag $headers, $content);
}