public function getPageViews($json = false) { $result = parent::getPageViews(); if ($json) { $result = json_encode($result); } return $result; }