src/View/SSViewer.php
public static function execute_string($content, $data, $arguments = null, $globalRequirements = false)
    {
        $v = SSViewer::fromString($content);

        if ($globalRequirements) {
            $v->includeRequirements(false);
        } else {
            //nest a requirements backend for our template rendering
            $origBackend = Requirements::backend();
            Requirements::set_backend(Requirements_Backend::create());
        }
        try {
            return $v->process($data, $arguments);
        } finally {
            if (!$globalRequirements) {
                Requirements::set_backend($origBackend);
            }
        }
    }
public static function execute_string($content, $data, $arguments = null, $globalRequirements = false)
    {
        $v = SSViewer::fromString($content);

        if ($globalRequirements) {
            $v->includeRequirements(false);
        } else {
            //nest a requirements backend for our template rendering
            $origBackend = Requirements::backend();
            Requirements::set_backend(Requirements_Backend::create());
        }
        try {
            return $v->process($data, $arguments);
        } finally {
            if (!$globalRequirements) {
                Requirements::set_backend($origBackend);
            }
        }
    }
public static function execute_string ( $ content , $ data , $ arguments = null , $ globalRequirements = false ) { $ v = SSViewer :: fromString ( $ content ) ; if ( $ globalRequirements ) { $ v -> includeRequirements ( false ) ; } else { //nest a requirements backend for our template rendering $ origBackend = Requirements :: backend ( ) ; Requirements :: set_backend ( Requirements_Backend :: create ( ) ) ; } try { return $ v -> process ( $ data , $ arguments ) ; } finally { if ( ! $ globalRequirements ) { Requirements :: set_backend ( $ origBackend ) ; } } }
Execute the evaluated string, passing it the given data.
Used by partial caching to evaluate custom cache keys expressed using
template expressions

@param string $content Input string
@param mixed $data Data context
@param array $arguments Additional arguments
@param bool $globalRequirements

@return string Evaluated result
Execute the evaluated string passing it the given data . Used by partial caching to evaluate custom cache keys expressed using template expressions