public function precompile($template, $options = [])
    {
        if ($this->isRuntime) {
            throw new \BadMethodCallException("Cannot precompile templates using runtime");
        }

        $this->v8->template = $template;
        $this->v8->options = $options;
        return $this->v8->executeString(
            'jsHb.precompile(phpHb.template, phpHb.options)',
            __CLASS__ . '::' . __METHOD__ . '()'
        );
    }
public function precompile($template, $options = [])
    {
        if ($this->isRuntime) {
            throw new \BadMethodCallException("Cannot precompile templates using runtime");
        }

        $this->v8->template = $template;
        $this->v8->options = $options;
        return $this->v8->executeString(
            'jsHb.precompile(phpHb.template, phpHb.options)',
            __CLASS__ . '::' . __METHOD__ . '()'
        );
    }
public function precompile ( $ template , $ options = [ ] ) { if ( $ this -> isRuntime ) { throw new \ BadMethodCallException ( "Cannot precompile templates using runtime" ) ; } $ this -> v8 -> template = $ template ; $ this -> v8 -> options = $ options ; return $ this -> v8 -> executeString ( 'jsHb.precompile(phpHb.template, phpHb.options)' , __CLASS__ . '::' . __METHOD__ . '()' ) ; }
Precompiles a given template so it can be sent to the client and executed without compilation
@param string $template
@param array $options
@return mixed
Precompiles a given template so it can be sent to the client and executed without compilation