Evercode1\ViewMaker\MakeChart::appendCssToIndex PHP Method

appendCssToIndex() private method

private appendCssToIndex ( )
    private function appendCssToIndex()
    {
        $txt = $this->getContentFromTemplate('ChartCss', $this->tokens);
        $contents = file_get_contents($this->files['Index']);
        $classParts = explode("@section('css')", $contents, 2);
        $txt = $classParts[0] . "@section('css')" . "\n\n" . $txt . $classParts[1];
        $handle = fopen($this->files['Index'], "w");
        fwrite($handle, $txt);
        fclose($handle);
        return $this;
    }