original_string: public static function renderBlocks($name, $args = array())
      {
          global $PPHP, $_SESSION;
  
          array_merge_assoc(
              self::$_stash,
              $args,
              array(
                  'config' => $PPHP['config'],
                  'session' => $_SESSION,
                  'req' => grab('request')
              )
          );
          try {
              $template = self::$_twig->loadTemplate($name);
              $blockNames = $template->getBlockNames(self::$_stash);
              $results = array();
              foreach ($blockNames as $blockName) {
                  $results[$blockName] = $template->renderBlock($blockName, self::$_stash);
              };
          } catch (\Exception $e) {
              echo $e->getMessage();
          };
          return $results;
      }
code: public static function renderBlocks($name, $args = array())
      {
          global $PPHP, $_SESSION;
  
          array_merge_assoc(
              self::$_stash,
              $args,
              array(
                  'config' => $PPHP['config'],
                  'session' => $_SESSION,
                  'req' => grab('request')
              )
          );
          try {
              $template = self::$_twig->loadTemplate($name);
              $blockNames = $template->getBlockNames(self::$_stash);
              $results = array();
              foreach ($blockNames as $blockName) {
                  $results[$blockName] = $template->renderBlock($blockName, self::$_stash);
              };
          } catch (\Exception $e) {
              echo $e->getMessage();
          };
          return $results;
      }
code_tokens: public static function renderBlocks ( $ name , $ args = array ( ) ) { global $ PPHP , $ _SESSION ; array_merge_assoc ( self :: $ _stash , $ args , array ( 'config' => $ PPHP [ 'config' ] , 'session' => $ _SESSION , 'req' => grab ( 'request' ) ) ) ; try { $ template = self :: $ _twig -> loadTemplate ( $ name ) ; $ blockNames = $ template -> getBlockNames ( self :: $ _stash ) ; $ results = array ( ) ; foreach ( $ blockNames as $ blockName ) { $ results [ $ blockName ] = $ template -> renderBlock ( $ blockName , self :: $ _stash ) ; } ; } catch ( \ Exception $ e ) { echo $ e -> getMessage ( ) ; } ; return $ results ; }
docstring: Render all blocks from a template
  
  @param string $name File name from within templates/
  @param array  $args Associative array of variables to pass along
  
  @return array Associative array of all blocks rendered from the template
docstring_tokens: Render all blocks from a template