Source for file CMS3_StandartOutputHandler_OutputHandle.php
Documentation is available at CMS3_StandartOutputHandler_OutputHandle.php
// CMS3 - A Three Content Management System.
// Copyright (C) 2007 Jop... (Jonas F. Jensen).
// This program is free software; you can redistribute it and/or
// modify it under the terms of the GNU General Public License
// as published by the Free Software Foundation; either version 2
// of the License, or (at your option) any later version.
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
// You should have received a copy of the GNU General Public License
// along with this program; if not, write to the Free Software
// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*This file defines CMS3_StandartOutputHandler_OutputHandler
*An abstract class with implementation of error handling for IOutputHandlers
* @package StandartOutputHandler
* @author Jonas F. Jensen <jopsen@gmail.com>
* @copyright 2007 Jonas F. Jensen.
* @license http://www.gnu.org/licenses/gpl.txt
*The interface defined in this file depends on IOutputHandler
require_once("share/System/IOutputHandler.php");
* class CMS3_StandartOutputHandler_OutputHandler an abstract implementation of error codes for an outputhandler
* Print an error code, if you use this method no other methods will be available.
* This method will print all 4xx and 5xx error codes specified in the RFC 2616, and some of the codes specified in the WebDAV extension.
* NOTE: This mehtod postes a soft error code in HTML, this may be improved later on.
* @param string msg The message you wish to print
* @param int code The error code you wish to print eg. 404.
"402" =>
"Payment Required",
"405" =>
"Method Not Allowed",
"406" =>
"Not Acceptable",
"407" =>
"Proxy Authentication Required",
"408" =>
"Request Timeout",
"411" =>
"Length Required",
"412" =>
"Precondition Failed",
"413" =>
"Request Entity Too Large",
"414" =>
"Request-URI Too Long",
"415" =>
"Unsupported Media Type",
"416" =>
"Requested Range Not Satisfiable",
"417" =>
"Expectation Failed",
"422" =>
"Unprocessable Entity",
"424" =>
"Failed Dependency",
"425" =>
"Unordered Collection",
"426" =>
"Upgrade Required",
"500" =>
"Internal Server Error",
"501" =>
"Not Implemented",
"503" =>
"Service Unavailable",
"504" =>
"Gateway Timeout",
"505" =>
"HTTP Version Not Supported",
"507" =>
"Insufficient Storage",
"509" =>
"Bandwidth Limit Exceeded");
$this->SetTitle($code .
"-" .
$title);
//Do we know the meaning of the error code?
$this->SetBody("Error: $code - " .
$ErrorCodes[$code]);
$this->SetBody("CustomError: $code");
//Print the error message, using method on a child
} // end of member function PrintError
} // end of CMS3_OutputHandler
Documentation generated on Mon, 30 Apr 2007 01:59:09 +0200 by phpDocumentor 1.3.1