-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathAuth.php
33 lines (28 loc) · 920 Bytes
/
Auth.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
<?php
namespace yiicod\auth;
use Yii;
use yii\base\BootstrapInterface;
use yii\base\Component;
use yii\helpers\ArrayHelper;
class Auth extends Component implements BootstrapInterface
{
/**
* @var array Models settings
*/
public $modelMap = [];
public function bootstrap($qpp)
{
//Merge main extension config with local extension config
$config = include(dirname(__FILE__) . '/config/main.php');
foreach ($config as $key => $value) {
if (is_array($value)) {
$this->{$key} = ArrayHelper::merge($value, $this->{$key});
} elseif (null === $this->{$key}) {
$this->{$key} = $value;
}
}
Yii::setAlias('@yiicod', realpath(dirname(__FILE__) . '/..'));
// Namespace for migration
Yii::setAlias('@yiicod_auth_migrations', realpath(dirname(__FILE__) . '/migrations'));
}
}