FML/Stylesheet/Mood.php
public function render(\DOMDocument $domDocument)
    {
        $domElement = $domDocument->createElement("mood");
        if ($this->lightAmbientColor) {
            $domElement->setAttribute("LAmbient_LinearRgb", $this->lightAmbientColor);
        }
        if ($this->cloudsMinimumColor) {
            $domElement->setAttribute("CloudsRgbMinLinear", $this->cloudsMinimumColor);
        }
        if ($this->cloudsMaximumColor) {
            $domElement->setAttribute("CloudsRgbMaxLinear", $this->cloudsMaximumColor);
        }
        if ($this->light0Color) {
            $domElement->setAttribute("LDir0_LinearRgb", $this->light0Color);
        }
        if ($this->light0Intensity != 1.) {
            $domElement->setAttribute("LDir0_Intens", $this->light0Intensity);
        }
        if ($this->light0PhiAngle) {
            $domElement->setAttribute("LDir0_DirPhi", $this->light0PhiAngle);
        }
        if ($this->light0ThetaAngle) {
            $domElement->setAttribute("LDir0_DirTheta", $this->light0ThetaAngle);
        }
        if ($this->lightBallColor) {
            $domElement->setAttribute("LBall_LinearRgb", $this->lightBallColor);
        }
        if ($this->lightBallIntensity != 1.) {
            $domElement->setAttribute("LBall_Intens", $this->lightBallIntensity);
        }
        if ($this->lightBallRadius) {
            $domElement->setAttribute("LBall_Radius", $this->lightBallRadius);
        }
        if ($this->fogColor) {
            $domElement->setAttribute("FogColorSrgb", $this->fogColor);
        }
        if ($this->selfIlluminationColor) {
            $domElement->setAttribute("SelfIllumColor", $this->selfIlluminationColor);
        }
        if ($this->skyGradientScale != 1.) {
            $domElement->setAttribute("SkyGradientV_Scale", $this->skyGradientScale);
        }
        if ($this->skyGradientKeys) {
            $skyGradientElement = $domDocument->createElement("skygradient");
            $domElement->appendChild($skyGradientElement);
            foreach ($this->skyGradientKeys as $skyGradientKey) {
                $skyGradientKeyElement = $skyGradientKey->render($domDocument);
                $skyGradientElement->appendChild($skyGradientKeyElement);
            }
        }
        return $domElement;
    }
public function render(\DOMDocument $domDocument)
    {
        $domElement = $domDocument->createElement("mood");
        if ($this->lightAmbientColor) {
            $domElement->setAttribute("LAmbient_LinearRgb", $this->lightAmbientColor);
        }
        if ($this->cloudsMinimumColor) {
            $domElement->setAttribute("CloudsRgbMinLinear", $this->cloudsMinimumColor);
        }
        if ($this->cloudsMaximumColor) {
            $domElement->setAttribute("CloudsRgbMaxLinear", $this->cloudsMaximumColor);
        }
        if ($this->light0Color) {
            $domElement->setAttribute("LDir0_LinearRgb", $this->light0Color);
        }
        if ($this->light0Intensity != 1.) {
            $domElement->setAttribute("LDir0_Intens", $this->light0Intensity);
        }
        if ($this->light0PhiAngle) {
            $domElement->setAttribute("LDir0_DirPhi", $this->light0PhiAngle);
        }
        if ($this->light0ThetaAngle) {
            $domElement->setAttribute("LDir0_DirTheta", $this->light0ThetaAngle);
        }
        if ($this->lightBallColor) {
            $domElement->setAttribute("LBall_LinearRgb", $this->lightBallColor);
        }
        if ($this->lightBallIntensity != 1.) {
            $domElement->setAttribute("LBall_Intens", $this->lightBallIntensity);
        }
        if ($this->lightBallRadius) {
            $domElement->setAttribute("LBall_Radius", $this->lightBallRadius);
        }
        if ($this->fogColor) {
            $domElement->setAttribute("FogColorSrgb", $this->fogColor);
        }
        if ($this->selfIlluminationColor) {
            $domElement->setAttribute("SelfIllumColor", $this->selfIlluminationColor);
        }
        if ($this->skyGradientScale != 1.) {
            $domElement->setAttribute("SkyGradientV_Scale", $this->skyGradientScale);
        }
        if ($this->skyGradientKeys) {
            $skyGradientElement = $domDocument->createElement("skygradient");
            $domElement->appendChild($skyGradientElement);
            foreach ($this->skyGradientKeys as $skyGradientKey) {
                $skyGradientKeyElement = $skyGradientKey->render($domDocument);
                $skyGradientElement->appendChild($skyGradientKeyElement);
            }
        }
        return $domElement;
    }
public function render ( \ DOMDocument $ domDocument ) { $ domElement = $ domDocument -> createElement ( "mood" ) ; if ( $ this -> lightAmbientColor ) { $ domElement -> setAttribute ( "LAmbient_LinearRgb" , $ this -> lightAmbientColor ) ; } if ( $ this -> cloudsMinimumColor ) { $ domElement -> setAttribute ( "CloudsRgbMinLinear" , $ this -> cloudsMinimumColor ) ; } if ( $ this -> cloudsMaximumColor ) { $ domElement -> setAttribute ( "CloudsRgbMaxLinear" , $ this -> cloudsMaximumColor ) ; } if ( $ this -> light0Color ) { $ domElement -> setAttribute ( "LDir0_LinearRgb" , $ this -> light0Color ) ; } if ( $ this -> light0Intensity != 1. ) { $ domElement -> setAttribute ( "LDir0_Intens" , $ this -> light0Intensity ) ; } if ( $ this -> light0PhiAngle ) { $ domElement -> setAttribute ( "LDir0_DirPhi" , $ this -> light0PhiAngle ) ; } if ( $ this -> light0ThetaAngle ) { $ domElement -> setAttribute ( "LDir0_DirTheta" , $ this -> light0ThetaAngle ) ; } if ( $ this -> lightBallColor ) { $ domElement -> setAttribute ( "LBall_LinearRgb" , $ this -> lightBallColor ) ; } if ( $ this -> lightBallIntensity != 1. ) { $ domElement -> setAttribute ( "LBall_Intens" , $ this -> lightBallIntensity ) ; } if ( $ this -> lightBallRadius ) { $ domElement -> setAttribute ( "LBall_Radius" , $ this -> lightBallRadius ) ; } if ( $ this -> fogColor ) { $ domElement -> setAttribute ( "FogColorSrgb" , $ this -> fogColor ) ; } if ( $ this -> selfIlluminationColor ) { $ domElement -> setAttribute ( "SelfIllumColor" , $ this -> selfIlluminationColor ) ; } if ( $ this -> skyGradientScale != 1. ) { $ domElement -> setAttribute ( "SkyGradientV_Scale" , $ this -> skyGradientScale ) ; } if ( $ this -> skyGradientKeys ) { $ skyGradientElement = $ domDocument -> createElement ( "skygradient" ) ; $ domElement -> appendChild ( $ skyGradientElement ) ; foreach ( $ this -> skyGradientKeys as $ skyGradientKey ) { $ skyGradientKeyElement = $ skyGradientKey -> render ( $ domDocument ) ; $ skyGradientElement -> appendChild ( $ skyGradientKeyElement ) ; } } return $ domElement ; }
Render the Mood

@param \DOMDocument $domDocument DOMDocument for which the Mood should be rendered
@return \DOMElement
Render the Mood