Box\Brainy\Templates\Template::recompileAndLoadCopy PHP 메소드

recompileAndLoadCopy() 공개 메소드

Recompiles the template and also writes a copy of the compiled code to a temporary destination to load from. This is so that stale compiled code will be refreshed in HHVM, which does not support requiring the same file twice even if it has been changed.
public recompileAndLoadCopy ( ) : void
리턴 void
    public function recompileAndLoadCopy()
    {
        $code = $this->compileTemplateSource();
        $tempFilepath = $this->compiled->filepath . '.temp' . uniqid() . '.php';
        self::writeFile($tempFilepath, $code, $this->smarty);
        $this->compiled->filepath = $tempFilepath;
        $this->compiled->load($this);
    }