本文整理汇总了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);