mirror of
https://github.com/yiisoft/yii2.git
synced 2025-08-26 06:15:19 +08:00
Removed unnecessary hyphens (#15914)
This commit is contained in:

committed by
Alexander Makarov

parent
8a80e48f1d
commit
5a66299962
@ -42,8 +42,8 @@ class MyBehavior extends Behavior
|
||||
}
|
||||
```
|
||||
|
||||
The above code defines the behavior class `app\components\MyBehavior`, with two properties--
|
||||
`prop1` and `prop2`--and one method `foo()`. Note that property `prop2`
|
||||
The above code defines the behavior class `app\components\MyBehavior`, with two properties
|
||||
`prop1` and `prop2` and one method `foo()`. Note that property `prop2`
|
||||
is defined via the getter `getProp2()` and the setter `setProp2()`. This is the case because [[yii\base\Behavior]] extends [[yii\base\BaseObject]] and therefore supports defining [properties](concept-properties.md) via getters and setters.
|
||||
|
||||
Because this class is a behavior, when it is attached to a component, that component will then also have the `prop1` and `prop2` properties and the `foo()` method.
|
||||
|
Reference in New Issue
Block a user