PHP Yii::getObjectVars Examples

PHP Yii::getObjectVars - 2 examples found. These are the top rated real world PHP examples of Yii::getObjectVars extracted from open source projects. You can rate examples to help us improve the quality of examples.
Example #1
0
 /**
  * @inheritDoc
  */
 public function fields()
 {
     if ($this->entity instanceof Arrayable) {
         return $this->entity->fields();
     }
     $fields = is_array($this->entity) ? $this->entity : \Yii::getObjectVars($this->entity);
     $fields = array_keys($fields);
     $fields = array_combine($fields, $fields);
     return $fields;
 }
Example #2
0
 /**
  * @return array
  */
 public function fields()
 {
     $fields = array_keys(\Yii::getObjectVars($this));
     return array_combine($fields, $fields);
 }