src/Twig.php
public function fetchFromString($string ="", $data = [])
    {
        $data = array_merge($this->defaultVariables, $data);

        return $this->environment->createTemplate($string)->render($data);
    }
public function fetchFromString($string ="", $data = [])
    {
        $data = array_merge($this->defaultVariables, $data);

        return $this->environment->createTemplate($string)->render($data);
    }
public function fetchFromString ( $ string = "" , $ data = [ ] ) { $ data = array_merge ( $ this -> defaultVariables , $ data ) ; return $ this -> environment -> createTemplate ( $ string ) -> render ( $ data ) ; }
Fetch rendered string

@param  string $string String
@param  array  $data   Associative array of template variables

@return string
Fetch rendered string