Completed
Push — master ( b8d8a2...060750 )
by Gino
06:18 queued 02:27
created

AdminPhpCode   B

Complexity

Total Complexity 36

Size/Duplication

Total Lines 481
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 1
Metric Value
wmc 36
lcom 1
cbo 1
dl 0
loc 481
rs 8.8

25 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 5 1
A getInstance() 0 9 2
A getAdminIncludeHeader() 0 4 1
A getAdminSwitch() 0 10 1
A getAdminStringCaseDefaultSwitch() 0 11 1
A getAdminStringCaseSwitch() 0 10 1
A getAdminNumericCaseDefaultSwitch() 0 11 1
A getAdminNumericCaseSwitch() 0 10 1
A getAdminTemplateMain() 0 8 1
A getAdminXoopsTplAssign() 0 8 1
A getAdminXoopsTplAppend() 0 8 1
A getAdminXoopsTplAppendByRef() 0 8 1
A getAdminItemButton() 0 11 1
A getAdminAddNavigation() 0 8 1
A getAdminObjHandlerCreate() 0 8 1
C getAdminPhpCodeSetVarsObjects() 0 41 11
A getAdminPhpCodeXoopsSecurity() 0 10 1
A getAdminPhpCodeInsertData() 0 11 1
A getAdminPhpCodeGetFormError() 0 11 1
A getAdminPhpCodeGetFormId() 0 11 1
A getAdminPhpCodeGetObjHandlerId() 0 8 1
A getAdminPhpCodeDelete() 0 22 1
A getAdminPhpCodeUpdate() 0 19 1
A getAdminPhpCodeGetDisplayTpl() 0 4 1
A getAdminIncludeFooter() 0 4 1
1
<?php
0 ignored issues
show
Coding Style Compatibility introduced by
For compatibility and reusability of your code, PSR1 recommends that a file should introduce either new symbols (like classes, functions, etc.) or have side-effects (like outputting something, or including other files), but not both at the same time. The first symbol is defined on line 28 and the first side effect is on line 24.

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.

Loading history...
2
3
/*
4
 You may not change or alter any portion of this comment or credits
5
 of supporting developers from this source code or any supporting source code
6
 which is considered copyrighted (c) material of the original comment or credit authors.
7
8
 This program is distributed in the hope that it will be useful,
9
 but WITHOUT ANY WARRANTY; without even the implied warranty of
10
 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
11
 */
12
/**
13
 * tdmcreate module.
14
 *
15
 * @copyright       The XOOPS Project http://sourceforge.net/projects/xoops/
16
 * @license         GNU GPL 2 (http://www.gnu.org/licenses/old-licenses/gpl-2.0.html)
17
 *
18
 * @since           2.5.0
19
 *
20
 * @author          Txmod Xoops http://www.txmodxoops.org
21
 *
22
 * @version         $Id: AdminPhpCode.php 12258 2014-01-02 09:33:29Z timgno $
23
 */
24
defined('XOOPS_ROOT_PATH') or die('Restricted access');
0 ignored issues
show
Comprehensibility Best Practice introduced by
Using logical operators such as or instead of || is generally not recommended.

PHP has two types of connecting operators (logical operators, and boolean operators):

  Logical Operators Boolean Operator
AND - meaning and &&
OR - meaning or ||

The difference between these is the order in which they are executed. In most cases, you would want to use a boolean operator like &&, or ||.

Let’s take a look at a few examples:

// Logical operators have lower precedence:
$f = false or true;

// is executed like this:
($f = false) or true;


// Boolean operators have higher precedence:
$f = false || true;

// is executed like this:
$f = (false || true);

Logical Operators are used for Control-Flow

One case where you explicitly want to use logical operators is for control-flow such as this:

$x === 5
    or die('$x must be 5.');

// Instead of
if ($x !== 5) {
    die('$x must be 5.');
}

Since die introduces problems of its own, f.e. it makes our code hardly testable, and prevents any kind of more sophisticated error handling; you probably do not want to use this in real-world code. Unfortunately, logical operators cannot be combined with throw at this point:

// The following is currently a parse error.
$x === 5
    or throw new RuntimeException('$x must be 5.');

These limitations lead to logical operators rarely being of use in current PHP code.

Loading history...
25
/**
26
 * Class AdminPhpCode.
27
 */
28
class AdminPhpCode extends AdminObjects
0 ignored issues
show
Coding Style Compatibility introduced by
PSR1 recommends that each class must be in a namespace of at least one level to avoid collisions.

You can fix this by adding a namespace to your class:

namespace YourVendor;

class YourClass { }

When choosing a vendor namespace, try to pick something that is not too generic to avoid conflicts with other libraries.

Loading history...
29
{
30
    /*
31
    * @var string
32
    */
33
    protected $adminphpcode;
34
35
    /*
36
    *  @public function constructor
37
    *  @param null
38
    */
39
    /**
40
     *
41
     */
42
    public function __construct()
43
    {
44
        parent::__construct();
45
        $this->adminobjects = AdminObjects::getInstance();
0 ignored issues
show
Documentation Bug introduced by
It seems like \AdminObjects::getInstance() of type object<AdminObjects> is incompatible with the declared type string of property $adminobjects.

Our type inference engine has found an assignment to a property that is incompatible with the declared type of that property.

Either this assignment is in error or the assigned type should be added to the documentation/type hint for that property..

Loading history...
46
    }
47
48
    /*
49
    *  @static function &getInstance
50
    *  @param null
51
    */
52
    /**
53
     * @return AdminPhpCode
54
     */
55
    public static function &getInstance()
56
    {
57
        static $instance = false;
58
        if (!$instance) {
59
            $instance = new self();
60
        }
61
62
        return $instance;
63
    }
64
65
    /*
66
    *  @public function getAdminIncludeHeader
67
    *  @param null
68
    *  @return string
69
    */
70
    public function getAdminIncludeHeader()
71
    {
72
        return "include __DIR__ . '/header.php';\n";
73
    }
74
75
    /**
76
     *  @public function getAdminSwitch
77
     *
78
     *  @param $content
79
     *
80
     *  @return string
81
     */
82
    public function getAdminSwitch($content)
83
    {
84
        $ret = <<<EOT
85
switch {\n
86
	\t{$content}
87
}\n
88
EOT;
89
90
        return $ret;
91
    }
92
93
    /**
94
     *  @public function getAdminStringCaseDefaultSwitch
95
     *
96
     *  @param $case
97
     *  @param $content
98
     *
99
     *  @return string
100
     */
101
    public function getAdminStringCaseDefaultSwitch($case = 'list', $content)
102
    {
103
        $ret = <<<EOT
104
    case '{$case}':
105
    default:\n
106
	\t\t{$content}
107
    break;\n
108
EOT;
109
110
        return $ret;
111
    }
112
113
    /**
114
     *  @public function getAdminStringCaseSwitch
115
     *
116
     *  @param $case
117
     *  @param $content
118
     *
119
     *  @return string
120
     */
121
    public function getAdminStringCaseSwitch($case = 'list', $content)
122
    {
123
        $ret = <<<EOT
124
    case '{$case}':\n
125
	\t\t{$content}
126
    break;\n
127
EOT;
128
129
        return $ret;
130
    }
131
132
    /*
133
    *  @public function getAdminNumericCaseDefaultSwitch
134
    *  @param $case
135
    *  @return string
136
    */
137
    public function getAdminNumericCaseDefaultSwitch($case = 1)
138
    {
139
        $ret = <<<EOT
140
    case {$case}:
141
    default:\n
142
	\t\t{$content}
0 ignored issues
show
Bug introduced by
The variable $content does not exist. Did you forget to declare it?

This check marks access to variables or properties that have not been declared yet. While PHP has no explicit notion of declaring a variable, accessing it before a value is assigned to it is most likely a bug.

Loading history...
143
    break;\n
144
EOT;
145
146
        return $ret;
147
    }
148
149
    /*
150
    *  @public function getAdminNumericCaseSwitch
151
    *  @param $case
152
    *  @return string
153
    */
154
    public function getAdminNumericCaseSwitch($case = 1)
155
    {
156
        $ret = <<<EOT
157
    case {$case}:\n
158
	\t\t{$content}
0 ignored issues
show
Bug introduced by
The variable $content does not exist. Did you forget to declare it?

This check marks access to variables or properties that have not been declared yet. While PHP has no explicit notion of declaring a variable, accessing it before a value is assigned to it is most likely a bug.

Loading history...
159
    break;\n
160
EOT;
161
162
        return $ret;
163
    }
164
165
    /*
166
    *  @public function getAdminTemplateMain
167
    *  @param $moduleDirname
168
    *  @param $tableName
169
    *  @return string
170
    */
171
    public function getAdminTemplateMain($moduleDirname, $tableName)
172
    {
173
        $ret = <<<EOT
174
        \$templateMain = '{$moduleDirname}_admin_{$tableName}.tpl';\n
175
EOT;
176
177
        return $ret;
178
    }
179
180
    /**
181
     *  @public function getAdminXoopsTplAssign
182
     *
183
     *  @param string $tplString
184
     *  @param string $phpRender
185
     *
186
     *  @return string
187
     */
188
    public function getAdminXoopsTplAssign($tplString, $phpRender)
189
    {
190
        $ret = <<<EOT
191
        \$GLOBALS['xoopsTpl']->assign('{$tplString}', \${$phpRender});\n
192
EOT;
193
194
        return $ret;
195
    }
196
197
    /**
198
     *  @public function getAdminXoopsTplAppend
199
     *
200
     *  @param string $tplString
201
     *  @param string $phpRender
202
     *
203
     *  @return string
204
     */
205
    public function getAdminXoopsTplAppend($tplString, $phpRender)
206
    {
207
        $ret = <<<EOT
208
        \$GLOBALS['xoopsTpl']->append('{$tplString}', \${$phpRender});\n
209
EOT;
210
211
        return $ret;
212
    }
213
214
    /**
215
     *  @public function getAdminXoopsTplAppendByRef
216
     *
217
     *  @param string $tplString
218
     *  @param string $phpRender
219
     *
220
     *  @return string
221
     */
222
    public function getAdminXoopsTplAppendByRef($tplString, $phpRender)
223
    {
224
        $ret = <<<EOT
225
        \$GLOBALS['xoopsTpl']->appendByRef('{$tplString}', \${$phpRender});\n
226
EOT;
227
228
        return $ret;
229
    }
230
231
    /*
232
    *  @public function getAdminTemplateMain
233
    *  @param $moduleDirname
234
    *  @param $tableName
235
    *  @param $admin
236
    *  @return string
237
    */
238
    public function getAdminItemButton($moduleDirname, $tableName, $admin = false)
0 ignored issues
show
Unused Code introduced by
The parameter $moduleDirname is not used and could be removed.

This check looks from parameters that have been defined for a function or method, but which are not used in the method body.

Loading history...
Unused Code introduced by
The parameter $admin is not used and could be removed.

This check looks from parameters that have been defined for a function or method, but which are not used in the method body.

Loading history...
239
    {
240
        $ret = <<<EOT
241
        \$adminMenu->addItemButton({$language}ADD_{$stuTableSoleName}, '{$tableName}.php?op=new', 'add');
0 ignored issues
show
Bug introduced by
The variable $language does not exist. Did you forget to declare it?

This check marks access to variables or properties that have not been declared yet. While PHP has no explicit notion of declaring a variable, accessing it before a value is assigned to it is most likely a bug.

Loading history...
Bug introduced by
The variable $stuTableSoleName does not exist. Did you forget to declare it?

This check marks access to variables or properties that have not been declared yet. While PHP has no explicit notion of declaring a variable, accessing it before a value is assigned to it is most likely a bug.

Loading history...
242
        \$adminMenu->addItemButton({$language}{$stuTableName}_LIST, '{$tableName}.php', 'list');
0 ignored issues
show
Bug introduced by
The variable $stuTableName does not exist. Did you mean $tableName?

This check looks for variables that are accessed but have not been defined. It raises an issue if it finds another variable that has a similar name.

The variable may have been renamed without also renaming all references.

Loading history...
243
        \$GLOBALS['xoopsTpl']->assign('navigation', \$adminMenu->addNavigation('{$tableName}.php'));
244
        \$GLOBALS['xoopsTpl']->assign('buttons', \$adminMenu->renderButton());\n
245
EOT;
246
247
        return $ret;
248
    }
249
250
    /**
251
     *  @public function getAdminAddNavigation
252
     *
253
     *  @param $tableName
254
     *
255
     *  @return string
256
     */
257
    public function getAdminAddNavigation($tableName)
258
    {
259
        $ret = <<<EOT
260
        \$GLOBALS['xoopsTpl']->assign('navigation', \$adminMenu->addNavigation('{$tableName}.php'));\n
261
EOT;
262
263
        return $ret;
264
    }
265
266
    /**
267
     *  @public function getAdminObjHandlerCreate
268
     *
269
     *  @param string $tableName
270
     *
271
     *  @return string
272
     */
273
    public function getAdminObjHandlerCreate($tableName)
274
    {
275
        $ret = <<<EOT
276
        \${$tableName}Obj =& \${$tableName}Handler->create();\n
277
EOT;
278
279
        return $ret;
280
    }
281
282
    /**
283
     *  @public function getAdminPhpCodeSetVarsObjects
284
     *
285
     *  @param $moduleDirname
286
     *  @param $tableName
287
     *  @param $fields
288
     *
289
     *  @return string
290
     */
291
    public function getAdminPhpCodeSetVarsObjects($moduleDirname, $tableName, $fields)
292
    {
293
        $ret = <<<EOT
294
        // Set Vars\n
295
EOT;
296
        foreach (array_keys($fields) as $f) {
297
            $fieldName = $fields[$f]->getVar('field_name');
298
            $fieldElement = $fields[$f]->getVar('field_element');
299
            if ($f > 0) { // If we want to hide field id
300
                switch ($fieldElement) {
301
                    case 5:
302
                    case 6:
303
                        $ret .= $this->adminobjects->getCheckBoxOrRadioYNSetVar($tableName, $fieldName);
0 ignored issues
show
Bug introduced by
The method getCheckBoxOrRadioYNSetVar cannot be called on $this->adminobjects (of type string).

Methods can only be called on objects. This check looks for methods being called on variables that have been inferred to never be objects.

Loading history...
304
                        break;
305
                    case 11:
306
                        $ret .= $this->adminobjects->getImageListSetVar($moduleDirname, $tableName, $fieldName);
0 ignored issues
show
Bug introduced by
The method getImageListSetVar cannot be called on $this->adminobjects (of type string).

Methods can only be called on objects. This check looks for methods being called on variables that have been inferred to never be objects.

Loading history...
307
                        break;
308
                    case 12:
309
                        $ret .= $this->adminobjects->getUrlFileSetVar($moduleDirname, $tableName, $fieldName);
0 ignored issues
show
Bug introduced by
The method getUrlFileSetVar cannot be called on $this->adminobjects (of type string).

Methods can only be called on objects. This check looks for methods being called on variables that have been inferred to never be objects.

Loading history...
310
                        break;
311
                    case 13:
312
                        if (1 == $fields[$f]->getVar('field_main')) {
313
                            $fieldMain = $fieldName;
314
                        }
315
                        $ret .= $this->adminobjects->getUploadImageSetVar($moduleDirname, $tableName, $fieldName, $fieldMain);
0 ignored issues
show
Bug introduced by
The variable $fieldMain does not seem to be defined for all execution paths leading up to this point.

If you define a variable conditionally, it can happen that it is not defined for all execution paths.

Let’s take a look at an example:

function myFunction($a) {
    switch ($a) {
        case 'foo':
            $x = 1;
            break;

        case 'bar':
            $x = 2;
            break;
    }

    // $x is potentially undefined here.
    echo $x;
}

In the above example, the variable $x is defined if you pass “foo” or “bar” as argument for $a. However, since the switch statement has no default case statement, if you pass any other value, the variable $x would be undefined.

Available Fixes

  1. Check for existence of the variable explicitly:

    function myFunction($a) {
        switch ($a) {
            case 'foo':
                $x = 1;
                break;
    
            case 'bar':
                $x = 2;
                break;
        }
    
        if (isset($x)) { // Make sure it's always set.
            echo $x;
        }
    }
    
  2. Define a default value for the variable:

    function myFunction($a) {
        $x = ''; // Set a default which gets overridden for certain paths.
        switch ($a) {
            case 'foo':
                $x = 1;
                break;
    
            case 'bar':
                $x = 2;
                break;
        }
    
        echo $x;
    }
    
  3. Add a value for the missing path:

    function myFunction($a) {
        switch ($a) {
            case 'foo':
                $x = 1;
                break;
    
            case 'bar':
                $x = 2;
                break;
    
            // We add support for the missing case.
            default:
                $x = '';
                break;
        }
    
        echo $x;
    }
    
Loading history...
Bug introduced by
The method getUploadImageSetVar cannot be called on $this->adminobjects (of type string).

Methods can only be called on objects. This check looks for methods being called on variables that have been inferred to never be objects.

Loading history...
316
                        break;
317
                    case 14:
318
                        $ret .= $this->adminobjects->getUploadFileSetVar($moduleDirname, $tableName, $fieldName);
0 ignored issues
show
Bug introduced by
The method getUploadFileSetVar cannot be called on $this->adminobjects (of type string).

Methods can only be called on objects. This check looks for methods being called on variables that have been inferred to never be objects.

Loading history...
319
                        break;
320
                    case 15:
321
                        $ret .= $this->adminobjects->getTextDateSelectSetVar($tableName, $fieldName);
0 ignored issues
show
Bug introduced by
The method getTextDateSelectSetVar cannot be called on $this->adminobjects (of type string).

Methods can only be called on objects. This check looks for methods being called on variables that have been inferred to never be objects.

Loading history...
322
                        break;
323
                    default:
324
                        $ret .= $this->adminobjects->getSimpleSetVar($tableName, $fieldName);
0 ignored issues
show
Bug introduced by
The method getSimpleSetVar cannot be called on $this->adminobjects (of type string).

Methods can only be called on objects. This check looks for methods being called on variables that have been inferred to never be objects.

Loading history...
325
                        break;
326
                }
327
            }
328
        }
329
330
        return $ret;
331
    }
332
333
    /**
334
     *  @public function getAdminPhpCodeXoopsSecurity
335
     *
336
     *  @param $tableName
337
     *
338
     *  @return string
339
     */
340
    public function getAdminPhpCodeXoopsSecurity($tableName)
341
    {
342
        $ret = <<<EOT
343
        if ( !\$GLOBALS['xoopsSecurity']->check() ) {
344
			redirect_header('{$tableName}.php', 3, implode(',', \$GLOBALS['xoopsSecurity']->getErrors()));
345
        }\n
346
EOT;
347
348
        return $ret;
349
    }
350
351
    /*
352
    *  @public function getAdminPhpCodeInsertData
353
    *  @param $tableName
354
    *  @param $language
355
    *  @return string
356
    */
357
    public function getAdminPhpCodeInsertData($tableName, $language)
358
    {
359
        $ret = <<<EOT
360
        // Insert Data
361
        if (\${$tableName}Handler->insert(\${$tableName}Obj)) {
362
			redirect_header('{$tableName}.php?op=list', 2, {$language}FORM_OK);
363
        }\n
364
EOT;
365
366
        return $ret;
367
    }
368
369
    /**
370
     *  @public function getAdminPhpCodeGetFormError
371
     *
372
     *  @param $tableName
373
     *
374
     *  @return string
375
     */
376
    public function getAdminPhpCodeGetFormError($tableName)
377
    {
378
        $ret = <<<EOT
379
        // Get Form
380
        \$GLOBALS['xoopsTpl']->assign('error', \${$tableName}Obj->getHtmlErrors());
381
        \$form =& \${$tableName}Obj->getForm();
382
        \$GLOBALS['xoopsTpl']->assign('form', \$form->render());\n
383
EOT;
384
385
        return $ret;
386
    }
387
388
    /**
389
     *  @public function getAdminPhpCodeGetFormId
390
     *
391
     *  @param string $tableName
392
     *  @param string $fieldId
393
     *
394
     *  @return string
395
     */
396
    public function getAdminPhpCodeGetFormId($tableName, $fieldId)
397
    {
398
        $ret = <<<EOT
399
        // Get Form
400
        \${$tableName}Obj = \${$tableName}Handler->get(\${$fieldId});
401
        \$form = \${$tableName}Obj->getForm();
402
        \$GLOBALS['xoopsTpl']->assign('form', \$form->render());\n
403
EOT;
404
405
        return $ret;
406
    }
407
408
    /**
409
     *  @public function getAdminPhpCodeGetObjHandlerId
410
     *
411
     *  @param string $tableName
412
     *  @param string $fieldId
413
     *
414
     *  @return string
415
     */
416
    public function getAdminPhpCodeGetObjHandlerId($tableName, $fieldId)
417
    {
418
        $ret = <<<EOT
419
        \${$tableName}Obj =& \${$tableName}Handler->get(\${$fieldId});\n
420
EOT;
421
422
        return $ret;
423
    }
424
425
    /*
426
    *  @public function getAdminPhpCodeDelete
427
    *  @param string $tableName
428
    *  @param string $language
429
    *  @param string $fieldId
430
    *  @param string $fieldMain
431
    *  @return string
432
    */
433
    public function getAdminPhpCodeDelete($tableName, $language, $fieldId, $fieldMain)
434
    {
435
        $ret = <<<EOT
436
    case 'delete':
437
        \${$tableName}Obj =& \${$tableName}Handler->get(\${$fieldId});
438
        if (isset(\$_REQUEST['ok']) && 1 == \$_REQUEST['ok']) {
439
            if ( !\$GLOBALS['xoopsSecurity']->check() ) {
440
                redirect_header('{$tableName}.php', 3, implode(', ', \$GLOBALS['xoopsSecurity']->getErrors()));
441
            }
442
            if (\${$tableName}Handler->delete(\${$tableName}Obj)) {
443
                redirect_header('{$tableName}.php', 3, {$language}FORMDELOK);
444
            } else {
445
                echo \${$tableName}Obj->getHtmlErrors();
446
            }
447
        } else {
448
            xoops_confirm(array('ok' => 1, '{$fieldId}' => \${$fieldId}, 'op' => 'delete'), \$_SERVER['REQUEST_URI'], sprintf({$language}FORMSUREDEL, \${$tableName}Obj->getVar('{$fieldMain}')));
449
        }
450
    break;\n
451
EOT;
452
453
        return $ret;
454
    }
455
456
    /*
457
    *  @public function getAdminPhpCodeUpdate
458
    *  @param string $moduleDirname
459
    *  @param string $tableName
460
    *  @param string $language
461
    *  @param string $fieldId
462
    *  @param string $fieldMain
463
    *  @return string
464
    */
465
    public function getAdminPhpCodeUpdate($moduleDirname, $tableName, $language, $fieldId, $fieldMain)
0 ignored issues
show
Unused Code introduced by
The parameter $language is not used and could be removed.

This check looks from parameters that have been defined for a function or method, but which are not used in the method body.

Loading history...
Unused Code introduced by
The parameter $fieldMain is not used and could be removed.

This check looks from parameters that have been defined for a function or method, but which are not used in the method body.

Loading history...
466
    {
467
        $upModuleName = strtoupper($moduleDirname);
468
        $ret = <<<EOT
469
    case 'update':
470
        if (isset(\${$fieldId})) {
471
            \${$tableName}Obj =& \${$tableName}Handler->get(\${$fieldId});
472
        }
473
        \${$tableName}Obj->setVar("\${$tableName}_display", \$_POST["\${$tableName}_display"]);
474
475
        if (\${$tableName}Handler->insert(\${$tableName}Obj)) {
476
            redirect_header("\${$tableName}.php", 3, _AM_{$upModuleName}_FORMOK);
477
        }
478
        echo \${$tableName}Obj->getHtmlErrors();
479
    break;\n
480
EOT;
481
482
        return $ret;
483
    }
484
485
    /**
486
     *  @public function getAdminPhpCodeGetDisplayTpl
487
     *
488
     *  @param null
489
     *
490
     *  @return string
491
     */
492
    public function getAdminPhpCodeGetDisplayTpl()
493
    {
494
        return "\t\t\$GLOBALS['xoopsTpl']->display(\"db:{\$templateMain}\");\n";
495
    }
496
497
    /*
498
    *  @public function getAdminIncludeFooter
499
    *  @param null
500
    */
501
    /**
502
     * @return string
503
     */
504
    public function getAdminIncludeFooter()
505
    {
506
        return "include __DIR__ . '/footer.php';";
507
    }
508
}
509