Evercode1\ViewMaker\MakeChart::appendChartApiControllerMethod PHP Method

appendChartApiControllerMethod() private method

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