Source for file jResponseCss.class.php
Documentation is available at jResponseCss.class.php
- <?php
- /**
- * @package jelix
- * @subpackage core_response
- * @author Nicolas Jeudy
- * @contributor Laurent Jouanneau
- * @copyright 2006 Nicolas Jeudy
- * @copyright 2007 Laurent Jouanneau
- * @link http://www.jelix.org
- * @licence GNU Lesser General Public Licence see LICENCE file or http://www.gnu.org/licenses/lgpl.html
- */
-
- /**
- * Send CSS content
- * @package jelix
- * @subpackage core_response
- * @since 1.0b1
- */
- class jResponseCss extends jResponse {
-
- /**
- * @var string
- */
- protected $_type = 'css';
-
- /**
- * CSS content
- * @var string
- */
- public $content = '';
-
-
- /**
- * send the css content
- * @return boolean true if it's ok
- */
- public function output(){
- global $gJConfig;
- $this->_httpHeaders['Content-Type']='text/css;charset='.$gJConfig->charset;
- $this->_httpHeaders['Content-length']=strlen($this->content);
- $this->sendHttpHeaders();
- echo $this->content;
- return true;
- }
-
- public function outputErrors(){
- global $gJConfig;
- header("HTTP/1.0 500 Internal Server Error");
- header('Content-Type: text/css;charset='.$gJConfig->charset);
- echo "/*\n";
- if($this->hasErrors()){
- foreach( $GLOBALS['gJCoord']->errorMessages as $e){
- echo '['.$e[0].' '.$e[1].'] '.$e[2]." \t".$e[3]." \t".$e[4]."\n";
- }
- }else{
- echo "[unknown error]\n";
- }
- echo "\n*/";
- }
- }
- ?>
Documentation generated on Wed, 07 Sep 2011 13:47:43 +0200 by phpDocumentor 1.4.3