// Return the prepared instance
return $factoryInstance;
}
+
+ /**
+ * Create the news object itself here depending on the request
+ *
+ * @param $requestInstance An instance of a request class
+ * @return $newsInstance An instance of a news class
+ */
+ public function createNewObject (Requestable $requestInstance) {
+ // Do some stuff here
+ }
}
// [EOF]
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
+ *
+ * The extended headers are taken from phpMyAdmin setup tool, written by
+ * Michal Cihar <michal@cihar.com>, licensed under GNU GPL 2.0.
*/
class HttpResponse extends BaseFrameworkSystem implements Responseable {
/**
} elseif (!headers_sent()) {
// Send headers out
header("HTTP/1.0 {$this->responseStatus}");
+
+ // Used later
+ $now = gmdate('D, d M Y H:i:s') . ' GMT';
+
+ // General header for no caching
+ header('Expires: ' . $now); // rfc2616 - Section 14.21
+ header('Last-Modified: ' . $now);
+ header('Cache-Control: no-store, no-cache, must-revalidate, pre-check=0, post-check=0, max-age=0'); // HTTP/1.1
+ header('Pragma: no-cache'); // HTTP/1.0
+
+ // whether to show html header?
+ if ($action != 'download') {
+
+ // Define the charset to be used
+ header('Content-Type: text/html; charset=utf-8');
+
foreach ($this->responseHeaders as $name=>$value) {
header("{$name}: {$value}");
}