| 1 | <?php |
||
| 26 | class File extends Behavior |
||
| 27 | { |
||
| 28 | /** |
||
| 29 | * @var string the attribute which holds the attachment. |
||
| 30 | */ |
||
| 31 | public $attribute = 'file'; |
||
| 32 | |||
| 33 | /** |
||
| 34 | * @var array the scenarios in which the behavior will be triggered |
||
| 35 | */ |
||
| 36 | public $scenarios = []; |
||
| 37 | |||
| 38 | /** |
||
| 39 | * @var string the attribute that will receive the file id |
||
| 40 | */ |
||
| 41 | public $savedAttribute; |
||
| 42 | |||
| 43 | /** |
||
| 44 | * @var UploadedFile the uploaded file instance. |
||
| 45 | */ |
||
| 46 | private $_file; |
||
| 47 | |||
| 48 | /** |
||
| 49 | * @return array |
||
| 50 | */ |
||
| 51 | public function events() |
||
| 58 | |||
| 59 | /** |
||
| 60 | * Event handler for beforeSave. |
||
| 61 | * @param \yii\base\ModelEvent|boolean $event |
||
| 62 | */ |
||
| 63 | public function saveUploadedFile($event) |
||
| 77 | } |
||
| 78 |
This check looks from parameters that have been defined for a function or method, but which are not used in the method body.