Exemplo n.º 1
0
 /**
  * Method to get an object containing all of the table columns and values.
  *
  * @param   JTableInterface  $table  JTable object.
  *
  * @return  stdClass  Contains all of the columns and values.
  *
  * @since   3.2
  */
 public function getDataObject(JTableInterface $table)
 {
     $fields = $table->getFields();
     $dataObject = new stdClass();
     foreach ($fields as $field) {
         $fieldName = $field->Field;
         $dataObject->{$fieldName} = $table->get($fieldName);
     }
     return $dataObject;
 }