Re: [PHP3] PHP Template Engine spec revision 0.35

[email protected] (Kristian Köhntopp) Thu, 24 Feb 2000 16:50:09 +0100
Newsgroups php.template
Organization NetUSE GmbH
Message-ID <[email protected]>
Andrei Zmievski wrote:
> I've posted revision 0.35 of PHP Template Engine specification to
> http://va.php.net/~andrei/tpl-engine-spec.txt. For more info, go to
> http://va.php.net/~andrei/tpl-engine.html.

My code is loading a template which has been tampered with by
the designer with a clue deficiency. I want to

- get a list of all variables used in the template

  $hash = tmpl_variable_list(resource tmpl);
  reset($hash);
  while(list($k, $v) = each($hash)):
    print "variable named $k ist of type $v\n";
  endwhile;

  with $v being either assigned, config or internal.

- check my array values against the template and get a
  list of all variables within that template which have 
  not yet been assigned a value

  $hash = tmpl_variable_unassigned(resource tmpl)
  # as above

- define error handling for fetch and print operations:
  - unassigned variables are left untouched in the output
  - unassigned variables are substituted by HTML comments
    <!-- unassigned variable $imanunassignedvariable -->
  - unassigned variables are substited by nothing

  define(TMPL_KEEP, 0);
  define(TMPL_COMMENT, 1);
  define(TMPL_REMOVE, 2);

  tmpl_handle_errors(int mode);

Kristian

-- 
Kristian Köhntopp, NetUSE Kommunikationstechnologie GmbH
Siemenswall, D-24107 Kiel, Germany, +49 431 386 436 00
Using PHP3? See our web development library at
http://phplib.netuse.de/ (We have moved! Update your bookmarks!)