This file is indexed.

/usr/share/php/Horde/Notification/Listener.php is in php-horde-notification 2.0.1-3.

This file is owned by root:root, with mode 0o644.

The actual contents of the file can be viewed below.

 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
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
<?php
/**
 * The Horde_Notification_Listener:: class provides functionality for
 * displaying messages from the message stack as a status line.
 *
 * Copyright 2001-2012 Horde LLC (http://www.horde.org/)
 *
 * See the enclosed file COPYING for license information (LGPL). If you
 * did not receive this file, see http://www.horde.org/licenses/lgpl21.
 *
 * @author   Chuck Hagenbuch <chuck@horde.org>
 * @category Horde
 * @license  http://www.horde.org/licenses/lgpl21 LGPL 2.1
 * @package  Notification
 */
abstract class Horde_Notification_Listener
{
    /**
     * The base type of this listener.
     *
     * @var string
     */
    protected $_name;

    /**
     * Array of message types that this listener handles.
     * Key is the type, value is the default class name of the Event type to
     * use.
     *
     * @var array
     */
    protected $_handles = array();

    /**
     * Does this listener handle a certain type of message?
     *
     * @param string $type  The message type in question.
     *
     * @return mixed  False if this listener does not handle, the default
     *                event class if it does handle the type.
     */
    public function handles($type)
    {
        if (isset($this->_handles[$type])) {
            return $this->_handles[$type];
        }

        /* Search for '*' entries. */
        foreach (array_keys($this->_handles) as $key) {
            if ((substr($key, -1) == '*') &&
                (strpos($type, substr($key, 0, -1)) === 0)) {
                return $this->_handles[$key];
            }
        }

        return false;
    }

    /**
     * Adds message type handler.
     *
     * @param string $type   The type identifier.
     * @param string $class  A classname.
     */
    public function addType($type, $class)
    {
        $this->_handles[$type] = $class;
    }

    /**
     * Return a unique identifier for this listener.
     *
     * @return string  Unique id.
     */
    public function getName()
    {
        return $this->_name;
    }

    /**
     * Outputs the status line, sends emails, pages, etc., if there
     * are any messages on this listener's message stack.
     *
     * @param array $events   The list of events to handle.
     * @param array $options  An array of options.
     */
    abstract public function notify($events, $options = array());

}