Skip to content

Commit f77e72c

Browse files
committed
feat:delete behaviors,can use by 'as BehaviorName'
1 parent b2ada90 commit f77e72c

File tree

2 files changed

+0
-36
lines changed

2 files changed

+0
-36
lines changed

Module.php

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -18,10 +18,6 @@ class Module extends \yii\base\Module implements BootstrapInterface
1818
* @var array
1919
*/
2020
public $aliases = [];
21-
/**
22-
* @var array
23-
*/
24-
public $extraBehaviors = [];
2521
/**
2622
* @var array
2723
*/
@@ -52,14 +48,6 @@ public function bootstrap($app)
5248
}
5349
}
5450

55-
/**
56-
* @inheritdoc
57-
*/
58-
public function behaviors()
59-
{
60-
return array_merge(parent::behaviors(), $this->extraBehaviors);
61-
}
62-
6351
/**
6452
* @return Log[]
6553
*/

README.md

Lines changed: 0 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -62,27 +62,3 @@ or if you have enabled pretty URLs, you may use the following URL:
6262
```php
6363
http://localhost/path/to/log-reader
6464
```
65-
66-
Advanced Usage
67-
-----
68-
69-
you can config module params `extraBehaviors` to add behaviors, like user login filter:
70-
71-
```php
72-
return [
73-
'bootstrap' => ['log-reader'],
74-
'modules' => [
75-
'log-reader' => [
76-
'class' => 'kriss\logReader\Module',
77-
'extraBehaviors' => [
78-
'login-filter' => 'xxx/action/UserLoginFilter'
79-
],
80-
'aliases' => [
81-
'Frontend Errors' => '@frontend/runtime/logs/app.log',
82-
'Backend Errors' => '@backend/runtime/logs/app.log',
83-
'Console Errors' => '@console/runtime/logs/app.log',
84-
],
85-
],
86-
],
87-
];
88-
```

0 commit comments

Comments
 (0)