public function only(array $array)
  {
    $data = [];

    foreach($array as $field) {
      if ($this->has($field)) {
        $data[$field] = $this->data[$field];
      }
    }

    return $data;
  }
public function only(array $array)
  {
    $data = [];

    foreach($array as $field) {
      if ($this->has($field)) {
        $data[$field] = $this->data[$field];
      }
    }

    return $data;
  }
public function only ( array $ array ) { $ data = [ ] ; foreach ( $ array as $ field ) { if ( $ this -> has ( $ field ) ) { $ data [ $ field ] = $ this -> data [ $ field ] ; } } return $ data ; }
Grab selected fields.

@param array $array
@return array $data
Grab selected fields .