Example #1
0
 /**
  * 
  * @return array of Ads
  * @throws Exception
  */
 public function getUnapprovedAds()
 {
     try {
         $adminService = new SoapClient(Config::get('wsdl.admin'), array());
         $result = $adminService->getUnapprovedAds();
         if (!is_array($result->ad)) {
             $result->ad = array($result->ad);
         }
         return array('ads' => $result);
     } catch (Exception $ex) {
         return array('role' => 'user');
     }
 }