cvs: peardoc /en/package/html html-template-it.xml /en/package/html/html-template-it getglobalvariables.xml

From: Date: Thu, 30 Nov 2006 21:43:57 +0000
Subject: cvs: peardoc /en/package/html html-template-it.xml /en/package/html/html-template-it getglobalvariables.xml
Groups: php.pear.doc 
Request: Send a blank email to pear-doc+get-8947@lists.php.net to get a copy of this message
dsp Thu Nov 30 21:43:57 2006 UTC Added files: /peardoc/en/package/html/html-template-it getglobalvariables.xml Modified files: /peardoc/en/package/html html-template-it.xml Log: Add end-user doc for HTML_Template_IT::getGlobalvariables() http://cvs.php.net/viewvc.cgi/peardoc/en/package/html/html-template-it.xml?r1=1.3&r2=1.4&diff_format=u Index: peardoc/en/package/html/html-template-it.xml diff -u peardoc/en/package/html/html-template-it.xml:1.3 peardoc/en/package/html/html-template-it.xml:1.4 --- peardoc/en/package/html/html-template-it.xml:1.3 Thu Nov 30 18:46:31 2006 +++ peardoc/en/package/html/html-template-it.xml Thu Nov 30 21:43:57 2006 @@ -1,10 +1,11 @@ -<!-- $Revision: 1.3 $ --> +<!-- $Revision: 1.4 $ --> <sect1 id="package.html.html-template-it"> <title>HTML_Template_IT</title> &package.html.html-template-it.intro; &package.html.html-template-it.get; &package.html.html-template-it.html-template-it; + &package.html.html-template-it.getglobalvariables; &package.html.html-template-it.loadtemplatefile; &package.html.html-template-it.parse; &package.html.html-template-it.parsecurrentblock; http://cvs.php.net/viewvc.cgi/peardoc/en/package/html/html-template-it/getglobalvariables.xml?view=markup&rev=1.1 Index: peardoc/en/package/html/html-template-it/getglobalvariables.xml +++ peardoc/en/package/html/html-template-it/getglobalvariables.xml <!-- $Revision: 1.1 $ --> <refentry id="package.html.html-template-it.getglobalvariables"> <refnamediv> <refname>HTML_Template_IT::getGlobalvariables()</refname> <refpurpose>returns an array of all global variables from the variable cache</refpurpose> </refnamediv> <refsynopsisdiv> <funcsynopsis> <funcsynopsisinfo> require_once 'HTML/Template/IT.php'; </funcsynopsisinfo> <funcprototype> <funcdef>array <function>HTML_Template_IT::getGlobalvariables</function></funcdef> <paramdef></paramdef> </funcprototype> </funcsynopsis> </refsynopsisdiv> <refsect1 id="package.html.html-template-it.getglobalvariables.desc"> &title.desc; <para> Gets an array of all global variables in the variable cache. Only variables that are filled using <function>HTML_Template_IT::setVariable</function> are returned. The returned has two values. The first values holds an array with the names of the global variables, the second value holds an array with all the values. </para> </refsect1> <refsect1 id="package.html.html-template-it.getglobalvariables.return"> &title.returns; <para> <parameter>array</parameter> - An array. The key 0 holds an array with the names of all filled variables, the key 1 holds an array with names of the according values. </para> </refsect1> <refsect1 id="package.html.html-template-it.getglobalvariables.example"> &title.example; <example> <title>Script</title> <programlisting role="php"> <![CDATA[ <?php require_once("HTML/Template/IT.php"); $template = <<<EOF <!-- BEGIN a --> Hello {username} <!-- END a --> Welcome to {page}, You are visitor number {visitorcount}. EOF; $tpl = new HTML_Template_IT('.'); $tpl->setTemplate($template); // set the {page} variable. It will be returned by getGlobalvariables then. $tpl->setVariable("page", "http://example.com"); $tpl->setVariable("username", "foo"); // getGlobalvariables won't return {username} as it is not a global variable // It won't return {visitorcount} as it is not set print_r($tpl->getGlobalvariables()); ?> ]]> </programlisting> </example> <example> <title>The output</title> <programlisting> <![CDATA[ Array ( [0] => Array ( [0] => @{page}@ ) [1] => Array ( [0] => http://example.com ) ) ]]> </programlisting> </example> </refsect1> <refsect1 id="package.html.html-template-it.getglobalvariables.note"> &title.note; &note.notstatic; </refsect1> <refsect1 id="package.html.html-template-it.getglobalvariables.see"> &title.see; <para> <link linkend="package.html.html-template-it.setvariable"> <function>HTML_Template_IT::setVariable</function></link>, </para> </refsect1> </refentry> <!-- Keep this comment at the end of the file Local variables: mode: sgml sgml-omittag:t sgml-shorttag:t sgml-minimize-attributes:nil sgml-always-quote-attributes:t sgml-indent-step:1 sgml-indent-data:t sgml-parent-document:nil sgml-default-dtd-file:"../../../../manual.ced" sgml-exposed-tags:nil sgml-local-catalogs:nil sgml-local-ecat-files:nil End: vim600: syn=xml fen fdm=syntax fdl=2 si vim: et tw=78 syn=sgml vi: ts=1 sw=1 -->

« previous php.pear.doc (#8947) next »