public function parse_template()
    {
        $self = $this;
        return preg_replace_callback('/\{\{([a-zA-Z\d-_]+)\}\}/', function($a) use($self) {
            $component = $self->get_component($a[1]);
            return $component->render();
        }, $this->model['template']);
    }