public function mustCompile()
    {
        if (!$this->source->exists) {
            if ($this->parent instanceof Smarty_Internal_Template) {
                $parent_resource = " in '$this->parent->template_resource}'";
            } else {
                $parent_resource = '';
            }
            throw new SmartyException("Unable to load template {$this->source->type} '{$this->source->name}'{$parent_resource}");
        }
        if ($this->mustCompile === null) {
            $this->mustCompile = (!$this->source->uncompiled && ($this->smarty->force_compile || $this->source->recompiled || $this->compiled->timestamp === false ||
                    ($this->smarty->compile_check && $this->compiled->timestamp < $this->source->timestamp)));
        }

        return $this->mustCompile;
    }
public function mustCompile()
    {
        if (!$this->source->exists) {
            if ($this->parent instanceof Smarty_Internal_Template) {
                $parent_resource = " in '$this->parent->template_resource}'";
            } else {
                $parent_resource = '';
            }
            throw new SmartyException("Unable to load template {$this->source->type} '{$this->source->name}'{$parent_resource}");
        }
        if ($this->mustCompile === null) {
            $this->mustCompile = (!$this->source->uncompiled && ($this->smarty->force_compile || $this->source->recompiled || $this->compiled->timestamp === false ||
                    ($this->smarty->compile_check && $this->compiled->timestamp < $this->source->timestamp)));
        }

        return $this->mustCompile;
    }
public function mustCompile ( ) { if ( ! $ this -> source -> exists ) { if ( $ this -> parent instanceof Smarty_Internal_Template ) { $ parent_resource = " in '$this->parent->template_resource}'" ; } else { $ parent_resource = '' ; } throw new SmartyException ( "Unable to load template {$this->source->type} '{$this->source->name}'{$parent_resource}" ) ; } if ( $ this -> mustCompile === null ) { $ this -> mustCompile = ( ! $ this -> source -> uncompiled && ( $ this -> smarty -> force_compile || $ this -> source -> recompiled || $ this -> compiled -> timestamp === false || ( $ this -> smarty -> compile_check && $ this -> compiled -> timestamp < $ this -> source -> timestamp ) ) ) ; } return $ this -> mustCompile ; }
Returns if the current template must be compiled by the Smarty compiler

It does compare the timestamps of template source and the compiled templates and checks the force compile configuration

@return boolean true if the template must be compiled
Returns if the current template must be compiled by the Smarty compiler