mirror of
				https://github.com/smarty-php/smarty.git
				synced 2025-11-04 06:11:37 +01:00 
			
		
		
		
	
		
			
	
	
		
			65 lines
		
	
	
		
			1.8 KiB
		
	
	
	
		
			XML
		
	
	
	
	
	
		
		
			
		
	
	
			65 lines
		
	
	
		
			1.8 KiB
		
	
	
	
		
			XML
		
	
	
	
	
	
| 
								 | 
							
								<?xml version="1.0" encoding="iso-8859-1"?>
							 | 
						|||
| 
								 | 
							
								<!-- $Revision$ -->
							 | 
						|||
| 
								 | 
							
								<refentry id="api.assign.by.ref">
							 | 
						|||
| 
								 | 
							
								 <refnamediv>
							 | 
						|||
| 
								 | 
							
								  <refname>assign_by_ref</refname>
							 | 
						|||
| 
								 | 
							
								  <refpurpose></refpurpose>
							 | 
						|||
| 
								 | 
							
								 </refnamediv>
							 | 
						|||
| 
								 | 
							
								 <refsect1>
							 | 
						|||
| 
								 | 
							
								  <title />
							 | 
						|||
| 
								 | 
							
								  <methodsynopsis>
							 | 
						|||
| 
								 | 
							
								   <type>void</type><methodname>assign_by_ref</methodname>
							 | 
						|||
| 
								 | 
							
								   <methodparam><type>string</type><parameter>varname</parameter></methodparam>
							 | 
						|||
| 
								 | 
							
								   <methodparam><type>mixed</type><parameter>var</parameter></methodparam>
							 | 
						|||
| 
								 | 
							
								  </methodsynopsis>
							 | 
						|||
| 
								 | 
							
								  <para>
							 | 
						|||
| 
								 | 
							
								   Si usa per assegnare valori ai template per riferimento invece di farne una
							 | 
						|||
| 
								 | 
							
								   copia. Consultate il manuale PHP sui riferimenti alle variabili per una 
							 | 
						|||
| 
								 | 
							
								   spiegazione.
							 | 
						|||
| 
								 | 
							
								  </para>
							 | 
						|||
| 
								 | 
							
								  <note>
							 | 
						|||
| 
								 | 
							
								   <title>Nota tecnica</title>
							 | 
						|||
| 
								 | 
							
								   <para>
							 | 
						|||
| 
								 | 
							
								    Questo metodo si usa per assegnare valori ai template per riferimento.
							 | 
						|||
| 
								 | 
							
								    Se assegnate una variabile per riferimento e poi cambiate il suo 
							 | 
						|||
| 
								 | 
							
								    valore, il template vedr<64> il valore modificato. Per gli oggetti,
							 | 
						|||
| 
								 | 
							
								    assign_by_ref() evita anche la copia in memoria dell'oggetto
							 | 
						|||
| 
								 | 
							
								    assegnato. Consultate il manuale PHP sui riferimenti alle variabili
							 | 
						|||
| 
								 | 
							
								    per una spiegazione approfondita.
							 | 
						|||
| 
								 | 
							
								   </para>
							 | 
						|||
| 
								 | 
							
								  </note>
							 | 
						|||
| 
								 | 
							
								  <example>
							 | 
						|||
| 
								 | 
							
								   <title>assign_by_ref</title>
							 | 
						|||
| 
								 | 
							
								   <programlisting role="php">
							 | 
						|||
| 
								 | 
							
								<![CDATA[
							 | 
						|||
| 
								 | 
							
								<?php
							 | 
						|||
| 
								 | 
							
								// passaggio di coppie nome/valore
							 | 
						|||
| 
								 | 
							
								$smarty->assign_by_ref('Name', $myname);
							 | 
						|||
| 
								 | 
							
								$smarty->assign_by_ref('Address', $address);
							 | 
						|||
| 
								 | 
							
								?>
							 | 
						|||
| 
								 | 
							
								]]>
							 | 
						|||
| 
								 | 
							
								   </programlisting>
							 | 
						|||
| 
								 | 
							
								  </example>
							 | 
						|||
| 
								 | 
							
								 </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
							 | 
						|||
| 
								 | 
							
								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
							 | 
						|||
| 
								 | 
							
								-->
							 |