| 1 |  |  | <?php | 
            
                                                                                                            
                            
            
                                    
            
            
                | 2 |  |  | /** | 
            
                                                                                                            
                            
            
                                    
            
            
                | 3 |  |  |  * Hosting Plugin for HiPanel | 
            
                                                                                                            
                            
            
                                    
            
            
                | 4 |  |  |  * | 
            
                                                                                                            
                            
            
                                    
            
            
                | 5 |  |  |  * @link      https://github.com/hiqdev/hipanel-module-hosting | 
            
                                                                                                            
                            
            
                                    
            
            
                | 6 |  |  |  * @package   hipanel-module-hosting | 
            
                                                                                                            
                            
            
                                    
            
            
                | 7 |  |  |  * @license   BSD-3-Clause | 
            
                                                                                                            
                            
            
                                    
            
            
                | 8 |  |  |  * @copyright Copyright (c) 2015-2017, HiQDev (http://hiqdev.com/) | 
            
                                                                                                            
                            
            
                                    
            
            
                | 9 |  |  |  */ | 
            
                                                                                                            
                            
            
                                    
            
            
                | 10 |  |  |  | 
            
                                                                                                            
                            
            
                                    
            
            
                | 11 |  |  | /** | 
            
                                                                                                            
                            
            
                                    
            
            
                | 12 |  |  |  * @see    http://hiqdev.com/hipanel-module-hosting | 
            
                                                                                                            
                            
            
                                    
            
            
                | 13 |  |  |  * @license http://hiqdev.com/hipanel-module-hosting/license | 
            
                                                                                                            
                            
            
                                    
            
            
                | 14 |  |  |  * @copyright Copyright (c) 2015 HiQDev | 
            
                                                                                                            
                            
            
                                    
            
            
                | 15 |  |  |  */ | 
            
                                                                                                            
                            
            
                                    
            
            
                | 16 |  |  |  | 
            
                                                                                                            
                            
            
                                    
            
            
                | 17 |  |  | namespace hipanel\modules\hosting\models; | 
            
                                                                                                            
                            
            
                                    
            
            
                | 18 |  |  |  | 
            
                                                                                                            
                            
            
                                    
            
            
                | 19 |  |  | use Yii; | 
            
                                                                                                            
                            
            
                                    
            
            
                | 20 |  |  |  | 
            
                                                                                                            
                            
            
                                    
            
            
                | 21 |  |  | class Request extends \hipanel\base\Model | 
            
                                                                                                            
                            
            
                                    
            
            
                | 22 |  |  | { | 
            
                                                                                                            
                            
            
                                    
            
            
                | 23 |  |  |     use \hipanel\base\ModelTrait; | 
            
                                                                                                            
                            
            
                                    
            
            
                | 24 |  |  |  | 
            
                                                                                                            
                                                                
            
                                    
            
            
                | 25 |  |  |     /** {@inheritdoc} */ | 
            
                                                                        
                            
            
                                    
            
            
                | 26 |  |  |     public function rules() | 
            
                                                                        
                            
            
                                    
            
            
                | 27 |  |  |     { | 
            
                                                                        
                            
            
                                    
            
            
                | 28 |  |  |         return [ | 
            
                                                                        
                            
            
                                    
            
            
                | 29 |  |  |             [['id', 'object_id', 'service_id', 'client_id', 'account_id', 'server_id'], 'integer'], | 
            
                                                                        
                            
            
                                    
            
            
                | 30 |  |  |             [['realm', 'service', 'client', 'account', 'server', 'type_ids'], 'safe'], | 
            
                                                                        
                            
            
                                    
            
            
                | 31 |  |  |             [['child', 'parent'], 'string'], | 
            
                                                                        
                            
            
                                    
            
            
                | 32 |  |  |             [['type', 'type_label', 'state', 'state_label', 'action', 'object_class', 'classes', 'class_label'], 'safe'], | 
            
                                                                        
                            
            
                                    
            
            
                | 33 |  |  |             [['parent_id', 'child_id', 'tries_left', 'pid', 'time_lag'], 'integer'], | 
            
                                                                        
                            
            
                                    
            
            
                | 34 |  |  |             [['object_name'], 'safe'], | 
            
                                                                        
                            
            
                                    
            
            
                | 35 |  |  |             [['time', 'create_time', 'update_time'], 'date'], | 
            
                                                                        
                            
            
                                    
            
            
                | 36 |  |  |             [['id'], 'integer', 'on' => ['delete']], | 
            
                                                                        
                            
            
                                    
            
            
                | 37 |  |  |         ]; | 
            
                                                                        
                            
            
                                    
            
            
                | 38 |  |  |     } | 
            
                                                                                                            
                            
            
                                    
            
            
                | 39 |  |  |  | 
            
                                                                                                            
                            
            
                                    
            
            
                | 40 |  |  |     /** {@inheritdoc} */ | 
            
                                                                                                            
                            
            
                                    
            
            
                | 41 |  |  |     public function attributeLabels() | 
            
                                                                                                            
                            
            
                                    
            
            
                | 42 |  |  |     { | 
            
                                                                                                            
                            
            
                                    
            
            
                | 43 |  |  |         return $this->mergeAttributeLabels([ | 
            
                                                                                                            
                            
            
                                    
            
            
                | 44 |  |  |             'object_name' => Yii::t('hipanel:hosting', 'Object Name'), | 
            
                                                                                                            
                            
            
                                    
            
            
                | 45 |  |  |             'object' => Yii::t('hipanel:hosting', 'Object'), | 
            
                                                                                                            
                            
            
                                    
            
            
                | 46 |  |  |             'classes' => Yii::t('hipanel:hosting', 'Object'), | 
            
                                                                                                            
                            
            
                                    
            
            
                | 47 |  |  |             'type_ids' => Yii::t('hipanel', 'Types'), | 
            
                                                                                                            
                            
            
                                    
            
            
                | 48 |  |  |             'time' => Yii::t('hipanel:hosting', 'Scheduled time'), | 
            
                                                                                                            
                            
            
                                    
            
            
                | 49 |  |  |             'pid' => Yii::t('hipanel:hosting', 'PID'), | 
            
                                                                                                            
                            
            
                                    
            
            
                | 50 |  |  |         ]); | 
            
                                                                                                            
                            
            
                                    
            
            
                | 51 |  |  |     } | 
            
                                                                                                            
                            
            
                                    
            
            
                | 52 |  |  |  | 
            
                                                                                                            
                            
            
                                    
            
            
                | 53 |  |  |     public function getObject(): string | 
            
                                                                                                            
                            
            
                                    
            
            
                | 54 |  |  |     { | 
            
                                                                                                            
                            
            
                                    
            
            
                | 55 |  |  |         return sprintf('%s %s', $this->server, empty($this->object_name) ? $this->class_label : $this->object_name); | 
                            
                    |  |  |  | 
                                                                                        
                                                                                            
                                                                                            
                                                                                     | 
            
                                                                                                            
                            
            
                                    
            
            
                | 56 |  |  |     } | 
            
                                                                                                            
                                                                
            
                                    
            
            
                | 57 |  |  | } | 
            
                                                        
            
                                    
            
            
                | 58 |  |  |  | 
            
                        
Since your code implements the magic getter
_get, this function will be called for any read access on an undefined variable. You can add the@propertyannotation to your class or interface to document the existence of this variable.If the property has read access only, you can use the @property-read annotation instead.
Of course, you may also just have mistyped another name, in which case you should fix the error.
See also the PhpDoc documentation for @property.