This project does not seem to handle request data directly as such no vulnerable execution paths were found.
include
, or for example
via PHP's auto-loading mechanism.
These results are based on our legacy PHP analysis, consider migrating to our new PHP analysis engine instead. Learn more
1 | <?php |
||
0 ignored issues
–
show
|
|||
2 | require_once PODS_DIR . 'deprecated/deprecated.php'; |
||
3 | |||
4 | /** |
||
5 | * @package Pods\Deprecated |
||
6 | */ |
||
7 | class PodsAPI_Deprecated { |
||
8 | |||
9 | private $obj; |
||
10 | |||
11 | public $snap = false; |
||
12 | |||
13 | public $dt = 0; |
||
0 ignored issues
–
show
|
|||
14 | |||
15 | public $dtname = ''; |
||
16 | |||
17 | public $fields = array(); |
||
18 | |||
19 | public $use_pod_id = false; |
||
20 | |||
21 | /** |
||
22 | * Constructor - PodsAPI Deprecated functionality (pre 2.0) |
||
23 | * |
||
24 | * @param object $obj The PodsAPI object |
||
25 | * |
||
26 | * @license http://www.gnu.org/licenses/gpl-2.0.html |
||
27 | * @since 2.0 |
||
28 | */ |
||
29 | public function __construct( $obj ) { |
||
30 | |||
31 | // backwards-compatibility with references to $this->var_name |
||
32 | $vars = get_object_vars( $obj ); |
||
33 | |||
34 | foreach ( (array) $vars as $key => $val ) { |
||
35 | $this->{$key} = $val; |
||
36 | } |
||
37 | |||
38 | // keeping references pointing back to the source |
||
39 | $this->obj =& $obj; |
||
40 | } |
||
41 | |||
42 | /** |
||
43 | * Add or edit a column within a Pod |
||
44 | * |
||
45 | * $params['id'] int The field ID |
||
46 | * $params['pod_id'] int The Pod ID |
||
47 | * $params['pod'] string The Pod name |
||
48 | * $params['name'] string The field name |
||
49 | * $params['label'] string The field label |
||
50 | * $params['type'] string The column type ("txt", "desc", "pick", etc) |
||
51 | * $params['pick_object'] string The related PICK object name |
||
52 | * $params['pick_val'] string The related PICK object value |
||
53 | * $params['sister_id'] int (optional) The related field ID |
||
54 | * $params['weight'] int The field weight |
||
55 | * $params['options'] array The field options |
||
56 | * |
||
57 | * @param array $params An associative array of parameters |
||
58 | * |
||
59 | * @since 1.7.9 |
||
60 | */ |
||
61 | public function save_column( $params ) { |
||
0 ignored issues
–
show
The return type could not be reliably inferred; please add a
@return annotation.
Our type inference engine in quite powerful, but sometimes the code does not
provide enough clues to go by. In these cases we request you to add a ![]() |
|||
62 | |||
63 | pods_deprecated( 'PodsAPI::save_field', '2.0' ); |
||
64 | |||
65 | return $this->obj->save_field( $params ); |
||
66 | } |
||
67 | |||
68 | /** |
||
69 | * Save the entire role structure |
||
70 | * |
||
71 | * @param array $params An associative array of parameters |
||
72 | * |
||
73 | * @since 1.7.9 |
||
74 | * @return bool |
||
75 | */ |
||
76 | public function save_roles( $params ) { |
||
77 | |||
78 | pods_deprecated( '[use WP roles and capabilities instead]', '2.0' ); |
||
79 | |||
80 | return false; |
||
81 | } |
||
82 | |||
83 | /** |
||
84 | * Drop a Pod and all its content |
||
85 | * |
||
86 | * $params['id'] int The Pod ID |
||
87 | * $params['name'] string The Pod name |
||
88 | * |
||
89 | * @param array $params An associative array of parameters |
||
90 | * |
||
91 | * @since 1.7.9 |
||
92 | */ |
||
93 | public function drop_pod( $params ) { |
||
0 ignored issues
–
show
The return type could not be reliably inferred; please add a
@return annotation.
Our type inference engine in quite powerful, but sometimes the code does not
provide enough clues to go by. In these cases we request you to add a ![]() |
|||
94 | |||
95 | pods_deprecated( 'PodsAPI::delete_pod', '2.0' ); |
||
96 | |||
97 | return $this->obj->delete_pod( $params ); |
||
98 | } |
||
99 | |||
100 | /** |
||
101 | * Drop a column within a Pod |
||
102 | * |
||
103 | * $params['id'] int The column ID |
||
104 | * $params['name'] int The column name |
||
105 | * $params['pod'] string The Pod name |
||
106 | * $params['pod_id'] string The Pod name |
||
107 | * |
||
108 | * @param array $params An associative array of parameters |
||
109 | * |
||
110 | * @since 1.7.9 |
||
111 | */ |
||
112 | public function drop_column( $params ) { |
||
0 ignored issues
–
show
The return type could not be reliably inferred; please add a
@return annotation.
Our type inference engine in quite powerful, but sometimes the code does not
provide enough clues to go by. In these cases we request you to add a ![]() |
|||
113 | |||
114 | pods_deprecated( 'PodsAPI::delete_field', '2.0' ); |
||
115 | |||
116 | return $this->obj->delete_field( $params ); |
||
117 | } |
||
118 | |||
119 | /** |
||
120 | * Drop a Pod Template |
||
121 | * |
||
122 | * $params['id'] int The template ID |
||
123 | * $params['name'] string The template name |
||
124 | * |
||
125 | * @param array $params An associative array of parameters |
||
126 | * |
||
127 | * @since 1.7.9 |
||
128 | */ |
||
129 | public function drop_template( $params ) { |
||
0 ignored issues
–
show
The return type could not be reliably inferred; please add a
@return annotation.
Our type inference engine in quite powerful, but sometimes the code does not
provide enough clues to go by. In these cases we request you to add a ![]() |
|||
130 | |||
131 | pods_deprecated( 'PodsAPI::delete_template', '2.0' ); |
||
132 | |||
133 | return $this->obj->delete_template( $params ); |
||
134 | } |
||
135 | |||
136 | /** |
||
137 | * Drop a Pod Page |
||
138 | * |
||
139 | * $params['id'] int The page ID |
||
140 | * $params['uri'] string The page URI |
||
141 | * |
||
142 | * @param array $params An associative array of parameters |
||
143 | * |
||
144 | * @since 1.7.9 |
||
145 | */ |
||
146 | public function drop_page( $params ) { |
||
0 ignored issues
–
show
The return type could not be reliably inferred; please add a
@return annotation.
Our type inference engine in quite powerful, but sometimes the code does not
provide enough clues to go by. In these cases we request you to add a ![]() |
|||
147 | |||
148 | pods_deprecated( 'PodsAPI::delete_page', '2.0' ); |
||
149 | |||
150 | return $this->obj->delete_page( $params ); |
||
151 | } |
||
152 | |||
153 | /** |
||
154 | * Drop a Pod Helper |
||
155 | * |
||
156 | * $params['id'] int The helper ID |
||
157 | * $params['name'] string The helper name |
||
158 | * |
||
159 | * @param array $params An associative array of parameters |
||
160 | * |
||
161 | * @since 1.7.9 |
||
162 | */ |
||
163 | public function drop_helper( $params ) { |
||
0 ignored issues
–
show
The return type could not be reliably inferred; please add a
@return annotation.
Our type inference engine in quite powerful, but sometimes the code does not
provide enough clues to go by. In these cases we request you to add a ![]() |
|||
164 | |||
165 | pods_deprecated( 'PodsAPI::delete_helper', '2.0' ); |
||
166 | |||
167 | return $this->obj->delete_helper( $params ); |
||
168 | } |
||
169 | |||
170 | /** |
||
171 | * Drop a single pod item |
||
172 | * |
||
173 | * $params['id'] int (optional) The item's ID from the wp_pod_* table (used with datatype parameter) |
||
174 | * $params['pod'] string (optional) The datatype name (used with id parameter) |
||
175 | * $params['pod_id'] int (optional) The datatype ID (used with id parameter) |
||
176 | * $params['bypass_helpers'] bool Set to true to bypass running pre-save and post-save helpers |
||
177 | * |
||
178 | * @param array $params An associative array of parameters |
||
179 | * |
||
180 | * @since 1.7.9 |
||
181 | */ |
||
182 | public function drop_pod_item( $params ) { |
||
0 ignored issues
–
show
The return type could not be reliably inferred; please add a
@return annotation.
Our type inference engine in quite powerful, but sometimes the code does not
provide enough clues to go by. In these cases we request you to add a ![]() |
|||
183 | |||
184 | pods_deprecated( 'PodsAPI::delete_pod_item', '2.0' ); |
||
185 | |||
186 | return $this->obj->delete_pod_item( $params ); |
||
187 | } |
||
188 | |||
189 | /** |
||
190 | * Load a column |
||
191 | * |
||
192 | * $params['pod_id'] int The Pod ID |
||
193 | * $params['id'] int The field ID |
||
194 | * $params['name'] string The field name |
||
195 | * |
||
196 | * @param array $params An associative array of parameters |
||
197 | * |
||
198 | * @since 1.7.9 |
||
199 | */ |
||
200 | public function load_column( $params ) { |
||
0 ignored issues
–
show
The return type could not be reliably inferred; please add a
@return annotation.
Our type inference engine in quite powerful, but sometimes the code does not
provide enough clues to go by. In these cases we request you to add a ![]() |
|||
201 | |||
202 | pods_deprecated( 'PodsAPI::load_column', '2.0', 'PodsAPI::load_field' ); |
||
203 | |||
204 | return $this->obj->load_field( $params ); |
||
205 | } |
||
206 | } |
||
207 |
The PSR-1: Basic Coding Standard recommends that a file should either introduce new symbols, that is classes, functions, constants or similar, or have side effects. Side effects are anything that executes logic, like for example printing output, changing ini settings or writing to a file.
The idea behind this recommendation is that merely auto-loading a class should not change the state of an application. It also promotes a cleaner style of programming and makes your code less prone to errors, because the logic is not spread out all over the place.
To learn more about the PSR-1, please see the PHP-FIG site on the PSR-1.