public function getAllReadings($side) { $r = array(); foreach ($this->{$side . '_readings'} as $reading) { $r[] = $reading; } return $r; }