public function getContent()
    {
        if ($this->content === null) {
            if (is_array($this->variables)) {
                extract($this->variables);
            } else {
                if ($this->variables !== null) {
                    throw new \InvalidArgumentException('$variables argument should be null or an array');
                }
            }

            ob_start();
            include($this->path);
            $this->content = ob_get_clean();
        }

        return $this->content;
    }