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;
    }
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;
    }
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 ; }
Adds a new template file to the given key with the given priority.

@access public
@param string $key
@param string $file
@param integer $priority
@return boolean
Adds a new template file to the given key with the given priority .