Cml\View\Excel::config PHP Method

config() private method

Excel基础配置
private config ( $enCoding, boolean $boolean, string $title, string $filename ) : void
$boolean boolean 转换类型
$title string 表标题
$filename string Excel文件名
return void
    private function config($enCoding, $boolean, $title, $filename)
    {
        //编码
        $this->coding = $enCoding;
        //转换类型
        if ($boolean == true) {
            $this->type = 'Number';
        } else {
            $this->type = 'String';
        }
        //表标题
        $title = preg_replace('/[\\\\|:|\\/|\\?|\\*|\\[|\\]]/', '', $title);
        $title = substr($title, 0, 30);
        $this->tWorksheetTitle = $title;
        //文件名
        $filename = preg_replace('/[^aA-zZ0-9\\_\\-]/', '', $filename);
        $this->filename = $filename;
    }