<?php
namespace com\whitemagicsoftware;
require "constants.php";
require "class.BaseController.php";
abstract class Ajax extends BaseController {
function __construct() {
parent::__construct();
}
protected function getParameterIdName() {
return "recipe-id";
}
protected function authorize() {
return false;
}
protected function exists( $id ) {
return true;
}
protected function getAuthorizationFunctionName() {
return "";
}
protected function getXhtml() {
return "";
}
protected abstract function handleAjaxRequest();
protected function handleRequest() {
global $CONTENT_ENCODING_AJAX;
$this->sendHttpHeaders( $CONTENT_ENCODING_AJAX );
echo $this->handleAjaxRequest();
}
}