Completed
Push — development ( cfd391...deed4d )
by Andrij
12:03
created

BaseAdminController::autoloadModules()   B

Complexity

Conditions 6
Paths 3

Size

Total Lines 30
Code Lines 19

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 6
eloc 19
nc 3
nop 0
dl 0
loc 30
rs 8.439
c 0
b 0
f 0
1
<?php
2
3
/**
4
 * @property Lib_admin lib_admin
5
 */
6
class BaseAdminController extends MY_Controller
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...
7
{
8
9
    /**
10
     * @var string
11
     */
12
    public static $currentLocale;
13
14
    /**
15
     * @var bool
16
     */
17
    private static $adminAutoLoaded = false;
0 ignored issues
show
Unused Code introduced by
The property $adminAutoLoaded is not used and could be removed.

This check marks private properties in classes that are never used. Those properties can be removed.

Loading history...
18
19
    public function __construct() {
20
        parent::__construct();
21
22
        $lang = new MY_Lang();
23
        $lang->load('admin');
24
25
        $this->load->library('Permitions');
26
        if (PHP_SAPI != 'cli') {
27
            Permitions::checkPermitions();
28
        }
29
30
        $this->load->library('lib_admin');
31
        $this->lib_admin->init_settings();
32
        \CMSFactory\AdminLoader::getInstance()->adminAutoload();
33
    }
34
35
}