This repository has been archived by the owner on Mar 21, 2019. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathListener.php
58 lines (53 loc) · 1.65 KB
/
Listener.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
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
<?php
/*
* This file is part of a XenForo add-on.
*
* (c) Jeremy P <http://xenforo.com/community/members/jeremy-p.450/>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Jrahmy\ReportAlert;
/**
* Provides static methods to extend the XenForo API.
*
* @author Jeremy P <http://xenforo.com/community/members/jeremy-p.450/>
*/
class Listener
{
/**
* This method fires when the \XenForo_DataWriter_ReportComment class is
* loaded.
*
* It extends it with a custom class.
*
* @param string $class The class being loaded
* @param array $extend An array of classes to extend it with
*/
public static function loadClassDatawriter($class, array &$extend)
{
$extend[] = 'Jrahmy\ReportAlert\DataWriter\ReportComment';
}
/**
* This method fires when the \XenForo_Model_Report class is loaded.
*
* It extends it with a custom class.
*
* @param string $class The class being loaded
* @param array $extend An array of classes to extend it with
*/
public static function loadClassModel($class, array &$extend)
{
$extend[] = 'Jrahmy\ReportAlert\Model\Report';
}
/**
* Adds filesums to the XenForo File Health Check.
*
* @param \XenForo_ControllerAdmin_Abstract $controller The current admin controller
* @param array $hashes An array of filesums
*/
public static function fileHealthCheck(\XenForo_ControllerAdmin_Abstract $controller, array &$hashes)
{
$hashes += FileSums::getHashes();
}
}