本文整理汇总了PHP中XmlParser::updateSession方法的典型用法代码示例。如果您正苦于以下问题:PHP XmlParser::updateSession方法的具体用法?PHP XmlParser::updateSession怎么用?PHP XmlParser::updateSession使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类XmlParser
的用法示例。
在下文中一共展示了XmlParser::updateSession方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: updateWizardState
private function updateWizardState()
{
$context = $this->context;
$upload_status = array(1 => "File is too large!", 2 => "File is too large!", 3 => "Partial upload..", 4 => "No file was uploaded!", 6 => "Internal error (tmp folder is missing)", 7 => "Can't write file", 8 => "An extension stopped the upload process!");
$post = $context->getRequest()->getParameterHolder()->getAll();
$url = $context->getRequest()->getUri();
if (!isset($post["step"])) {
$step = $post["last"];
} else {
$step = $post["step"];
}
$status = XmlParser::updateSession($step);
if ($status === true || $status === 0) {
afWizard::takeStep();
$result = array('success' => true, 'message' => false, 'redirect' => $url, 'load' => 'center');
} else {
$result = array('success' => false, 'message' => "A file upload error has been detected: " . $upload_status[$status] . "!");
}
echo json_encode($result);
exit;
}