Beispiel #1
0
 public function __construct()
 {
     $this->ajax = Manager::getAjax();
     //$this->page = Manager::getPage();
     $this->setContent();
 }
Beispiel #2
0
 public function renderJSON($json = '')
 {
     if (!Manager::isAjaxCall()) {
         Manager::$ajax = new \Maestro\UI\MAjax(Manager::getOptions('charset'));
     }
     $ajax = Manager::getAjax();
     $ajax->setData($this->data);
     $this->setResult(new Results\MRenderJSON($json));
 }
Beispiel #3
0
function shutdown()
{
    $error = error_get_last();
    /*
     * TODO: handler this error message
     */
    if ($error['type'] & Maestro\Manager::getConf('maestro.debug.severity')) {
        if (Maestro\Manager::isAjaxCall()) {
            $ajax = Maestro\Manager::getAjax();
            $ob = ob_get_clean();
            if ($ajax->isEmpty()) {
                $ajax->setType('page');
                $ajax->setData($ob);
            }
            $result = $ajax->returnData();
            echo $result;
        }
    }
}