本文整理汇总了PHP中ActiveRecordModel::clearArrayData方法的典型用法代码示例。如果您正苦于以下问题:PHP ActiveRecordModel::clearArrayData方法的具体用法?PHP ActiveRecordModel::clearArrayData怎么用?PHP ActiveRecordModel::clearArrayData使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类ActiveRecordModel
的用法示例。
在下文中一共展示了ActiveRecordModel::clearArrayData方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: getUpdateResponse
protected function getUpdateResponse()
{
/////// @todo - should be a better way for recalculating taxes...
ActiveRecord::clearPool();
$this->config->resetRuntime('DELIVERY_TAX_CLASS');
$this->order = CustomerOrder::getInstanceById($this->order->getID(), true);
///////
$this->order->loadAll();
$this->restoreShippingMethodSelection();
ActiveRecordModel::clearArrayData();
if ($paymentMethod = $this->session->get('OrderPaymentMethod_' . $this->order->getID())) {
$this->order->setPaymentMethod($paymentMethod);
$this->order->getTotal(true);
}
$this->setAnonAddresses();
// @todo: sometimes the shipping address disappears (for registered users that might already have the shipping address entered before)
if (!$this->order->shippingAddress->get() && $this->isShippingRequired($this->order) && $this->user->defaultShippingAddress->get()) {
$this->user->defaultShippingAddress->get()->load();
$this->order->shippingAddress->set($this->user->defaultShippingAddress->get()->userAddress->get());
$this->order->shippingAddress->get()->load();
}
$response = new CompositeJSONResponse();
$response->addAction('overview', 'onePageCheckout', 'overview');
$response->addAction('cart', 'onePageCheckout', 'cart');
if ($this->request->getActionName() != 'setPaymentMethod') {
$response->addAction('payment', 'onePageCheckout', 'payment');
}
$response->set('order', $this->getOrderValues($this->order));
foreach (func_get_args() as $arg) {
$response->addAction($arg, 'onePageCheckout', $arg);
}
$this->session->unsetValue('noJS');
$response = $this->postProcessResponse($response);
return $response;
}