original_string: public static function parseTemplate($tag, $replacements)
          {
  //          get template
              $template = self::getTemplate($tag);
              $search = $replace = array();
  //          compile search and replace values for replacement
              foreach ($replacements as $varname => $varvalue)
              {
                  array_push($search, '%'.strtolower($varname).'%');
                  array_push($replace, $varvalue);
              }
              return str_replace($search, $replace, $template);
          }
code: public static function parseTemplate($tag, $replacements)
          {
  //          get template
              $template = self::getTemplate($tag);
              $search = $replace = array();
  //          compile search and replace values for replacement
              foreach ($replacements as $varname => $varvalue)
              {
                  array_push($search, '%'.strtolower($varname).'%');
                  array_push($replace, $varvalue);
              }
              return str_replace($search, $replace, $template);
          }
code_tokens: public static function parseTemplate ( $ tag , $ replacements ) { //          get template $ template = self :: getTemplate ( $ tag ) ; $ search = $ replace = array ( ) ; //          compile search and replace values for replacement foreach ( $ replacements as $ varname => $ varvalue ) { array_push ( $ search , '%' . strtolower ( $ varname ) . '%' ) ; array_push ( $ replace , $ varvalue ) ; } return str_replace ( $ search , $ replace , $ template ) ; }
docstring: A simple templater, replaces %VARNAME% with the value.
  @access public
  @param array $tag The tag array.
  @param array $replacements The array of search and replace values.
docstring_tokens: A simple templater replaces %VARNAME% with the value .