|
1
|
|
|
<?php |
|
2
|
|
|
/** |
|
3
|
|
|
* Joomla! Content Management System |
|
4
|
|
|
* |
|
5
|
|
|
* @copyright Copyright (C) 2005 - 2019 Open Source Matters, Inc. All rights reserved. |
|
6
|
|
|
* @license GNU General Public License version 2 or later; see LICENSE.txt |
|
7
|
|
|
*/ |
|
8
|
|
|
|
|
9
|
|
|
namespace Joomla\CMS\Table\Observer; |
|
10
|
|
|
|
|
11
|
|
|
defined('JPATH_PLATFORM') or die; |
|
12
|
|
|
|
|
13
|
|
|
use Joomla\CMS\Table\TableInterface; |
|
|
|
|
|
|
14
|
|
|
use Joomla\CMS\Table\Table; |
|
|
|
|
|
|
15
|
|
|
|
|
16
|
|
|
/** |
|
17
|
|
|
* Table class supporting modified pre-order tree traversal behavior. |
|
18
|
|
|
* |
|
19
|
|
|
* @since 3.1.2 |
|
20
|
|
|
*/ |
|
21
|
|
|
abstract class AbstractObserver implements \JObserverInterface |
|
22
|
|
|
{ |
|
23
|
|
|
/** |
|
24
|
|
|
* The observed table |
|
25
|
|
|
* |
|
26
|
|
|
* @var Table |
|
27
|
|
|
* @since 3.1.2 |
|
28
|
|
|
*/ |
|
29
|
|
|
protected $table; |
|
30
|
|
|
|
|
31
|
|
|
/** |
|
32
|
|
|
* Constructor: Associates to $table $this observer |
|
33
|
|
|
* |
|
34
|
|
|
* @param TableInterface $table Table to be observed |
|
35
|
|
|
* |
|
36
|
|
|
* @since 3.1.2 |
|
37
|
|
|
*/ |
|
38
|
|
|
public function __construct(TableInterface $table) |
|
39
|
|
|
{ |
|
40
|
|
|
$table->attachObserver($this); |
|
41
|
|
|
$this->table = $table; |
|
42
|
|
|
} |
|
43
|
|
|
|
|
44
|
|
|
/** |
|
45
|
|
|
* Pre-processor for $table->load($keys, $reset) |
|
46
|
|
|
* |
|
47
|
|
|
* @param mixed $keys An optional primary key value to load the row by, or an array of fields to match. If not |
|
48
|
|
|
* set the instance property value is used. |
|
49
|
|
|
* @param boolean $reset True to reset the default values before loading the new row. |
|
50
|
|
|
* |
|
51
|
|
|
* @return void |
|
52
|
|
|
* |
|
53
|
|
|
* @since 3.1.2 |
|
54
|
|
|
*/ |
|
55
|
|
|
public function onBeforeLoad($keys, $reset) |
|
|
|
|
|
|
56
|
|
|
{ |
|
57
|
|
|
} |
|
58
|
|
|
|
|
59
|
|
|
/** |
|
60
|
|
|
* Post-processor for $table->load($keys, $reset) |
|
61
|
|
|
* |
|
62
|
|
|
* @param boolean &$result The result of the load |
|
63
|
|
|
* @param array $row The loaded (and already binded to $this->table) row of the database table |
|
64
|
|
|
* |
|
65
|
|
|
* @return void |
|
66
|
|
|
* |
|
67
|
|
|
* @since 3.1.2 |
|
68
|
|
|
*/ |
|
69
|
|
|
public function onAfterLoad(&$result, $row) |
|
|
|
|
|
|
70
|
|
|
{ |
|
71
|
|
|
} |
|
72
|
|
|
|
|
73
|
|
|
/** |
|
74
|
|
|
* Pre-processor for $table->store($updateNulls) |
|
75
|
|
|
* |
|
76
|
|
|
* @param boolean $updateNulls The result of the load |
|
77
|
|
|
* @param string $tableKey The key of the table |
|
78
|
|
|
* |
|
79
|
|
|
* @return void |
|
80
|
|
|
* |
|
81
|
|
|
* @since 3.1.2 |
|
82
|
|
|
*/ |
|
83
|
|
|
public function onBeforeStore($updateNulls, $tableKey) |
|
|
|
|
|
|
84
|
|
|
{ |
|
85
|
|
|
} |
|
86
|
|
|
|
|
87
|
|
|
/** |
|
88
|
|
|
* Post-processor for $table->store($updateNulls) |
|
89
|
|
|
* |
|
90
|
|
|
* @param boolean &$result The result of the store |
|
91
|
|
|
* |
|
92
|
|
|
* @return void |
|
93
|
|
|
* |
|
94
|
|
|
* @since 3.1.2 |
|
95
|
|
|
*/ |
|
96
|
|
|
public function onAfterStore(&$result) |
|
|
|
|
|
|
97
|
|
|
{ |
|
98
|
|
|
} |
|
99
|
|
|
|
|
100
|
|
|
/** |
|
101
|
|
|
* Pre-processor for $table->delete($pk) |
|
102
|
|
|
* |
|
103
|
|
|
* @param mixed $pk An optional primary key value to delete. If not set the instance property value is used. |
|
104
|
|
|
* |
|
105
|
|
|
* @return void |
|
106
|
|
|
* |
|
107
|
|
|
* @since 3.1.2 |
|
108
|
|
|
* @throws \UnexpectedValueException |
|
109
|
|
|
*/ |
|
110
|
|
|
public function onBeforeDelete($pk) |
|
|
|
|
|
|
111
|
|
|
{ |
|
112
|
|
|
} |
|
113
|
|
|
|
|
114
|
|
|
/** |
|
115
|
|
|
* Post-processor for $table->delete($pk) |
|
116
|
|
|
* |
|
117
|
|
|
* @param mixed $pk The deleted primary key value. |
|
118
|
|
|
* |
|
119
|
|
|
* @return void |
|
120
|
|
|
* |
|
121
|
|
|
* @since 3.1.2 |
|
122
|
|
|
*/ |
|
123
|
|
|
public function onAfterDelete($pk) |
|
|
|
|
|
|
124
|
|
|
{ |
|
125
|
|
|
} |
|
126
|
|
|
} |
|
127
|
|
|
|
The issue could also be caused by a filter entry in the build configuration. If the path has been excluded in your configuration, e.g.
excluded_paths: ["lib/*"], you can move it to the dependency path list as follows:For further information see https://scrutinizer-ci.com/docs/tools/php/php-scrutinizer/#list-dependency-paths