protected function checkParseFile($filename, $extended = true)
    {
        $tmp_filename = preg_replace('/@|\./', '/', $filename) . $this->config['view.extension'];

        // Vérification de l'existance du fichier
        if ($this->config['view.path'] !== null) {
            if (!file_exists($this->config['view.path'].'/'.$tmp_filename)) {
                throw new ViewException(
                    sprintf(
                        'The view [%s] does not exists. %s/%s',
                        $tmp_filename,
                        $this->config['view.path'],
                        $filename
                    ),
                    E_ERROR
                );
            }
        } else {
            if (!file_exists($tmp_filename)) {
                throw new ViewException(
                    sprintf('The view [%s] does not exists.', $tmp_filename),
                    E_ERROR
                );
            }
        }

        if ($extended) {
            $filename = $tmp_filename;
        }

        return $filename;
    }