/** * The modifyPublisher method changes the details for an existing publisher * or returns an error message. * * @access public * * @param XML_RPC_Message $oParams * * @return generated result (data or error) */ function modifyPublisher($oParams) { $sessionId = null; $oPublisherInfo = new OA_Dll_PublisherInfo(); $oResponseWithError = null; if (!XmlRpcUtils::getRequiredScalarValue($sessionId, $oParams, 0, $oResponseWithError) || !XmlRpcUtils::getStructureScalarFields($oPublisherInfo, $oParams, 1, array('publisherId', 'agencyId', 'publisherName', 'contactName', 'emailAddress', 'website', 'username', 'password', 'comments'), $oResponseWithError)) { return $oResponseWithError; } if ($this->_oPublisherServiceImp->modifyPublisher($sessionId, $oPublisherInfo)) { return XmlRpcUtils::booleanTypeResponse(true); } else { return XmlRpcUtils::generateError($this->_oPublisherServiceImp->getLastError()); } }
/** * The modifyZone method changes the details for an existing zone * or returns an error message. * * @access public * * @param XML_RPC_Message &$oParams * * @return generated result (data or error) */ function modifyZone(&$oParams) { $sessionId = null; $oZoneInfo = new OA_Dll_ZoneInfo(); $oResponseWithError = null; if (!XmlRpcUtils::getRequiredScalarValue($sessionId, $oParams, 0, $oResponseWithError) || !XmlRpcUtils::getStructureScalarFields($oZoneInfo, $oParams, 1, array('zoneId', 'publisherId', 'zoneName', 'type', 'width', 'height', 'comments', 'capping', 'sessionCapping', 'block', 'append', 'prepend', 'chainedZoneId'), $oResponseWithError)) { return $oResponseWithError; } if ($this->_oZoneServiceImp->modifyZone($sessionId, $oZoneInfo)) { return XmlRpcUtils::booleanTypeResponse(true); } else { return XmlRpcUtils::generateError($this->_oZoneServiceImp->getLastError()); } }
/** * The modifyChannel method either changes the details for an existing channel * or returns an error message. * * @access public * * @param XML_RPC_Message &$oParams * * @return generated result (data or error) */ public function modifyChannel(&$oParams) { $sessionId = null; $oChannelInfo = new OA_Dll_ChannelInfo(); $oResponseWithError = null; if (!XmlRpcUtils::getRequiredScalarValue($sessionId, $oParams, 0, $oResponseWithError) || !XmlRpcUtils::getStructureScalarFields($oChannelInfo, $oParams, 1, array('channelId', 'channelName', 'description', 'comments'), $oResponseWithError)) { return $oResponseWithError; } if ($this->_oChannelServiceImp->modifyChannel($sessionId, $oChannelInfo)) { return XmlRpcUtils::booleanTypeResponse(true); } else { return XmlRpcUtils::generateError($this->_oChannelServiceImp->getLastError()); } }
/** * The modifyCampaign method changes the details for an existing campaign * or returns an error message. * * @access public * * @param XML_RPC_Message &$oParams * * @return generated result (data or error) */ function modifyCampaign(&$oParams) { $sessionId = null; $oCampaignInfo = new OA_Dll_CampaignInfo(); $oResponseWithError = null; if (!XmlRpcUtils::getRequiredScalarValue($sessionId, $oParams, 0, $oResponseWithError) || !XmlRpcUtils::getStructureScalarFields($oCampaignInfo, $oParams, 1, array('advertiserId', 'campaignId', 'campaignName', 'startDate', 'endDate', 'impressions', 'clicks', 'priority', 'weight', 'targetImpressions', 'targetClicks', 'targetConversions', 'revenue', 'revenueType', 'capping', 'sessionCapping', 'block', 'comments', 'viewWindow', 'clickWindow'), $oResponseWithError)) { return $oResponseWithError; } if ($this->_oCampaignServiceImp->modifyCampaign($sessionId, $oCampaignInfo)) { return XmlRpcUtils::booleanTypeResponse(true); } else { return XmlRpcUtils::generateError($this->_oCampaignServiceImp->getLastError()); } }
/** * Changes the details for an existing tracker. * * @param XML_RPC_Message &$oParams * * @return generated result (data or error) */ public function modifyTracker(&$oParams) { $sessionId = null; $oTrackerInfo = new OA_Dll_TrackerInfo(); $oResponseWithError = null; if (!XmlRpcUtils::getRequiredScalarValue($sessionId, $oParams, 0, $oResponseWithError) || !XmlRpcUtils::getStructureScalarFields($oTrackerInfo, $oParams, 1, array('trackerId', 'trackerName', 'description', 'status', 'type', 'linkCampaigns', 'variableMethod'), $oResponseWithError)) { return $oResponseWithError; } if ($this->oTrackerServiceImpl->modifyTracker($sessionId, $oTrackerInfo)) { return XmlRpcUtils::booleanTypeResponse(true); } else { return XmlRpcUtils::generateError($this->oTrackerServiceImpl->getLastError()); } }
/** * Gets Structure Scalar and non-Scalar fields * * @access public * * @param structure &$oStructure to return data * @param XML_RPC_Message &$oParams * @param integer $idxParam * @param array $aScalars Field names array * @param array $aNonScalars Field names array * @param XML_RPC_Response &$oResponseWithError * * @return boolean shows true if method was executed successfully */ function getStructureScalarAndNotScalarFields(&$oStructure, &$oParams, $idxParam, $aScalars, $aNonScalars, &$oResponseWithError) { $result = XmlRpcUtils::getStructureScalarFields($oStructure, $oParams, $idxParam, $aScalars, $oResponseWithError); if ($result) { $oStructParam = $oParams->getParam($idxParam); foreach ($aNonScalars as $fieldName) { if (!XmlRpcUtils::_getStructureNonScalarField($oStructure, $oStructParam, $fieldName, $oResponseWithError)) { return false; } } } else { return false; } return true; }