public function addTemplate($key, $file, $priority = 10)
    {
        // If the file does not exists we can't add the file
        // to the templates...
        if (!file_exists($file) || !is_readable($file)) {
            return false;
        }
        
        // Create the arrays, if they are not existing
        if (!isset($this->templates[$key]) || !is_array($this->templates[$key])) {
            $this->templates[$key] = array();
        }
        
        $this->templates[$key][$priority] = $file;
        
        ksort($this->templates[$key]);
        
        $this->saveTemplates();
        
        return true;
    }