private function getauthorpost($authorid, $start, $limit) { $Profile = new \WH\Model\User(); $Profile->setId($authorid); $Profile->setStart($start); $Profile->setLimit($limit); $Profile->setPostParams(); try { $profilepost = $Profile->getPostsResults(); foreach ($profilepost['results'] as $key => $entity) { if ($entity['cover_image']) { if (substr($entity['cover_image'], 0, 4) != 'http') { $profilepost['results'][$key]['cover_image'] = $this->config->application->imgbaseUri . $entity['cover_image']; } } } } catch (Exception $e) { $profilepost = array(); } //echo "<pre>"; print_r($profilepost); exit; return $profilepost; }