public function compile($template, $data)
    {
        foreach ($data as $key => $value) {
            // TODO refactor code so that we do not need this check
            if (!is_string($value)) {
                continue;
            }

            $template = preg_replace("/\\$$key\\$/i", $value, $template);
        }

        return preg_replace('/(<?php)/', "$1\n" . $this->renderBanner(), $template, 1);
    }