* A StreamedResponse uses a callback for its content.
*
* The callback should use the standard PHP functions like echo
- * to stream the response back to the client. The flush() method
+ * to stream the response back to the client. The flush() function
* can also be used if needed.
*
* @see flush()
throw new \LogicException('The Response callback must not be null.');
}
- call_user_func($this->callback);
+ \call_user_func($this->callback);
return $this;
}
throw new \LogicException('The content cannot be set on a StreamedResponse instance.');
}
+ $this->streamed = true;
+
return $this;
}