/** * @see EPSInterface::listOffices() */ public function listOffices($sessionId, $name, $siteId) { try { $listOfficesStdObject = new stdClass(); $listOfficesStdObject->sessionId = $sessionId; $listOfficesStdObject->name = $name; $listOfficesStdObject->siteId = $siteId; $response = parent::listOffices($listOfficesStdObject); $arrListOffices = array(); if (isset($response->return)) { $arrStdListOffices = $response->return; if (is_array($arrStdListOffices)) { for ($i = 0; $i < count($arrStdListOffices); $i++) { $arrListOffices[$i] = new ResultOffice($arrStdListOffices[$i]); } } else { $arrListOffices[0] = new ResultOffice($arrStdListOffices); } } return $arrListOffices; } catch (SoapFault $sf) { throw new ServerException($sf); } }