isAjaxOutput() публичный Метод

Returns true if browser is going to EVAL output.
public isAjaxOutput ( ) : boolean
Результат boolean
Пример #1
0
Файл: Web.php Проект: atk4/atk4
 /**
  * Perform instant redirect to another page.
  *
  * @param string $page
  * @param array  $args
  */
 public function redirect($page = null, $args = array())
 {
     /*
      * Redirect to specified page. $args are $_GET arguments.
      * Use this function instead of issuing header("Location") stuff
      */
     $url = $this->url($page, $args);
     if ($this->app->isAjaxOutput()) {
         if ($_GET['cut_page']) {
             echo '<script>' . $this->app->js()->redirect($url) . '</script>Redirecting page...';
             exit;
         } else {
             $this->app->js()->redirect($url)->execute();
         }
     }
     header('Location: ' . $url);
     exit;
 }