mirror of
				https://github.com/smarty-php/smarty.git
				synced 2025-10-31 12:21:36 +01:00 
			
		
		
		
	
		
			
				
	
	
		
			55 lines
		
	
	
		
			1.8 KiB
		
	
	
	
		
			XML
		
	
	
	
	
	
			
		
		
	
	
			55 lines
		
	
	
		
			1.8 KiB
		
	
	
	
		
			XML
		
	
	
	
	
	
| <?xml version="1.0" encoding="iso-8859-1"?>
 | |
| <!-- $Revision$ -->
 | |
| <!-- EN-Revision: 1.1 Maintainer: nobody Status: ready -->     
 | |
| <sect1 id="api.assign.by.ref">
 | |
|       <title>assign_by_ref</title>
 | |
|       <funcsynopsis>
 | |
|        <funcprototype>
 | |
|         <funcdef>void <function>assign_by_ref</function></funcdef>
 | |
|         <paramdef>string <parameter>varname</parameter></paramdef>
 | |
|         <paramdef>mixed <parameter>var</parameter></paramdef>
 | |
|        </funcprototype>
 | |
|       </funcsynopsis>
 | |
|       <para>
 | |
| 	   Isso é usado para fixar valores para o template por referência ao invés de fazer uma cópia.
 | |
| 	   Veja o manual do PHP na parte sobre referência de variáveis para uma explanação mais detalhada.
 | |
|       </para>
 | |
| 	  <note>
 | |
| 	  <title>Notas Técnicas</title>
 | |
| 	  <para>
 | |
| 	   Isso é usado para fixar valores para o template por referência.
 | |
| 	   Se você fixar uma variável por referência e então alterar o valor dela,
 | |
| 	   o valor fixado enxergará o valor alterado também.
 | |
| 	   Para objetos, assign_by_ref() também restringe uma cópia de objetos fixados
 | |
| 	   em memória.
 | |
| 	   Veja o manual do php em refereciando variáveis para uma melhor explanação.   
 | |
| 	  </para>
 | |
| 	  </note>
 | |
|       <example>
 | |
|        <title>assign_by_ref</title>
 | |
|        <programlisting>
 | |
| // passing name/value pairs
 | |
| $smarty->assign_by_ref("Name",$myname);
 | |
| $smarty->assign_by_ref("Address",$address);</programlisting>
 | |
| </example>
 | |
| </sect1>
 | |
| <!-- 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
 | |
| indent-tabs-mode:nil
 | |
| 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
 | |
| --> |