本文整理匯總了PHP中Toolbox::cleanName方法的典型用法代碼示例。如果您正苦於以下問題:PHP Toolbox::cleanName方法的具體用法?PHP Toolbox::cleanName怎麽用?PHP Toolbox::cleanName使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類Toolbox
的用法示例。
在下文中一共展示了Toolbox::cleanName方法的2個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: setDeliveryAddress
/**
* Set complete delivery address for this order.
* @param $data
*/
public function setDeliveryAddress($data)
{
$this->firstname = Toolbox::cleanName($data['firstname']);
$this->lastname = Toolbox::cleanName($data['lastname']);
$this->address1 = $data['address1'];
$this->postcode = Toolbox::cleanPostCode($data['postcode']);
$this->city = $data['city'];
$this->id_country = (int) $data['id_country'];
$this->id_state = (int) $data['id_state'];
$this->phone = $data['phone'];
$this->state_address = 1;
$this->update();
}
示例2: md5
* Check key
*/
$check_key = md5($current_cart->id . '_' . $current_cart->secure_key);
if (!Tools::getValue('key', false) or Tools::getValue('key') != $check_key) {
die('An error occurred...');
}
/*
* Get popup return data
*/
$receiver_type = Tools::getValue('receiver_type');
$receiver_linkedin_id = Tools::getValue('receiver_linkedin_id');
$receiver_facebook_id = Tools::getValue('receiver_facebook_id');
$postcode = Tools::getValue('postcode');
$telephone = Toolbox::cleanPhone(Tools::getValue('telephone'));
$firstname = Toolbox::cleanName(Tools::getValue('firstname'));
$lastname = Toolbox::cleanName(Tools::getValue('lastname'));
$email = Tools::getValue('email');
$country_iso = Tools::getValue('country_id');
$telephone_no = Toolbox::cleanPhone(Tools::getValue('telephone_no'));
$region = Tools::getValue('region');
$city = Tools::getValue('city');
if (!Validate::isEmail($email)) {
die('<script language="javascript" type="text/javascript">top.location.href = "' . $context->link->getPageLink('order') . '?step=1" ;</script>');
}
/*
* Check if address already registered on ship2myid.
*/
/*
* $sender_email = Db::getInstance()->getValue('SELECT email FROM '._DB_PREFIX_.'customer WHERE id_customer = '.(int)$current_cart->id_customer);
*/
$info = array('email_address' => $email);