public function save()
    {
        if(file_exists($this->_config_file_path)){

            chmod($this->_config_file_path, 0644);

            $content = "<?php\nclass AnSiteConfig{\n";

            foreach($this->_attributes as $key=>$value) {
              if(!is_array($value)){
                $content .= "    var \$$key = '$value';\n";
              }
            }

            $content .= "}\n";

            try {
              file_put_contents($this->_config_file_path, $content);
            } catch (Exception $e) {
                throw new \RuntimeException($e->getMessage());
            }

            chmod($this->_config_file_path, 0444);

            $this->_clearCache();
        }

        return $this;
    }
public function save()
    {
        if(file_exists($this->_config_file_path)){

            chmod($this->_config_file_path, 0644);

            $content = "<?php\nclass AnSiteConfig{\n";

            foreach($this->_attributes as $key=>$value) {
              if(!is_array($value)){
                $content .= "    var \$$key = '$value';\n";
              }
            }

            $content .= "}\n";

            try {
              file_put_contents($this->_config_file_path, $content);
            } catch (Exception $e) {
                throw new \RuntimeException($e->getMessage());
            }

            chmod($this->_config_file_path, 0444);

            $this->_clearCache();
        }

        return $this;
    }
public function save ( ) { if ( file_exists ( $ this -> _config_file_path ) ) { chmod ( $ this -> _config_file_path , 0644 ) ; $ content = "<?php\nclass AnSiteConfig{\n" ; foreach ( $ this -> _attributes as $ key => $ value ) { if ( ! is_array ( $ value ) ) { $ content .= "    var \$$key = '$value';\n" ; } } $ content .= "}\n" ; try { file_put_contents ( $ this -> _config_file_path , $ content ) ; } catch ( Exception $ e ) { throw new \ RuntimeException ( $ e -> getMessage ( ) ) ; } chmod ( $ this -> _config_file_path , 0444 ) ; $ this -> _clearCache ( ) ; } return $ this ; }
Save system setting attributes

@return ComSettingsDomainEntitySetting entity object
Save system setting attributes