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);
}