Nette\Http\IResponse::isSent PHP Метод

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

Checks if headers have been sent.
public isSent ( ) : boolean
Результат boolean
    function isSent();

Usage Example

Пример #1
0
 /**
  * @param Translator $translator
  * @return string|NULL
  */
 public function resolve(Translator $translator)
 {
     if (!$this->session->isStarted() && $this->httpResponse->isSent()) {
         trigger_error("The advice of session locale resolver is required but the session has not been started and headers had been already sent. " . "Either start your sessions earlier or disabled the SessionResolver.", E_USER_WARNING);
         return NULL;
     }
     if (empty($this->localeSession->locale)) {
         return NULL;
     }
     $short = array_map(function ($locale) {
         return substr($locale, 0, 2);
     }, $translator->getAvailableLocales());
     if (!in_array(substr($this->localeSession->locale, 0, 2), $short, TRUE)) {
         return NULL;
     }
     return $this->localeSession->locale;
 }
All Usage Examples Of Nette\Http\IResponse::isSent