title: Yii2 model show empty logo on print_r($model->attributes). how can i get its value
body: <p>i have a model in Yii2 which i have print out. i want to get value test.jpg stored in logo attribute. How can i get this value from this model. I have tried pirnt_r($model->attributes) but it return empty value in logo field. Is there any way to skip the inatail empty value of log and get the test.jpg value of logo field.</p>
  
  <pre><code>backend\models\UserProfiles Object
  (
  [logo] =&gt; 
  [cover] =&gt; 
  [_attributes:yii\db\BaseActiveRecord:private] =&gt; Array
      (
          [id] =&gt; 2
          [date_created] =&gt; 2017-04-19 08:02:29
          [status] =&gt; 1
          [logo] =&gt; test.jpg
          [cover] =&gt; test (2).jpg
          [website] =&gt; wqeqww
          [address] =&gt; qweqweqw
          [about] =&gt; qweqwe
          [phone] =&gt; qweqweq
          [full_name] =&gt; qweqwe
          [city] =&gt; qweqweq
          [country] =&gt; qweqeqe
          [profile_type] =&gt; Type 1
          [user_id] =&gt; 2
      )
  
  [_oldAttributes:yii\db\BaseActiveRecord:private] =&gt; Array
      (
          [id] =&gt; 2
          [date_created] =&gt; 2017-04-19 08:02:29
          [status] =&gt; 1
          [logo] =&gt; test.jpg
          [cover] =&gt; test (2).jpg
          [website] =&gt; wqeqww
          [address] =&gt; qweqweqw
          [about] =&gt; qweqwe
          [phone] =&gt; qweqweq
          [full_name] =&gt; qweqwe
          [city] =&gt; qweqweq
          [country] =&gt; qweqeqe
          [profile_type] =&gt; Type 1
          [user_id] =&gt; 2
      )
  
  [_related:yii\db\BaseActiveRecord:private] =&gt; Array
      (
      )
  
  [_errors:yii\base\Model:private] =&gt; 
  [_validators:yii\base\Model:private] =&gt; ArrayObject Object
      (
          [storage:ArrayObject:private] =&gt; Array
              (
                  [0] =&gt; yii\validators\RequiredValidator Object
                      (
                          [skipOnEmpty] =&gt; 
                          [requiredValue] =&gt; 
                          [strict] =&gt; 
                          [message] =&gt; {attribute} cannot be blank.
                          [attributes] =&gt; Array
                              (
                                  [0] =&gt; id
                                  [1] =&gt; user_id
                              )
  
                          [on] =&gt; Array
                              (
                              )
  
                          [except] =&gt; Array
                              (
                              )
  
                          [skipOnError] =&gt; 1
                          [enableClientValidation] =&gt; 1
                          [isEmpty] =&gt; 
                          [when] =&gt; 
                          [whenClient] =&gt; 
                          [_events:yii\base\Component:private] =&gt; Array
                              (
                              )
  
                          [_behaviors:yii\base\Component:private] =&gt; 
                      )
  
                  [1] =&gt; yii\validators\NumberValidator Object
                      (
                          [integerOnly] =&gt; 1
                          [max] =&gt; 
                          [min] =&gt; 
                          [tooBig] =&gt; 
                          [tooSmall] =&gt; 
                          [integerPattern] =&gt; /^\s*[+-]?\d+\s*$/
                          [numberPattern] =&gt; /^\s*[-+]?[0-9]*\.?[0-9]+([eE][-+]?[0-9]+)?\s*$/
                          [attributes] =&gt; Array
                              (
                                  [0] =&gt; id
                                  [1] =&gt; user_id
                              )
  
                          [message] =&gt; {attribute} must be an integer.
                          [on] =&gt; Array
                              (
                              )
  
                          [except] =&gt; Array
                              (
                              )
  
                          [skipOnError] =&gt; 1
                          [skipOnEmpty] =&gt; 1
                          [enableClientValidation] =&gt; 1
                          [isEmpty] =&gt; 
                          [when] =&gt; 
                          [whenClient] =&gt; 
                          [_events:yii\base\Component:private] =&gt; Array
                              (
                              )
  
                          [_behaviors:yii\base\Component:private] =&gt; 
                      )
  
                  [2] =&gt; yii\validators\StringValidator Object
                      (
                          [length] =&gt; 
                          [max] =&gt; 
                          [min] =&gt; 
                          [message] =&gt; {attribute} must be a string.
                          [tooShort] =&gt; 
                          [tooLong] =&gt; 
                          [notEqual] =&gt; 
                          [encoding] =&gt; UTF-8
                          [attributes] =&gt; Array
                              (
                                  [0] =&gt; address
                                  [1] =&gt; about
                              )
  
                          [on] =&gt; Array
                              (
                              )
  
                          [except] =&gt; Array
                              (
                              )
  
                          [skipOnError] =&gt; 1
                          [skipOnEmpty] =&gt; 1
                          [enableClientValidation] =&gt; 1
                          [isEmpty] =&gt; 
                          [when] =&gt; 
                          [whenClient] =&gt; 
                          [_events:yii\base\Component:private] =&gt; Array
                              (
                              )
  
                          [_behaviors:yii\base\Component:private] =&gt; 
                      )
  
                  [3] =&gt; yii\validators\FileValidator Object
                      (
                          [extensions] =&gt; Array
                              (
                                  [0] =&gt; jpg
                                  [1] =&gt; png
                              )
  
                          [checkExtensionByMimeType] =&gt; 1
                          [mimeTypes] =&gt; Array
                              (
                              )
  
                          [minSize] =&gt; 
                          [maxSize] =&gt; 
                          [maxFiles] =&gt; 1
                          [message] =&gt; File upload failed.
                          [uploadRequired] =&gt; Please upload a file.
                          [tooBig] =&gt; The file "{file}" is too big. Its size cannot exceed {formattedLimit}.
                          [tooSmall] =&gt; The file "{file}" is too small. Its size cannot be smaller than {formattedLimit}.
                          [tooMany] =&gt; You can upload at most {limit, number} {limit, plural, one{file} other{files}}.
                          [wrongExtension] =&gt; Only files with these extensions are allowed: {extensions}.
                          [wrongMimeType] =&gt; Only files with these MIME types are allowed: {mimeTypes}.
                          [attributes] =&gt; Array
                              (
                                  [0] =&gt; logo
                                  [1] =&gt; cover
                              )
  
                          [on] =&gt; Array
                              (
                              )
  
                          [except] =&gt; Array
                              (
                              )
  
                          [skipOnError] =&gt; 1
                          [skipOnEmpty] =&gt; 
                          [enableClientValidation] =&gt; 1
                          [isEmpty] =&gt; 
                          [when] =&gt; 
                          [whenClient] =&gt; 
                          [_events:yii\base\Component:private] =&gt; Array
                              (
                              )
  
                          [_behaviors:yii\base\Component:private] =&gt; 
                      )
  
                  [4] =&gt; yii\validators\StringValidator Object
                      (
                          [length] =&gt; 
                          [max] =&gt; 45
                          [min] =&gt; 
                          [message] =&gt; {attribute} must be a string.
                          [tooShort] =&gt; 
                          [tooLong] =&gt; {attribute} should contain at most {max, number} {max, plural, one{character} other{characters}}.
                          [notEqual] =&gt; 
                          [encoding] =&gt; UTF-8
                          [attributes] =&gt; Array
                              (
                                  [0] =&gt; date_created
                                  [1] =&gt; status
                                  [2] =&gt; logo
                                  [3] =&gt; cover
                                  [4] =&gt; website
                                  [5] =&gt; phone
                                  [6] =&gt; full_name
                                  [7] =&gt; city
                                  [8] =&gt; country
                                  [9] =&gt; profile_type
                              )
  
                          [on] =&gt; Array
                              (
                              )
  
                          [except] =&gt; Array
                              (
                              )
  
                          [skipOnError] =&gt; 1
                          [skipOnEmpty] =&gt; 1
                          [enableClientValidation] =&gt; 1
                          [isEmpty] =&gt; 
                          [when] =&gt; 
                          [whenClient] =&gt; 
                          [_events:yii\base\Component:private] =&gt; Array
                              (
                              )
  
                          [_behaviors:yii\base\Component:private] =&gt; 
                      )
  
                  [5] =&gt; yii\validators\ExistValidator Object
                      (
                          [targetClass] =&gt; backend\models\User
                          [targetAttribute] =&gt; Array
                              (
                                  [user_id] =&gt; id
                              )
  
                          [filter] =&gt; 
                          [allowArray] =&gt; 
                          [targetAttributeJunction] =&gt; and
                          [attributes] =&gt; Array
                              (
                                  [0] =&gt; user_id
                              )
  
                          [message] =&gt; {attribute} is invalid.
                          [on] =&gt; Array
                              (
                              )
  
                          [except] =&gt; Array
                              (
                              )
  
                          [skipOnError] =&gt; 1
                          [skipOnEmpty] =&gt; 1
                          [enableClientValidation] =&gt; 1
                          [isEmpty] =&gt; 
                          [when] =&gt; 
                          [whenClient] =&gt; 
                          [_events:yii\base\Component:private] =&gt; Array
                              (
                              )
  
                          [_behaviors:yii\base\Component:private] =&gt; 
                      )
  
              )
  
      )
  
  [_scenario:yii\base\Model:private] =&gt; default
  [_events:yii\base\Component:private] =&gt; Array
      (
      )
  
  [_behaviors:yii\base\Component:private] =&gt; Array
      (
      )
  </code></pre>
  
  <p>)</p>