本文整理汇总了PHP中convertArray2Formatted函数的典型用法代码示例。如果您正苦于以下问题:PHP convertArray2Formatted函数的具体用法?PHP convertArray2Formatted怎么用?PHP convertArray2Formatted使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了convertArray2Formatted函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: _processRequest
private function _processRequest()
{
$cmd = array('protocol' => 'XCP', 'action' => 'process_pending', 'object' => 'domain', 'attributes' => array('order_id' => $this->_dataObject->data->order_id));
// Command optional values
if (isset($this->_dataObject->data->owner_address) && $this->_dataObject->data->owner_address != "") {
$cmd['attributes']['owner_address'] = $this->_dataObject->data->owner_address;
}
if (isset($this->_dataObject->data->command) && $this->_dataObject->data->command != "") {
$cmd['attributes']['command'] = $this->_dataObject->data->command;
}
if (isset($this->_dataObject->data->fax_received) && $this->_dataObject->data->fax_received != "") {
$cmd['attributes']['fax_received'] = $this->_dataObject->data->fax_received;
}
$xmlCMD = $this->_opsHandler->encode($cmd);
// Flip Array to XML
$XMLresult = $this->send_cmd($xmlCMD);
// Send XML
$arrayResult = $this->_opsHandler->decode($XMLresult);
// Flip XML to Array
// Results
$this->resultFullRaw = $arrayResult;
$this->resultRaw = $arrayResult;
$this->resultFullFormatted = convertArray2Formatted($this->_formatHolder, $this->resultFullRaw);
$this->resultFormatted = convertArray2Formatted($this->_formatHolder, $this->resultRaw);
}
示例2: _processRequest
private function _processRequest()
{
$cmd = array('protocol' => 'XCP', 'action' => 'create', 'object' => 'nameserver', 'attributes' => array('name' => $this->_dataObject->data->name, 'ipaddress' => $this->_dataObject->data->ipaddress));
// Cookie / bypass
if (isset($this->_dataObject->data->cookie) && $this->_dataObject->data->cookie != "") {
$cmd['cookie'] = $this->_dataObject->data->cookie;
}
if (isset($this->_dataObject->data->bypass) && $this->_dataObject->data->bypass != "") {
$cmd['domain'] = $this->_dataObject->data->bypass;
}
// Command optional values
if (isset($this->_dataObject->data->add_to_all_registry) && $this->_dataObject->data->add_to_all_registry != "") {
$cmd['attributes']['add_to_all_registry'] = $this->_dataObject->data->add_to_all_registry;
}
$xmlCMD = $this->_opsHandler->encode($cmd);
// Flip Array to XML
$XMLresult = $this->send_cmd($xmlCMD);
// Send XML
$arrayResult = $this->_opsHandler->decode($XMLresult);
// Flip XML to Array
// Results
$this->resultFullRaw = $arrayResult;
$this->resultRaw = $arrayResult;
$this->resultFullFormatted = convertArray2Formatted($this->_formatHolder, $this->resultFullRaw);
$this->resultFormatted = convertArray2Formatted($this->_formatHolder, $this->resultRaw);
}
示例3: _processRequest
private function _processRequest()
{
$cmd = array('protocol' => 'XCP', 'action' => 'update_product', 'object' => 'trust_service', 'attributes' => array('product_id' => $this->_dataObject->data->product_id));
// Command optional values
if (isset($this->_dataObject->data->contact_email) && $this->_dataObject->data->contact_email != "") {
$cmd['attributes']['contact_email'] = $this->_dataObject->data->contact_email;
}
if (isset($this->_dataObject->data->seal_in_search) && $this->_dataObject->data->seal_in_search != "") {
$cmd['attributes']['seal_in_search'] = $this->_dataObject->data->seal_in_search;
}
if (isset($this->_dataObject->data->trust_seal) && $this->_dataObject->data->trust_seal != "") {
$cmd['attributes']['trust_seal'] = $this->_dataObject->data->trust_seal;
}
$xmlCMD = $this->_opsHandler->encode($cmd);
// Flip Array to XML
$XMLresult = $this->send_cmd($xmlCMD);
// Send XML
$arrayResult = $this->_opsHandler->decode($XMLresult);
// Flip XML to Array
// Results
$this->resultFullRaw = $arrayResult;
if (isset($arrayResult['attributes'])) {
$this->resultRaw = $arrayResult['attributes'];
} else {
$this->resultRaw = $arrayResult;
}
$this->resultFullFormatted = convertArray2Formatted($this->_formatHolder, $this->resultFullRaw);
$this->resultFormatted = convertArray2Formatted($this->_formatHolder, $this->resultRaw);
$this->XMLresult = $XMLresult;
}
示例4: _processRequest
private function _processRequest()
{
$cmd = array('protocol' => 'XCP', 'action' => 'CHECK_TRANSFER', 'object' => 'DOMAIN', 'attributes' => array('domain' => $this->_dataObject->data->domain));
// Command optional values
if (isset($this->_dataObject->data->check_status) && $this->_dataObject->data->check_status != "") {
$cmd['attributes']['check_status'] = $this->_dataObject->data->check_status;
}
if (isset($this->_dataObject->data->get_request_address) && $this->_dataObject->data->get_request_address != "") {
$cmd['attributes']['get_request_address'] = $this->_dataObject->data->get_request_address;
}
$xmlCMD = $this->_opsHandler->encode($cmd);
// Flip Array to XML
$XMLresult = $this->send_cmd($xmlCMD);
// Send XML
$arrayResult = $this->_opsHandler->decode($XMLresult);
// Flip XML to Array
// Results
$this->resultFullRaw = $arrayResult;
if (isset($arrayResult['attributes'])) {
$this->resultRaw = $arrayResult['attributes'];
} else {
$this->resultRaw = $arrayResult;
}
$this->resultFullFormatted = convertArray2Formatted($this->_formatHolder, $this->resultFullRaw);
$this->resultFormatted = convertArray2Formatted($this->_formatHolder, $this->resultRaw);
}
示例5: _processRequest
private function _processRequest()
{
$cmd = array('protocol' => 'XCP', 'action' => 'get', 'object' => 'nameserver', 'attributes' => array('name' => $this->_dataObject->data->name));
// Cookie / bypass
if (isset($this->_dataObject->data->cookie) && $this->_dataObject->data->cookie != "") {
$cmd['cookie'] = $this->_dataObject->data->cookie;
}
if (isset($this->_dataObject->data->bypass) && $this->_dataObject->data->bypass != "") {
$cmd['domain'] = $this->_dataObject->data->bypass;
}
$xmlCMD = $this->_opsHandler->encode($cmd);
// Flip Array to XML
$XMLresult = $this->send_cmd($xmlCMD);
// Send XML
$arrayResult = $this->_opsHandler->decode($XMLresult);
// Flip XML to Array
// Results
$this->resultFullRaw = $arrayResult;
if (isset($arrayResult['attributes'])) {
$this->resultRaw = $arrayResult['attributes'];
} else {
$this->resultRaw = $arrayResult;
}
$this->resultFullFormatted = convertArray2Formatted($this->_formatHolder, $this->resultFullRaw);
$this->resultFormatted = convertArray2Formatted($this->_formatHolder, $this->resultRaw);
}
示例6: _processRequest
private function _processRequest()
{
$cmd = array('protocol' => 'XCP', 'action' => 'renew', 'object' => 'DOMAIN', 'attributes' => array('auto_renew' => $this->_dataObject->data->auto_renew, 'currentexpirationyear' => $this->_dataObject->data->currentexpirationyear, 'domain' => $this->_dataObject->data->domain, 'handle' => $this->_dataObject->data->handle, 'period' => $this->_dataObject->data->period));
// Command optional values
if (isset($this->_dataObject->data->f_parkp) && $this->_dataObject->data->f_parkp != "") {
$cmd['attributes']['f_parkp'] = $this->_dataObject->data->f_parkp;
}
if (isset($this->_dataObject->data->affiliate_id) && $this->_dataObject->data->affiliate_id != "") {
$cmd['attributes']['affiliate_id'] = $this->_dataObject->data->affiliate_id;
}
$xmlCMD = $this->_opsHandler->encode($cmd);
// Flip Array to XML
$XMLresult = $this->send_cmd($xmlCMD);
// Send XML
$arrayResult = $this->_opsHandler->decode($XMLresult);
// Flip XML to Array
// Results
$this->resultFullRaw = $arrayResult;
if (isset($arrayResult['attributes'])) {
$this->resultRaw = $arrayResult['attributes'];
} else {
$this->resultRaw = $arrayResult;
}
$this->resultFullFormatted = convertArray2Formatted($this->_formatHolder, $this->resultFullRaw);
$this->resultFormatted = convertArray2Formatted($this->_formatHolder, $this->resultRaw);
}
示例7: _processRequest
private function _processRequest()
{
$cmd = array('protocol' => 'XCP', 'action' => 'CREATE', 'object' => 'SUBRESELLER', 'attributes' => array('ccp_enabled' => $this->_dataObject->data->ccp_enabled, 'contact_set' => array('owner' => $this->_createUserData(), 'admin' => $this->_createUserData(), 'billing' => $this->_createUserData(), 'tech' => $this->_createUserData()), 'low_balance_email' => $this->_dataObject->data->low_balance_email, 'password' => $this->_dataObject->data->password, 'pricing_plan' => $this->_dataObject->data->pricing_plan, 'status' => $this->_dataObject->data->status, 'system_status_email' => $this->_dataObject->data->system_status_email, 'username' => $this->_dataObject->data->username));
// Command optional values
if (isset($this->_dataObject->data->payment_email) && $this->_dataObject->data->payment_email != "") {
$cmd['attributes']['payment_email'] = $this->_dataObject->data->payment_email;
}
if (isset($this->_dataObject->data->url) && $this->_dataObject->data->url != "") {
$cmd['attributes']['url'] = $this->_dataObject->data->url;
}
if (isset($this->_dataObject->data->nameservers) && $this->_dataObject->data->nameservers != "") {
// 'fqdn1' => 'parking1.mdnsservice.com'
$tmpArray = explode(",", $this->_dataObject->data->nameservers);
for ($i = 0; $i < count($tmpArray); $i++) {
$cmd['attributes']['nameservers']['fqdn' . ($i + 1)] = $tmpArray[$i];
}
}
$xmlCMD = $this->_opsHandler->encode($cmd);
// Flip Array to XML
$XMLresult = $this->send_cmd($xmlCMD);
// Send XML
$arrayResult = $this->_opsHandler->decode($XMLresult);
// Flip XML to Array
// Results
$this->resultFullRaw = $arrayResult;
if (isset($arrayResult['attributes'])) {
$this->resultRaw = $arrayResult['attributes'];
} else {
$this->resultRaw = $arrayResult;
}
$this->resultFullFormatted = convertArray2Formatted($this->_formatHolder, $this->resultFullRaw);
$this->resultFormatted = convertArray2Formatted($this->_formatHolder, $this->resultRaw);
}
示例8: _processRequest
private function _processRequest()
{
$cmd = array("protocol" => "XCP", "action" => "GET_ORDER_INFO", "object" => "DOMAIN", "attributes" => array("order_id" => $this->_dataObject->data->order_id));
// Command optional values
if (isset($this->_dataObject->data->page) && $this->_dataObject->data->page != "") {
$cmd['attributes']['page'] = $this->_dataObject->data->page;
}
if (isset($this->_dataObject->data->limit) && $this->_dataObject->data->limit != "") {
$cmd['attributes']['limit'] = $this->_dataObject->data->limit;
}
if (isset($this->_dataObject->data->order_id) && $this->_dataObject->data->order_id != "") {
$cmd['attributes']['order_id'] = $this->_dataObject->data->order_id;
}
if (isset($this->_dataObject->data->transfer_id) && $this->_dataObject->data->transfer_id != "") {
$cmd['attributes']['transfer_id'] = $this->_dataObject->data->transfer_id;
}
$xmlCMD = $this->_opsHandler->encode($cmd);
// Flip Array to XML
$XMLresult = $this->send_cmd($xmlCMD);
// Send XML
$arrayResult = $this->_opsHandler->decode($XMLresult);
// Flip XML to Array
// Results
$this->resultFullRaw = $arrayResult;
$this->resultRaw = $arrayResult;
$this->resultFullFormatted = convertArray2Formatted($this->_formatHolder, $this->resultFullRaw);
$this->resultFormatted = convertArray2Formatted($this->_formatHolder, $this->resultRaw);
}
示例9: _processRequest
private function _processRequest()
{
$cmd = array("protocol" => "XCP", "action" => "GET_PRICE", "object" => "DOMAIN", "attributes" => array('domain' => $this->_dataObject->data->domain));
// Command optional values
if (isset($this->_dataObject->data->period) && $this->_dataObject->data->period != "") {
$cmd['attributes']['period'] = $this->_dataObject->data->period;
}
if (isset($this->_dataObject->data->reg_type) && $this->_dataObject->data->reg_type != "") {
$cmd['attributes']['reg_type'] = $this->_dataObject->data->reg_type;
}
$xmlCMD = $this->_opsHandler->encode($cmd);
// Flip Array to XML
$XMLresult = $this->send_cmd($xmlCMD);
// Send XML
$arrayResult = $this->_opsHandler->decode($XMLresult);
// Flip XML to Array
// Results
$this->resultFullRaw = $arrayResult;
if (isset($arrayResult['attributes'])) {
$this->resultRaw = $arrayResult['attributes'];
} else {
$this->resultRaw = $arrayResult;
}
$this->resultFullFormatted = convertArray2Formatted($this->_formatHolder, $this->resultFullRaw);
$this->resultFormatted = convertArray2Formatted($this->_formatHolder, $this->resultRaw);
}
示例10: _processRequest
private function _processRequest()
{
$cmd = array("protocol" => "XCP", "action" => "GET_DOMAINS_BY_EXPIREDATE", "object" => "DOMAIN", "attributes" => array('exp_from' => $this->_dataObject->data->exp_from, 'exp_to' => $this->_dataObject->data->exp_to));
// Command optional values
if (isset($this->_dataObject->data->page) && $this->_dataObject->data->page != "") {
$cmd['attributes']['page'] = $this->_dataObject->data->page;
}
if (isset($this->_dataObject->data->limit) && $this->_dataObject->data->limit != "") {
$cmd['attributes']['limit'] = $this->_dataObject->data->limit;
}
$xmlCMD = $this->_opsHandler->encode($cmd);
// Flip Array to XML
$XMLresult = $this->send_cmd($xmlCMD);
// Send XML
$arrayResult = $this->_opsHandler->decode($XMLresult);
// Flip XML to Array
// Results
$this->resultFullRaw = $arrayResult;
if (isset($arrayResult['attributes'])) {
$this->resultRaw = $arrayResult['attributes'];
} else {
$this->resultRaw = $arrayResult;
}
$this->resultFullFormatted = convertArray2Formatted($this->_formatHolder, $this->resultFullRaw);
$this->resultFormatted = convertArray2Formatted($this->_formatHolder, $this->resultRaw);
}
示例11: _processRequest
private function _processRequest()
{
$cmd = array('protocol' => 'XCP', 'action' => 'advanced_update_nameservers', 'object' => 'domain', 'attributes' => array('op_type' => $this->_dataObject->data->op_type));
// Cookie / bypass
if (isset($this->_dataObject->data->cookie) && $this->_dataObject->data->cookie != "") {
$cmd['cookie'] = $this->_dataObject->data->cookie;
}
if (isset($this->_dataObject->data->bypass) && $this->_dataObject->data->bypass != "") {
$cmd['domain'] = $this->_dataObject->data->bypass;
}
// Command optional values
if (isset($this->_dataObject->data->add_ns) && $this->_dataObject->data->add_ns != "") {
$tempAdd = explode(",", $this->_dataObject->data->add_ns);
$cmd['attributes']['add_ns'] = $tempAdd;
}
if (isset($this->_dataObject->data->assign_ns) && $this->_dataObject->data->assign_ns != "") {
$tempAdd = explode(",", $this->_dataObject->data->assign_ns);
$cmd['attributes']['assign_ns'] = $tempAdd;
}
if (isset($this->_dataObject->data->remove_ns) && $this->_dataObject->data->remove_ns != "") {
$tempAdd = explode(",", $this->_dataObject->data->remove_ns);
$cmd['attributes']['remove_ns'] = $tempAdd;
}
$xmlCMD = $this->_opsHandler->encode($cmd);
// Flip Array to XML
$XMLresult = $this->send_cmd($xmlCMD);
// Send XML
$arrayResult = $this->_opsHandler->decode($XMLresult);
// Flip XML to Array
// Results
$this->resultFullRaw = $arrayResult;
$this->resultRaw = $arrayResult;
$this->resultFullFormatted = convertArray2Formatted($this->_formatHolder, $this->resultFullRaw);
$this->resultFormatted = convertArray2Formatted($this->_formatHolder, $this->resultRaw);
}
示例12: _domainTLD
private function _domainTLD($domain, $request)
{
$result = $this->checkDomainBunch($domain, $request);
// Results
$this->resultFullRaw = $result;
$this->resultRaw = $result;
$this->resultFullFormatted = convertArray2Formatted($this->_formatHolder, $this->resultFullRaw);
$this->resultFormatted = convertArray2Formatted($this->_formatHolder, $this->resultRaw);
}
示例13: _processRequest
private function _processRequest($command = "")
{
$sequence = array(0 => "ver ver=\"3.4\"", 1 => "login user=\"" . $this->_dataObject->data->admin_username . "\" domain=\"" . $this->_dataObject->data->admin_domain . "\" password=\"" . $this->_dataObject->data->admin_password . "\"", 2 => "set_domain_disabled_status" . $command, 3 => "quit");
$tucRes = $this->makeCall($sequence);
$arrayResult = $this->parseResults($tucRes);
// Results
$this->resultRaw = $arrayResult;
$this->resultFormatted = convertArray2Formatted($this->_formatHolder, $this->resultRaw);
}
示例14: _processRequest
private function _processRequest($command = '')
{
$sequence = array(0 => 'ver ver="3.4"', 1 => 'login user="' . $this->_dataObject->data->username . '" domain="' . $this->_dataObject->data->authdomain . '" password="' . $this->_dataObject->data->password . '"', 2 => 'xxx' . $command, 3 => 'quit');
$tucRes = $this->makeCall($sequence);
$arrayResult = $this->parseResults($tucRes);
// Results
$this->resultRaw = $arrayResult;
$this->resultFormatted = convertArray2Formatted($this->_formatHolder, $this->resultRaw);
$this->resultSuccess = $this->makeCheck($arrayResult);
}
示例15: _validateObject
private function _validateObject()
{
$allPassed = true;
$reqPers = array("first_name", "last_name", "org_name", "address1", "city", "state", "country", "postal_code", "phone", "email", "lang_pref");
for ($i = 0; $i < count($reqPers); $i++) {
if ($this->_dataObject->personal->{$reqPers}[$i] == "") {
trigger_error("oSRS Error - " . $reqPers[$i] . " is not defined.", E_USER_WARNING);
$allPassed = false;
}
}
$reqData = array("reg_username", "reg_password", "domain", "custom_nameservers", "as_subreseller", "bulk_order");
for ($i = 0; $i < count($reqData); $i++) {
if ($this->_dataObject->data->{$reqData}[$i] == "") {
trigger_error("oSRS Error - " . $reqData[$i] . " is not defined.", E_USER_WARNING);
$allPassed = false;
}
}
// Run the command
if ($allPassed) {
$cmd = array('protocol' => 'XCP', 'action' => 'SW_REGISTER', 'object' => 'DOMAIN', 'attributes' => array('reg_type' => 'new', 'reg_username' => $this->_dataObject->data->reg_username, 'reg_password' => $this->_dataObject->data->reg_password, 'reg_domain' => $this->_dataObject->data->reg_domain, 'affiliate_id' => $this->_dataObject->data->affiliate_id, 'auto_renew' => $this->_dataObject->data->auto_renew, 'domain' => $this->_dataObject->data->domain, 'contact_set' => array('owner' => $this->_createUserData(), 'admin' => $this->_createUserData(), 'billing' => $this->_createUserData(), 'tech' => $this->_createUserData()), 'f_parkp' => $this->_dataObject->data->f_parkp, 'f_whois_privacy' => $this->_dataObject->data->f_whois_privacy, 'f_lock_domain' => $this->_dataObject->data->f_lock_domain, 'period' => $this->_dataObject->data->period, 'link_domains' => $this->_dataObject->data->link_domains, 'custom_nameservers' => $this->_dataObject->data->custom_nameservers, 'encoding_type' => $this->_dataObject->data->encoding_type, 'custom_tech_contact' => $this->_dataObject->data->custom_tech_contact, 'as_subreseller' => $this->_dataObject->data->as_subreseller, 'bulk_order' => $this->_dataObject->data->bulk_order));
if ($this->_dataObject->data->custom_nameservers == 1) {
for ($j = 1; $j <= 10; $j++) {
$tns = "name" . $j;
$tso = "sortorder" . $j;
$passArray = array();
$temHolder = array();
if (isset($this->_dataObject->data->{$tns})) {
if ($this->_dataObject->data->{$tns} != "") {
$temHolder['name'] = $this->_dataObject->data->{$tns};
$temHolder['sortorder'] = $this->_dataObject->data->{$tso};
array_push($passArray, $temHolder);
}
}
}
$cmd['attributes']['nameserver_list'] = $passArray;
}
$xmlCMD = $this->_opsHandler->encode($cmd);
// Flip Array to XML
$XMLresult = $this->send_cmd($xmlCMD);
// Send XML
$arrayResult = $this->_opsHandler->decode($XMLresult);
// FLip XML to Array
// Results
$this->resultFullRaw = $arrayResult;
$this->resultRaw = $arrayResult;
$this->resultFullFormatted = convertArray2Formatted($this->_formatHolder, $this->resultFullRaw);
$this->resultFormatted = convertArray2Formatted($this->_formatHolder, $this->resultRaw);
} else {
echo "Incorrect call data.<br>\n";
}
}