Location: PHPKode > projects > Simple Web Account Manager > swam-1.0beta2/phpdoc/__filesource/fsource_swam__transactionTransaction.class.inc.html
<?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
  <html xmlns="http://www.w3.org/1999/xhtml">
		<head>
			<!-- template designed by Marco Von Ballmoos -->
			<title>File Source for Transaction.class.inc</title>
			<link rel="stylesheet" href="../media/stylesheet.css" />
			<meta http-equiv='Content-Type' content='text/html; charset=iso-8859-1'/>
		</head>
		<body>
						<h1>Source for file Transaction.class.inc</h1>
<p>Documentation is available at <a href="../swam/_transaction---Transaction.class.inc.html">Transaction.class.inc</a></p>
<div class="src-code">
<div class="src-code"><ol><li><div class="src-line"><a name="a1"></a><span class="src-php">&lt;?php</span></div></li>
<li><div class="src-line"><a name="a2"></a>&nbsp;</div></li>
<li><div class="src-line"><a name="a3"></a><span class="src-comm">/*</span></div></li>
<li><div class="src-line"><a name="a4"></a><span class="src-comm">*&nbsp;SWAM&nbsp;(Simple&nbsp;Web&nbsp;Account&nbsp;Manager)&nbsp;is&nbsp;a&nbsp;personal&nbsp;finance&nbsp;manager</span></div></li>
<li><div class="src-line"><a name="a5"></a><span class="src-comm">*&nbsp;written&nbsp;in&nbsp;PHP.</span></div></li>
<li><div class="src-line"><a name="a6"></a><span class="src-comm">*&nbsp;Copyright&nbsp;(C)&nbsp;2004-2009&nbsp;Mathieu&nbsp;Peltier.</span></div></li>
<li><div class="src-line"><a name="a7"></a><span class="src-comm">*&nbsp;Contact:&nbsp;mpeltier&nbsp;at&nbsp;users.sourceforge.net</span></div></li>
<li><div class="src-line"><a name="a8"></a><span class="src-comm">*</span></div></li>
<li><div class="src-line"><a name="a9"></a><span class="src-comm">*&nbsp;This&nbsp;program&nbsp;is&nbsp;free&nbsp;software:&nbsp;you&nbsp;can&nbsp;redistribute&nbsp;it&nbsp;and/or&nbsp;modify</span></div></li>
<li><div class="src-line"><a name="a10"></a><span class="src-comm">*&nbsp;it&nbsp;under&nbsp;the&nbsp;terms&nbsp;of&nbsp;the&nbsp;GNU&nbsp;General&nbsp;Public&nbsp;License&nbsp;as&nbsp;published&nbsp;by</span></div></li>
<li><div class="src-line"><a name="a11"></a><span class="src-comm">*&nbsp;the&nbsp;Free&nbsp;Software&nbsp;Foundation,&nbsp;either&nbsp;version&nbsp;3&nbsp;of&nbsp;the&nbsp;License,&nbsp;or</span></div></li>
<li><div class="src-line"><a name="a12"></a><span class="src-comm">*&nbsp;(at&nbsp;your&nbsp;option)&nbsp;any&nbsp;later&nbsp;version.</span></div></li>
<li><div class="src-line"><a name="a13"></a><span class="src-comm">*</span></div></li>
<li><div class="src-line"><a name="a14"></a><span class="src-comm">*&nbsp;This&nbsp;program&nbsp;is&nbsp;distributed&nbsp;in&nbsp;the&nbsp;hope&nbsp;that&nbsp;it&nbsp;will&nbsp;be&nbsp;useful,&nbsp;but</span></div></li>
<li><div class="src-line"><a name="a15"></a><span class="src-comm">*&nbsp;WITHOUT&nbsp;ANY&nbsp;WARRANTY;&nbsp;without&nbsp;even&nbsp;the&nbsp;implied&nbsp;warranty&nbsp;of</span></div></li>
<li><div class="src-line"><a name="a16"></a><span class="src-comm">*&nbsp;MERCHANTABILITY&nbsp;or&nbsp;FITNESS&nbsp;FOR&nbsp;A&nbsp;PARTICULAR&nbsp;PURPOSE.&nbsp;See&nbsp;the&nbsp;GNU</span></div></li>
<li><div class="src-line"><a name="a17"></a><span class="src-comm">*&nbsp;General&nbsp;Public&nbsp;License&nbsp;for&nbsp;more&nbsp;details.</span></div></li>
<li><div class="src-line"><a name="a18"></a><span class="src-comm">*</span></div></li>
<li><div class="src-line"><a name="a19"></a><span class="src-comm">*&nbsp;You&nbsp;should&nbsp;have&nbsp;received&nbsp;a&nbsp;copy&nbsp;of&nbsp;the&nbsp;GNU&nbsp;General&nbsp;Public&nbsp;License</span></div></li>
<li><div class="src-line"><a name="a20"></a><span class="src-comm">*&nbsp;along&nbsp;with&nbsp;this&nbsp;program.&nbsp;If&nbsp;not,&nbsp;see&nbsp;&lt;http://www.gnu.org/licenses/&gt;.</span></div></li>
<li><div class="src-line"><a name="a21"></a><span class="src-comm">*</span></div></li>
<li><div class="src-line"><a name="a22"></a><span class="src-comm">*&nbsp;Initial&nbsp;developer(s):&nbsp;Mathieu&nbsp;Peltier.</span></div></li>
<li><div class="src-line"><a name="a23"></a><span class="src-comm">*&nbsp;Contributor(s):</span></div></li>
<li><div class="src-line"><a name="a24"></a><span class="src-comm">*/</span></div></li>
<li><div class="src-line"><a name="a25"></a>&nbsp;</div></li>
<li><div class="src-line"><a name="a26"></a><span class="src-doc">/**</span></div></li>
<li><div class="src-line"><a name="a27"></a><span class="src-doc">&nbsp;*&nbsp;</span><span class="src-doc-coretag">@package</span><span class="src-doc">&nbsp;swam</span></div></li>
<li><div class="src-line"><a name="a28"></a><span class="src-doc">&nbsp;*&nbsp;</span><span class="src-doc-coretag">@author</span><span class="src-doc">&nbsp;Mathieu&nbsp;Peltier&nbsp;&lt;hide@address.com&gt;</span></div></li>
<li><div class="src-line"><a name="a29"></a><span class="src-doc">&nbsp;*/</span></div></li>
<li><div class="src-line"><a name="a30"></a>&nbsp;</div></li>
<li><div class="src-line"><a name="a31"></a><span class="src-inc">require_once</span><span class="src-sym">(</span><span class="src-str">'pre.inc'</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a32"></a>&nbsp;</div></li>
<li><div class="src-line"><a name="a33"></a><span class="src-doc">/**</span></div></li>
<li><div class="src-line"><a name="a34"></a><span class="src-doc">&nbsp;*&nbsp;Transaction&nbsp;implementation&nbsp;using&nbsp;PDO.</span></div></li>
<li><div class="src-line"><a name="a35"></a><span class="src-doc">&nbsp;*</span></div></li>
<li><div class="src-line"><a name="a36"></a><span class="src-doc">&nbsp;*&nbsp;</span><span class="src-doc-coretag">@package</span><span class="src-doc">&nbsp;swam</span></div></li>
<li><div class="src-line"><a name="a37"></a><span class="src-doc">&nbsp;*/</span></div></li>
<li><div class="src-line"><a name="a38"></a><span class="src-key">class&nbsp;</span><a href="../swam/Transaction.html">Transaction</a>&nbsp;<span class="src-key">extends&nbsp;</span><a href="../swam/PersistentObject.html">PersistentObject</a>&nbsp;<span class="src-key">implements&nbsp;</span><a href="../swam/ITransaction.html">ITransaction</a>&nbsp;<span class="src-sym">{</span></div></li>
<li><div class="src-line"><a name="a39"></a>&nbsp;</div></li>
<li><div class="src-line"><a name="a40"></a>&nbsp;&nbsp;<span class="src-key">const&nbsp;</span><a href="../swam/Transaction.html#constNAME_MAX_LENGTH">NAME_MAX_LENGTH</a>&nbsp;=&nbsp;<span class="src-num">100</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a41"></a>&nbsp;&nbsp;<span class="src-key">const&nbsp;</span><a href="../swam/Transaction.html#constAMOUNT_MAX_LENGTH">AMOUNT_MAX_LENGTH</a>&nbsp;=&nbsp;<span class="src-num">50</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a42"></a>&nbsp;&nbsp;<span class="src-key">const&nbsp;</span><a href="../swam/Transaction.html#constCOMMENT_MAX_LENGTH">COMMENT_MAX_LENGTH</a>&nbsp;=&nbsp;<span class="src-num">255</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a43"></a>&nbsp;</div></li>
<li><div class="src-line"><a name="a44"></a>&nbsp;&nbsp;<span class="src-comm">/*</span></div></li>
<li><div class="src-line"><a name="a45"></a><span class="src-comm">&nbsp;&nbsp;*&nbsp;-----------------------------</span></div></li>
<li><div class="src-line"><a name="a46"></a><span class="src-comm">&nbsp;&nbsp;*&nbsp;Static&nbsp;methods</span></div></li>
<li><div class="src-line"><a name="a47"></a><span class="src-comm">&nbsp;&nbsp;*&nbsp;-----------------------------</span></div></li>
<li><div class="src-line"><a name="a48"></a><span class="src-comm">&nbsp;&nbsp;*/</span></div></li>
<li><div class="src-line"><a name="a49"></a>&nbsp;</div></li>
<li><div class="src-line"><a name="a50"></a>&nbsp;&nbsp;<span class="src-doc">/**</span></div></li>
<li><div class="src-line"><a name="a51"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;Returns&nbsp;the&nbsp;list&nbsp;of&nbsp;available&nbsp;means&nbsp;of&nbsp;payment.</span></div></li>
<li><div class="src-line"><a name="a52"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*</span></div></li>
<li><div class="src-line"><a name="a53"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;</span><span class="src-doc-coretag">@return&nbsp;</span><span class="src-doc-type">array&nbsp;</span></div></li>
<li><div class="src-line"><a name="a54"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*/</span></div></li>
<li><div class="src-line"><a name="a55"></a>&nbsp;&nbsp;<span class="src-key">public&nbsp;</span><span class="src-key">static&nbsp;</span><span class="src-key">function&nbsp;</span><a href="../swam/Transaction.html#methodget_means_of_payment">get_means_of_payment</a><span class="src-sym">(</span><span class="src-sym">)&nbsp;</span><span class="src-sym">{</span></div></li>
<li><div class="src-line"><a name="a56"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-key">return&nbsp;</span><span class="src-key">array</span><span class="src-sym">(</span><span class="src-str">'cash'&nbsp;</span>=&gt;&nbsp;<a href="http://www.php.net/_">_</a><span class="src-sym">(</span><span class="src-str">'Cash'</span><span class="src-sym">)</span><span class="src-sym">,</span></div></li>
<li><div class="src-line"><a name="a57"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-str">'cheque'&nbsp;</span>=&gt;&nbsp;<a href="http://www.php.net/_">_</a><span class="src-sym">(</span><span class="src-str">'Cheque'</span><span class="src-sym">)</span><span class="src-sym">,</span></div></li>
<li><div class="src-line"><a name="a58"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-str">'credit_transfer'&nbsp;</span>=&gt;&nbsp;<a href="http://www.php.net/_">_</a><span class="src-sym">(</span><span class="src-str">'Credit&nbsp;Transfert'</span><span class="src-sym">)</span><span class="src-sym">,</span></div></li>
<li><div class="src-line"><a name="a59"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-str">'credit_card'&nbsp;</span>=&gt;&nbsp;<a href="http://www.php.net/_">_</a><span class="src-sym">(</span><span class="src-str">'Credit&nbsp;Card'</span><span class="src-sym">))</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a60"></a>&nbsp;&nbsp;<span class="src-sym">}</span></div></li>
<li><div class="src-line"><a name="a61"></a>&nbsp;</div></li>
<li><div class="src-line"><a name="a62"></a>&nbsp;&nbsp;<span class="src-comm">//&nbsp;-----------------------------</span></div></li>
<li><div class="src-line"><a name="a63"></a>&nbsp;&nbsp;<span class="src-comm">//&nbsp;Constructor</span></div></li>
<li><div class="src-line"><a name="a64"></a>&nbsp;&nbsp;<span class="src-comm">//&nbsp;-----------------------------</span></div></li>
<li><div class="src-line"><a name="a65"></a>&nbsp;</div></li>
<li><div class="src-line"><a name="a66"></a>&nbsp;&nbsp;<span class="src-doc">/**</span></div></li>
<li><div class="src-line"><a name="a67"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;Creates&nbsp;a&nbsp;new&nbsp;Transaction.&nbsp;The&nbsp;method&nbsp;does&nbsp;NOT&nbsp;add&nbsp;the</span></div></li>
<li><div class="src-line"><a name="a68"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;transaction&nbsp;into&nbsp;the&nbsp;database&nbsp;as&nbsp;long&nbsp;as&nbsp;store()&nbsp;method&nbsp;is&nbsp;not</span></div></li>
<li><div class="src-line"><a name="a69"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;called.&nbsp;If&nbsp;the&nbsp;transaction&nbsp;has&nbsp;been&nbsp;already&nbsp;stored&nbsp;in&nbsp;the</span></div></li>
<li><div class="src-line"><a name="a70"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;database,&nbsp;the&nbsp;transaction&nbsp;id&nbsp;must&nbsp;be&nbsp;given.&nbsp;Otherwise&nbsp;the&nbsp;id&nbsp;will&nbsp;be</span></div></li>
<li><div class="src-line"><a name="a71"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;set&nbsp;when&nbsp;the&nbsp;transaction&nbsp;will&nbsp;be&nbsp;saved.</span></div></li>
<li><div class="src-line"><a name="a72"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*</span></div></li>
<li><div class="src-line"><a name="a73"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;</span><span class="src-doc-coretag">@param&nbsp;</span><span class="src-doc-type">array&nbsp;</span><span class="src-doc-var">$data&nbsp;</span><span class="src-doc">account&nbsp;data&nbsp;to&nbsp;use&nbsp;(associate&nbsp;array</span></div></li>
<li><div class="src-line"><a name="a74"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;&nbsp;containing:&nbsp;name,&nbsp;account&nbsp;object,&nbsp;is_debit,&nbsp;mean_of_payment_code,</span></div></li>
<li><div class="src-line"><a name="a75"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;&nbsp;date,&nbsp;comment,&nbsp;is_valid&nbsp;flag).</span></div></li>
<li><div class="src-line"><a name="a76"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;</span><span class="src-doc-coretag">@param&nbsp;</span><span class="src-doc-type">$transaction_id&nbsp;</span></div></li>
<li><div class="src-line"><a name="a77"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;</span><span class="src-doc-tag">@exception</span><span class="src-doc">&nbsp;TransactionException</span></div></li>
<li><div class="src-line"><a name="a78"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;</span><span class="src-doc-tag">@exception</span><span class="src-doc">&nbsp;IllegalArgumentException&nbsp;if&nbsp;the&nbsp;transaction&nbsp;data&nbsp;are</span></div></li>
<li><div class="src-line"><a name="a79"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;&nbsp;not&nbsp;valid.</span></div></li>
<li><div class="src-line"><a name="a80"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*/</span></div></li>
<li><div class="src-line"><a name="a81"></a>&nbsp;&nbsp;<span class="src-key">public&nbsp;</span><span class="src-key">function&nbsp;</span><a href="../swam/Transaction.html#method__construct">__construct</a><span class="src-sym">(</span><span class="src-var">$data</span><span class="src-sym">,&nbsp;</span><span class="src-var">$transaction_id&nbsp;</span>=&nbsp;-<span class="src-num">1</span><span class="src-sym">)&nbsp;</span><span class="src-sym">{</span></div></li>
<li><div class="src-line"><a name="a82"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../swam/Transaction.html#methodset_id">set_id</a><span class="src-sym">(</span><span class="src-var">$transaction_id</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a83"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../swam/Transaction.html#methodset_data">set_data</a><span class="src-sym">(</span><span class="src-var">$data</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a84"></a>&nbsp;&nbsp;<span class="src-sym">}</span></div></li>
<li><div class="src-line"><a name="a85"></a>&nbsp;</div></li>
<li><div class="src-line"><a name="a86"></a>&nbsp;&nbsp;<span class="src-comm">/*</span></div></li>
<li><div class="src-line"><a name="a87"></a><span class="src-comm">&nbsp;&nbsp;*&nbsp;-----------------------------</span></div></li>
<li><div class="src-line"><a name="a88"></a><span class="src-comm">&nbsp;&nbsp;*&nbsp;&nbsp;Instance&nbsp;methods</span></div></li>
<li><div class="src-line"><a name="a89"></a><span class="src-comm">&nbsp;&nbsp;*&nbsp;-----------------------------</span></div></li>
<li><div class="src-line"><a name="a90"></a><span class="src-comm">&nbsp;&nbsp;*/</span></div></li>
<li><div class="src-line"><a name="a91"></a>&nbsp;</div></li>
<li><div class="src-line"><a name="a92"></a>&nbsp;&nbsp;<span class="src-doc">/**</span></div></li>
<li><div class="src-line"><a name="a93"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;</span><span class="src-doc-coretag">@see</span><span class="src-doc">&nbsp;PersistentObject::set_id($id)</span></div></li>
<li><div class="src-line"><a name="a94"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*/</span></div></li>
<li><div class="src-line"><a name="a95"></a>&nbsp;&nbsp;<span class="src-key">protected&nbsp;</span><span class="src-key">function&nbsp;</span><a href="../swam/Transaction.html#methodset_id">set_id</a><span class="src-sym">(</span><span class="src-var">$id</span><span class="src-sym">)&nbsp;</span><span class="src-sym">{</span></div></li>
<li><div class="src-line"><a name="a96"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-id"><a href="../swam/Utils.html">Utils</a></span><span class="src-sym">::</span><a href="../swam/Utils.html#methodcheck_transaction_id">check_transaction_id</a><span class="src-sym">(</span><span class="src-var">$id</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a97"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-id">parent</span><span class="src-sym">::</span><a href="../swam/PersistentObject.html#methodset_id">set_id</a><span class="src-sym">(</span><span class="src-var">$id</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a98"></a>&nbsp;&nbsp;<span class="src-sym">}</span></div></li>
<li><div class="src-line"><a name="a99"></a>&nbsp;</div></li>
<li><div class="src-line"><a name="a100"></a>&nbsp;&nbsp;<span class="src-doc">/**</span></div></li>
<li><div class="src-line"><a name="a101"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;</span><span class="src-doc-coretag">@see</span><span class="src-doc">&nbsp;ITransaction::set_name(string&nbsp;$name)</span></div></li>
<li><div class="src-line"><a name="a102"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*/</span></div></li>
<li><div class="src-line"><a name="a103"></a>&nbsp;&nbsp;<span class="src-key">public&nbsp;</span><span class="src-key">function&nbsp;</span><a href="../swam/Transaction.html#methodset_name">set_name</a><span class="src-sym">(</span><span class="src-var">$name</span><span class="src-sym">)&nbsp;</span><span class="src-sym">{</span></div></li>
<li><div class="src-line"><a name="a104"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-key">if&nbsp;</span><span class="src-sym">(</span><span class="src-key">empty</span><span class="src-sym">(</span><span class="src-var">$name</span><span class="src-sym">))&nbsp;</span><span class="src-sym">{</span></div></li>
<li><div class="src-line"><a name="a105"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;throw&nbsp;<span class="src-key">new&nbsp;</span><span class="src-id"><a href="../swam/TransactionException.html">TransactionException</a></span><span class="src-sym">(</span><a href="http://www.php.net/_">_</a><span class="src-sym">(</span><span class="src-str">'Please&nbsp;enter&nbsp;the&nbsp;name&nbsp;of&nbsp;the&nbsp;transaction.'</span><span class="src-sym">))</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a106"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-sym">}</span></div></li>
<li><div class="src-line"><a name="a107"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-id"><a href="../swam/Utils.html">Utils</a></span><span class="src-sym">::</span><a href="../swam/Utils.html#methodcheck_max_length">check_max_length</a><span class="src-sym">(</span><span class="src-var">$name</span><span class="src-sym">,&nbsp;</span><span class="src-id">self</span><span class="src-sym">::</span><span class="src-id">NAME_MAX_LENGTH</span><span class="src-sym">,&nbsp;</span><a href="http://www.php.net/_">_</a><span class="src-sym">(</span><span class="src-str">'The&nbsp;name&nbsp;of&nbsp;the&nbsp;transaction&nbsp;is&nbsp;too&nbsp;long;&nbsp;it&nbsp;must&nbsp;consist&nbsp;of&nbsp;a&nbsp;maximum&nbsp;of&nbsp;%s&nbsp;characters.'</span><span class="src-sym">))</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a108"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-var">$this</span><span class="src-sym">-&gt;</span><span class="src-var">data</span><span class="src-sym">[</span><span class="src-str">'name'</span><span class="src-sym">]&nbsp;</span>=&nbsp;<span class="src-var">$name</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a109"></a>&nbsp;&nbsp;<span class="src-sym">}</span></div></li>
<li><div class="src-line"><a name="a110"></a>&nbsp;</div></li>
<li><div class="src-line"><a name="a111"></a>&nbsp;&nbsp;<span class="src-doc">/**</span></div></li>
<li><div class="src-line"><a name="a112"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;</span><span class="src-doc-coretag">@see</span><span class="src-doc">&nbsp;ITransaction::get_name()</span></div></li>
<li><div class="src-line"><a name="a113"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*/</span></div></li>
<li><div class="src-line"><a name="a114"></a>&nbsp;&nbsp;<span class="src-key">public&nbsp;</span><span class="src-key">function&nbsp;</span><a href="../swam/Transaction.html#methodget_name">get_name</a><span class="src-sym">(</span><span class="src-sym">)&nbsp;</span><span class="src-sym">{</span></div></li>
<li><div class="src-line"><a name="a115"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-key">return&nbsp;</span><span class="src-var">$this</span><span class="src-sym">-&gt;</span><span class="src-var">data</span><span class="src-sym">[</span><span class="src-str">'name'</span><span class="src-sym">]</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a116"></a>&nbsp;&nbsp;<span class="src-sym">}</span></div></li>
<li><div class="src-line"><a name="a117"></a>&nbsp;</div></li>
<li><div class="src-line"><a name="a118"></a>&nbsp;&nbsp;<span class="src-doc">/**</span></div></li>
<li><div class="src-line"><a name="a119"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;</span><span class="src-doc-coretag">@see</span><span class="src-doc">&nbsp;ITransaction::set_account($account)</span></div></li>
<li><div class="src-line"><a name="a120"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*/</span></div></li>
<li><div class="src-line"><a name="a121"></a>&nbsp;&nbsp;<span class="src-key">public&nbsp;</span><span class="src-key">function&nbsp;</span><a href="../swam/Transaction.html#methodset_account">set_account</a><span class="src-sym">(</span><span class="src-var">$account</span><span class="src-sym">)&nbsp;</span><span class="src-sym">{</span></div></li>
<li><div class="src-line"><a name="a122"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-key">if&nbsp;</span><span class="src-sym">(</span><span class="src-var">$account&nbsp;</span>==&nbsp;<span class="src-id">null</span><span class="src-sym">)&nbsp;</span><span class="src-sym">{</span></div></li>
<li><div class="src-line"><a name="a123"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;throw&nbsp;<span class="src-key">new&nbsp;</span><span class="src-id"><a href="../swam/IllegalArgumentException.html">IllegalArgumentException</a></span><span class="src-sym">(</span><a href="http://www.php.net/_">_</a><span class="src-sym">(</span><span class="src-str">'Null&nbsp;account&nbsp;object.'</span><span class="src-sym">))</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a124"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-sym">}</span></div></li>
<li><div class="src-line"><a name="a125"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-var">$this</span><span class="src-sym">-&gt;</span><span class="src-var">data</span><span class="src-sym">[</span><span class="src-str">'account'</span><span class="src-sym">]&nbsp;</span>=&nbsp;<span class="src-var">$account</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a126"></a>&nbsp;&nbsp;<span class="src-sym">}</span></div></li>
<li><div class="src-line"><a name="a127"></a>&nbsp;</div></li>
<li><div class="src-line"><a name="a128"></a>&nbsp;&nbsp;<span class="src-doc">/**</span></div></li>
<li><div class="src-line"><a name="a129"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;</span><span class="src-doc-coretag">@see</span><span class="src-doc">&nbsp;ITransaction::get_account()</span></div></li>
<li><div class="src-line"><a name="a130"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*/</span></div></li>
<li><div class="src-line"><a name="a131"></a>&nbsp;&nbsp;<span class="src-key">public&nbsp;</span><span class="src-key">function&nbsp;</span><a href="../swam/Transaction.html#methodget_account">get_account</a><span class="src-sym">(</span><span class="src-sym">)&nbsp;</span><span class="src-sym">{</span></div></li>
<li><div class="src-line"><a name="a132"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-key">return&nbsp;</span><span class="src-var">$this</span><span class="src-sym">-&gt;</span><span class="src-var">data</span><span class="src-sym">[</span><span class="src-str">'account'</span><span class="src-sym">]</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a133"></a>&nbsp;&nbsp;<span class="src-sym">}</span></div></li>
<li><div class="src-line"><a name="a134"></a>&nbsp;</div></li>
<li><div class="src-line"><a name="a135"></a>&nbsp;&nbsp;<span class="src-doc">/**</span></div></li>
<li><div class="src-line"><a name="a136"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;</span><span class="src-doc-coretag">@see</span><span class="src-doc">&nbsp;ITransaction::set_amount($amount)</span></div></li>
<li><div class="src-line"><a name="a137"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*/</span></div></li>
<li><div class="src-line"><a name="a138"></a>&nbsp;&nbsp;<span class="src-key">public&nbsp;</span><span class="src-key">function&nbsp;</span><a href="../swam/Transaction.html#methodset_amount">set_amount</a><span class="src-sym">(</span><span class="src-var">$amount</span><span class="src-sym">)&nbsp;</span><span class="src-sym">{</span></div></li>
<li><div class="src-line"><a name="a139"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-key">if&nbsp;</span><span class="src-sym">(</span><span class="src-key">empty</span><span class="src-sym">(</span><span class="src-var">$amount</span><span class="src-sym">))&nbsp;</span><span class="src-sym">{</span></div></li>
<li><div class="src-line"><a name="a140"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;throw&nbsp;<span class="src-key">new&nbsp;</span><span class="src-id"><a href="../swam/TransactionException.html">TransactionException</a></span><span class="src-sym">(</span><a href="http://www.php.net/_">_</a><span class="src-sym">(</span><span class="src-str">'Please&nbsp;enter&nbsp;the&nbsp;amount&nbsp;of&nbsp;the&nbsp;transaction.'</span><span class="src-sym">))</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a141"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-sym">}&nbsp;</span><span class="src-key">elseif&nbsp;</span><span class="src-sym">(</span><span class="src-sym">!&nbsp;</span><a href="http://www.php.net/is_numeric">is_numeric</a><span class="src-sym">(</span><span class="src-var">$amount</span><span class="src-sym">))&nbsp;</span><span class="src-sym">{</span></div></li>
<li><div class="src-line"><a name="a142"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;throw&nbsp;<span class="src-key">new&nbsp;</span><span class="src-id"><a href="../swam/TransactionException.html">TransactionException</a></span><span class="src-sym">(</span><span class="src-id"><a href="../swam/Utils.html">Utils</a></span><span class="src-sym">::</span><a href="../swam/Utils.html#methodsafe_sprintf">safe_sprintf</a><span class="src-sym">(</span><a href="http://www.php.net/_">_</a><span class="src-sym">(</span><span class="src-str">'Invalid&nbsp;transaction&nbsp;amount:&nbsp;%s.'</span><span class="src-sym">)</span><span class="src-sym">,&nbsp;</span><span class="src-var">$amount</span><span class="src-sym">))</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a143"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-sym">}</span></div></li>
<li><div class="src-line"><a name="a144"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-var">$this</span><span class="src-sym">-&gt;</span><span class="src-var">data</span><span class="src-sym">[</span><span class="src-str">'amount'</span><span class="src-sym">]&nbsp;</span>=&nbsp;<a href="http://www.php.net/trim">trim</a><span class="src-sym">(</span><span class="src-var">$amount</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a145"></a>&nbsp;&nbsp;<span class="src-sym">}</span></div></li>
<li><div class="src-line"><a name="a146"></a>&nbsp;</div></li>
<li><div class="src-line"><a name="a147"></a>&nbsp;&nbsp;<span class="src-doc">/**</span></div></li>
<li><div class="src-line"><a name="a148"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;Parses&nbsp;non&nbsp;decimal&nbsp;part&nbsp;of&nbsp;an&nbsp;monetary&nbsp;value&nbsp;including&nbsp;potentially</span></div></li>
<li><div class="src-line"><a name="a149"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;the&nbsp;thousands&nbsp;separator.</span></div></li>
<li><div class="src-line"><a name="a150"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*</span></div></li>
<li><div class="src-line"><a name="a151"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;</span><span class="src-doc-coretag">@param&nbsp;</span><span class="src-doc-type">$value&nbsp;</span></div></li>
<li><div class="src-line"><a name="a152"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;</span><span class="src-doc-coretag">@return&nbsp;</span><span class="src-doc-type">mixed&nbsp;</span></div></li>
<li><div class="src-line"><a name="a153"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*/</span></div></li>
<li><div class="src-line"><a name="a154"></a>&nbsp;&nbsp;<span class="src-key">public&nbsp;</span><span class="src-key">function&nbsp;</span><a href="../swam/Transaction.html#methodparse_non_decimal_part">parse_non_decimal_part</a><span class="src-sym">(</span><span class="src-var">$value</span><span class="src-sym">)&nbsp;</span><span class="src-sym">{</span></div></li>
<li><div class="src-line"><a name="a155"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-var">$thousands_sep&nbsp;</span>=&nbsp;<a href="http://www.php.net/_">_</a><span class="src-sym">(</span><span class="src-str">','</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a156"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-var">$parsed_value&nbsp;</span>=&nbsp;<span class="src-str">''</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a157"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-key">if&nbsp;</span><span class="src-sym">(</span><a href="http://www.php.net/ereg">ereg</a><span class="src-sym">(</span><span class="src-str">'^[0-9]{1,3}'&nbsp;</span>.&nbsp;<span class="src-var">$thousands_sep&nbsp;</span>.&nbsp;<span class="src-str">'.*$'</span><span class="src-sym">,&nbsp;</span><span class="src-var">$value</span><span class="src-sym">))&nbsp;</span><span class="src-sym">{</span></div></li>
<li><div class="src-line"><a name="a158"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-comm">//&nbsp;$value&nbsp;includes&nbsp;thousands&nbsp;separator</span></div></li>
<li><div class="src-line"><a name="a159"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-var">$first_separator_index&nbsp;</span>=&nbsp;<a href="http://www.php.net/stripos">stripos</a><span class="src-sym">(</span><span class="src-var">$value</span><span class="src-sym">,&nbsp;</span><span class="src-var">$thousands_sep</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a160"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-var">$parsed_value&nbsp;</span>.=&nbsp;<a href="http://www.php.net/substr">substr</a><span class="src-sym">(</span><span class="src-var">$value</span><span class="src-sym">,&nbsp;</span><span class="src-num">0</span><span class="src-sym">,&nbsp;</span><span class="src-var">$first_separator_index</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a161"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-comm">//&nbsp;Remaining&nbsp;caracters&nbsp;must&nbsp;be&nbsp;,xxx,xxx(...),xxx</span></div></li>
<li><div class="src-line"><a name="a162"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-comm">//&nbsp;where&nbsp;x&nbsp;is&nbsp;an&nbsp;integer&nbsp;and&nbsp;,&nbsp;the&nbsp;monetary&nbsp;thousand&nbsp;separator</span></div></li>
<li><div class="src-line"><a name="a163"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-var">$remaining_caracters&nbsp;</span>=&nbsp;<a href="http://www.php.net/substr">substr</a><span class="src-sym">(</span><span class="src-var">$value</span><span class="src-sym">,&nbsp;</span><span class="src-var">$first_separator_index</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a164"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-key">if&nbsp;</span><span class="src-sym">(</span><a href="http://www.php.net/ereg">ereg</a><span class="src-sym">(</span><span class="src-str">'^('&nbsp;</span>.&nbsp;<span class="src-var">$thousands_sep&nbsp;</span>.&nbsp;<span class="src-str">'[0-9]{3})*$'</span><span class="src-sym">,&nbsp;</span><span class="src-var">$remaining_caracters</span><span class="src-sym">))&nbsp;</span><span class="src-sym">{</span></div></li>
<li><div class="src-line"><a name="a165"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-var">$parsed_value&nbsp;</span>.=&nbsp;<a href="http://www.php.net/str_replace">str_replace</a><span class="src-sym">(</span><span class="src-var">$thousands_sep</span><span class="src-sym">,&nbsp;</span><span class="src-str">''</span><span class="src-sym">,&nbsp;</span><span class="src-var">$remaining_caracters</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a166"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-key">return&nbsp;</span><span class="src-var">$parsed_value</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a167"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-sym">}&nbsp;</span><span class="src-key">else&nbsp;</span><span class="src-sym">{</span></div></li>
<li><div class="src-line"><a name="a168"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-key">return&nbsp;</span><span class="src-id">false</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a169"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-sym">}</span></div></li>
<li><div class="src-line"><a name="a170"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</div></li>
<li><div class="src-line"><a name="a171"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-sym">}&nbsp;</span><span class="src-key">else&nbsp;</span><span class="src-sym">{</span></div></li>
<li><div class="src-line"><a name="a172"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-comm">//&nbsp;$value&nbsp;do&nbsp;not&nbsp;include&nbsp;thousands&nbsp;separator</span></div></li>
<li><div class="src-line"><a name="a173"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-key">return&nbsp;</span><span class="src-sym">(</span><span class="src-id"><a href="../swam/Utils.html">Utils</a></span><span class="src-sym">::</span><a href="../swam/Utils.html#methodis_int">is_int</a><span class="src-sym">(</span><span class="src-var">$value</span><span class="src-sym">)&nbsp;</span>?&nbsp;<span class="src-var">$value&nbsp;</span>:&nbsp;<span class="src-id">false</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a174"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-sym">}</span></div></li>
<li><div class="src-line"><a name="a175"></a>&nbsp;&nbsp;<span class="src-sym">}</span></div></li>
<li><div class="src-line"><a name="a176"></a>&nbsp;</div></li>
<li><div class="src-line"><a name="a177"></a>&nbsp;&nbsp;<span class="src-doc">/**</span></div></li>
<li><div class="src-line"><a name="a178"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;Parses&nbsp;decimal&nbsp;part&nbsp;of&nbsp;a&nbsp;monetary&nbsp;value.</span></div></li>
<li><div class="src-line"><a name="a179"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*</span></div></li>
<li><div class="src-line"><a name="a180"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;</span><span class="src-doc-coretag">@param&nbsp;</span><span class="src-doc-type">$value&nbsp;</span></div></li>
<li><div class="src-line"><a name="a181"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;</span><span class="src-doc-coretag">@return&nbsp;</span><span class="src-doc-type">mixed&nbsp;</span></div></li>
<li><div class="src-line"><a name="a182"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*/</span></div></li>
<li><div class="src-line"><a name="a183"></a>&nbsp;&nbsp;<span class="src-key">public&nbsp;</span><span class="src-key">function&nbsp;</span><a href="../swam/Transaction.html#methodparse_decimal_part">parse_decimal_part</a><span class="src-sym">(</span><span class="src-var">$value</span><span class="src-sym">)&nbsp;</span><span class="src-sym">{</span></div></li>
<li><div class="src-line"><a name="a184"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-key">if&nbsp;</span><span class="src-sym">(</span><a href="http://www.php.net/ereg">ereg</a><span class="src-sym">(</span><span class="src-str">'^[0-9]{1,2}$'</span><span class="src-sym">,&nbsp;</span><span class="src-var">$value</span><span class="src-sym">))&nbsp;</span><span class="src-sym">{</span></div></li>
<li><div class="src-line"><a name="a185"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-key">return&nbsp;</span><span class="src-var">$value</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a186"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-sym">}&nbsp;</span><span class="src-key">else&nbsp;</span><span class="src-sym">{</span></div></li>
<li><div class="src-line"><a name="a187"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-key">return&nbsp;</span><span class="src-id">false</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a188"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-sym">}</span></div></li>
<li><div class="src-line"><a name="a189"></a>&nbsp;&nbsp;<span class="src-sym">}</span></div></li>
<li><div class="src-line"><a name="a190"></a>&nbsp;</div></li>
<li><div class="src-line"><a name="a191"></a>&nbsp;&nbsp;<span class="src-doc">/**</span></div></li>
<li><div class="src-line"><a name="a192"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;</span><span class="src-doc-coretag">@see</span><span class="src-doc">&nbsp;ITransaction::set_locale_amount($locale_amount)</span></div></li>
<li><div class="src-line"><a name="a193"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*/</span></div></li>
<li><div class="src-line"><a name="a194"></a>&nbsp;&nbsp;<span class="src-key">function&nbsp;</span><a href="../swam/Transaction.html#methodset_locale_amount">set_locale_amount</a><span class="src-sym">(</span><span class="src-var">$locale_amount</span><span class="src-sym">)&nbsp;</span><span class="src-sym">{</span></div></li>
<li><div class="src-line"><a name="a195"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-key">if&nbsp;</span><span class="src-sym">(</span><span class="src-key">empty</span><span class="src-sym">(</span><span class="src-var">$locale_amount</span><span class="src-sym">))&nbsp;</span><span class="src-sym">{</span></div></li>
<li><div class="src-line"><a name="a196"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;throw&nbsp;<span class="src-key">new&nbsp;</span><span class="src-id"><a href="../swam/TransactionException.html">TransactionException</a></span><span class="src-sym">(</span><a href="http://www.php.net/_">_</a><span class="src-sym">(</span><span class="src-str">'Please&nbsp;enter&nbsp;the&nbsp;amount&nbsp;of&nbsp;the&nbsp;transaction.'</span><span class="src-sym">))</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a197"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-sym">}</span></div></li>
<li><div class="src-line"><a name="a198"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-var">$decimal_point&nbsp;</span>=&nbsp;<a href="http://www.php.net/_">_</a><span class="src-sym">(</span><span class="src-str">'.'</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a199"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-var">$error&nbsp;</span>=&nbsp;<span class="src-id">false</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a200"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-var">$parts&nbsp;</span>=&nbsp;<a href="http://www.php.net/explode">explode</a><span class="src-sym">(</span><span class="src-var">$decimal_point</span><span class="src-sym">,&nbsp;</span><span class="src-var">$locale_amount</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a201"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-key">if&nbsp;</span><span class="src-sym">(</span><a href="http://www.php.net/count">count</a><span class="src-sym">(</span><span class="src-var">$parts</span><span class="src-sym">)&nbsp;</span>==&nbsp;<span class="src-num">1</span><span class="src-sym">)&nbsp;</span><span class="src-sym">{</span></div></li>
<li><div class="src-line"><a name="a202"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-var">$part1&nbsp;</span>=&nbsp;<span class="src-id"><a href="../swam/Transaction.html">Transaction</a></span><span class="src-sym">::</span><a href="../swam/Transaction.html#methodparse_non_decimal_part">parse_non_decimal_part</a><span class="src-sym">(</span><span class="src-var">$parts</span><span class="src-sym">[</span><span class="src-num">0</span><span class="src-sym">]</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a203"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-var">$part2&nbsp;</span>=&nbsp;<span class="src-str">'0'</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a204"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-sym">}&nbsp;</span><span class="src-key">elseif&nbsp;</span><span class="src-sym">(</span><a href="http://www.php.net/count">count</a><span class="src-sym">(</span><span class="src-var">$parts</span><span class="src-sym">)&nbsp;</span>==&nbsp;<span class="src-num">2</span><span class="src-sym">)&nbsp;</span><span class="src-sym">{</span></div></li>
<li><div class="src-line"><a name="a205"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-var">$part1&nbsp;</span>=&nbsp;<span class="src-id"><a href="../swam/Transaction.html">Transaction</a></span><span class="src-sym">::</span><a href="../swam/Transaction.html#methodparse_non_decimal_part">parse_non_decimal_part</a><span class="src-sym">(</span><span class="src-var">$parts</span><span class="src-sym">[</span><span class="src-num">0</span><span class="src-sym">]</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a206"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-var">$part2&nbsp;</span>=&nbsp;<span class="src-id"><a href="../swam/Transaction.html">Transaction</a></span><span class="src-sym">::</span><a href="../swam/Transaction.html#methodparse_decimal_part">parse_decimal_part</a><span class="src-sym">(</span><span class="src-var">$parts</span><span class="src-sym">[</span><span class="src-num">1</span><span class="src-sym">]</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a207"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-sym">}&nbsp;</span><span class="src-key">else&nbsp;</span><span class="src-sym">{</span></div></li>
<li><div class="src-line"><a name="a208"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-var">$error&nbsp;</span>=&nbsp;<span class="src-id">true</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a209"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-sym">}</span></div></li>
<li><div class="src-line"><a name="a210"></a>&nbsp;&nbsp;&nbsp;&nbsp;</div></li>
<li><div class="src-line"><a name="a211"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-key">if&nbsp;</span><span class="src-sym">(</span><span class="src-var">$error&nbsp;</span>||&nbsp;<span class="src-sym">(</span><span class="src-var">$part1&nbsp;</span>===&nbsp;<span class="src-id">false</span><span class="src-sym">)&nbsp;</span>||&nbsp;<span class="src-sym">(</span><span class="src-var">$part2&nbsp;</span>===&nbsp;<span class="src-id">false</span><span class="src-sym">))&nbsp;</span><span class="src-sym">{</span></div></li>
<li><div class="src-line"><a name="a212"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;throw&nbsp;<span class="src-key">new&nbsp;</span><span class="src-id"><a href="../swam/TransactionException.html">TransactionException</a></span><span class="src-sym">(</span><span class="src-id"><a href="../swam/Utils.html">Utils</a></span><span class="src-sym">::</span><a href="../swam/Utils.html#methodsafe_sprintf">safe_sprintf</a><span class="src-sym">(</span><a href="http://www.php.net/_">_</a><span class="src-sym">(</span><span class="src-str">'Invalid&nbsp;transaction&nbsp;amount:&nbsp;%s.'</span><span class="src-sym">)</span><span class="src-sym">,&nbsp;</span><span class="src-var">$locale_amount</span><span class="src-sym">))</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a213"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-sym">}</span></div></li>
<li><div class="src-line"><a name="a214"></a>&nbsp;&nbsp;&nbsp;&nbsp;</div></li>
<li><div class="src-line"><a name="a215"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-var">$this</span><span class="src-sym">-&gt;</span><span class="src-var">data</span><span class="src-sym">[</span><span class="src-str">'amount'</span><span class="src-sym">]&nbsp;</span>=&nbsp;<span class="src-var">$part1&nbsp;</span>.&nbsp;<span class="src-str">'.'&nbsp;</span>.&nbsp;<span class="src-var">$part2</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a216"></a>&nbsp;&nbsp;<span class="src-sym">}</span></div></li>
<li><div class="src-line"><a name="a217"></a>&nbsp;</div></li>
<li><div class="src-line"><a name="a218"></a>&nbsp;&nbsp;<span class="src-doc">/**</span></div></li>
<li><div class="src-line"><a name="a219"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;</span><span class="src-doc-coretag">@see</span><span class="src-doc">&nbsp;ITransaction::get_amount()</span></div></li>
<li><div class="src-line"><a name="a220"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*/</span></div></li>
<li><div class="src-line"><a name="a221"></a>&nbsp;&nbsp;<span class="src-key">public&nbsp;</span><span class="src-key">function&nbsp;</span><a href="../swam/Transaction.html#methodget_amount">get_amount</a><span class="src-sym">(</span><span class="src-sym">)&nbsp;</span><span class="src-sym">{</span></div></li>
<li><div class="src-line"><a name="a222"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-key">return&nbsp;</span><span class="src-var">$this</span><span class="src-sym">-&gt;</span><span class="src-var">data</span><span class="src-sym">[</span><span class="src-str">'amount'</span><span class="src-sym">]</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a223"></a>&nbsp;&nbsp;<span class="src-sym">}</span></div></li>
<li><div class="src-line"><a name="a224"></a>&nbsp;</div></li>
<li><div class="src-line"><a name="a225"></a>&nbsp;&nbsp;<span class="src-doc">/**</span></div></li>
<li><div class="src-line"><a name="a226"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;</span><span class="src-doc-coretag">@see</span><span class="src-doc">&nbsp;ITransaction::get_locale_amount()</span></div></li>
<li><div class="src-line"><a name="a227"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*/</span></div></li>
<li><div class="src-line"><a name="a228"></a>&nbsp;&nbsp;<span class="src-key">public&nbsp;</span><span class="src-key">function&nbsp;</span><a href="../swam/Transaction.html#methodget_locale_amount">get_locale_amount</a><span class="src-sym">(</span><span class="src-sym">)&nbsp;</span><span class="src-sym">{</span></div></li>
<li><div class="src-line"><a name="a229"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-key">return&nbsp;</span><span class="src-id"><a href="../swam/Utils.html">Utils</a></span><span class="src-sym">::</span><a href="../swam/Utils.html#methodmoney_format">money_format</a><span class="src-sym">(</span><span class="src-var">$this</span><span class="src-sym">-&gt;</span><span class="src-var">data</span><span class="src-sym">[</span><span class="src-str">'amount'</span><span class="src-sym">]</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a230"></a>&nbsp;&nbsp;<span class="src-sym">}</span></div></li>
<li><div class="src-line"><a name="a231"></a>&nbsp;</div></li>
<li><div class="src-line"><a name="a232"></a>&nbsp;&nbsp;<span class="src-doc">/**</span></div></li>
<li><div class="src-line"><a name="a233"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;</span><span class="src-doc-coretag">@see</span><span class="src-doc">&nbsp;ITransaction::set_is_debit($is_debit)</span></div></li>
<li><div class="src-line"><a name="a234"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*/</span></div></li>
<li><div class="src-line"><a name="a235"></a>&nbsp;&nbsp;<span class="src-key">public&nbsp;</span><span class="src-key">function&nbsp;</span><a href="../swam/Transaction.html#methodset_is_debit">set_is_debit</a><span class="src-sym">(</span><span class="src-var">$is_debit</span><span class="src-sym">)&nbsp;</span><span class="src-sym">{</span></div></li>
<li><div class="src-line"><a name="a236"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-id"><a href="../swam/Utils.html">Utils</a></span><span class="src-sym">::</span><a href="../swam/Utils.html#methodcheck_boolean">check_boolean</a><span class="src-sym">(</span><span class="src-var">$is_debit</span><span class="src-sym">,&nbsp;</span><a href="http://www.php.net/_">_</a><span class="src-sym">(</span><span class="src-str">'Invalid&nbsp;parameter:&nbsp;%s&nbsp;(expected&nbsp;boolean&nbsp;value)'</span><span class="src-sym">))</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a237"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-var">$this</span><span class="src-sym">-&gt;</span><span class="src-var">data</span><span class="src-sym">[</span><span class="src-str">'is_debit'</span><span class="src-sym">]&nbsp;</span>=&nbsp;<span class="src-var">$is_debit</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a238"></a>&nbsp;&nbsp;<span class="src-sym">}</span></div></li>
<li><div class="src-line"><a name="a239"></a>&nbsp;</div></li>
<li><div class="src-line"><a name="a240"></a>&nbsp;&nbsp;<span class="src-doc">/**</span></div></li>
<li><div class="src-line"><a name="a241"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;</span><span class="src-doc-coretag">@see</span><span class="src-doc">&nbsp;ITransaction::is_debit()</span></div></li>
<li><div class="src-line"><a name="a242"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*/</span></div></li>
<li><div class="src-line"><a name="a243"></a>&nbsp;&nbsp;<span class="src-key">public&nbsp;</span><span class="src-key">function&nbsp;</span><a href="../swam/Transaction.html#methodis_debit">is_debit</a><span class="src-sym">(</span><span class="src-sym">)&nbsp;</span><span class="src-sym">{</span></div></li>
<li><div class="src-line"><a name="a244"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-key">return&nbsp;</span><span class="src-var">$this</span><span class="src-sym">-&gt;</span><span class="src-var">data</span><span class="src-sym">[</span><span class="src-str">'is_debit'</span><span class="src-sym">]</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a245"></a>&nbsp;&nbsp;<span class="src-sym">}</span></div></li>
<li><div class="src-line"><a name="a246"></a>&nbsp;</div></li>
<li><div class="src-line"><a name="a247"></a>&nbsp;&nbsp;<span class="src-doc">/**</span></div></li>
<li><div class="src-line"><a name="a248"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;</span><span class="src-doc-coretag">@see</span><span class="src-doc">&nbsp;ITransaction::set_mean_of_payment_code($code)</span></div></li>
<li><div class="src-line"><a name="a249"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*/</span></div></li>
<li><div class="src-line"><a name="a250"></a>&nbsp;&nbsp;<span class="src-key">public&nbsp;</span><span class="src-key">function&nbsp;</span><a href="../swam/Transaction.html#methodset_mean_of_payment_code">set_mean_of_payment_code</a><span class="src-sym">(</span><span class="src-var">$code</span><span class="src-sym">)&nbsp;</span><span class="src-sym">{</span></div></li>
<li><div class="src-line"><a name="a251"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-key">if&nbsp;</span><span class="src-sym">(</span><span class="src-key">empty</span><span class="src-sym">(</span><span class="src-var">$code</span><span class="src-sym">))&nbsp;</span><span class="src-sym">{</span></div></li>
<li><div class="src-line"><a name="a252"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;throw&nbsp;<span class="src-key">new&nbsp;</span><span class="src-id"><a href="../swam/TransactionException.html">TransactionException</a></span><span class="src-sym">(</span><a href="http://www.php.net/_">_</a><span class="src-sym">(</span><span class="src-str">'Please&nbsp;set&nbsp;the&nbsp;mean&nbsp;of&nbsp;payment&nbsp;of&nbsp;the&nbsp;transaction.'</span><span class="src-sym">))</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a253"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-sym">}</span></div></li>
<li><div class="src-line"><a name="a254"></a>&nbsp;</div></li>
<li><div class="src-line"><a name="a255"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-var">$codes&nbsp;</span>=&nbsp;<span class="src-id"><a href="../swam/Transaction.html">Transaction</a></span><span class="src-sym">::</span><a href="../swam/Transaction.html#methodget_means_of_payment">get_means_of_payment</a><span class="src-sym">(</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a256"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-key">if&nbsp;</span><span class="src-sym">(</span><span class="src-sym">!&nbsp;</span>isset<span class="src-sym">(</span><span class="src-var">$codes</span><span class="src-sym">[</span><span class="src-var">$code</span><span class="src-sym">]</span><span class="src-sym">))&nbsp;</span><span class="src-sym">{</span></div></li>
<li><div class="src-line"><a name="a257"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;throw&nbsp;<span class="src-key">new&nbsp;</span><span class="src-id"><a href="../swam/IllegalArgumentException.html">IllegalArgumentException</a></span><span class="src-sym">(</span><span class="src-id"><a href="../swam/Utils.html">Utils</a></span><span class="src-sym">::</span><a href="../swam/Utils.html#methodsafe_sprintf">safe_sprintf</a><span class="src-sym">(</span><a href="http://www.php.net/_">_</a><span class="src-sym">(</span><span class="src-str">'Invalid&nbsp;mean&nbsp;of&nbsp;payment:&nbsp;%s.'</span><span class="src-sym">)</span><span class="src-sym">,&nbsp;</span><span class="src-var">$code</span><span class="src-sym">))</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a258"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-sym">}</span></div></li>
<li><div class="src-line"><a name="a259"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-var">$this</span><span class="src-sym">-&gt;</span><span class="src-var">data</span><span class="src-sym">[</span><span class="src-str">'mean_of_payment_code'</span><span class="src-sym">]&nbsp;</span>=&nbsp;<span class="src-var">$code</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a260"></a>&nbsp;&nbsp;<span class="src-sym">}</span></div></li>
<li><div class="src-line"><a name="a261"></a>&nbsp;</div></li>
<li><div class="src-line"><a name="a262"></a>&nbsp;&nbsp;<span class="src-doc">/**</span></div></li>
<li><div class="src-line"><a name="a263"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;</span><span class="src-doc-coretag">@see</span><span class="src-doc">&nbsp;ITransaction::get_mean_of_payment_code()</span></div></li>
<li><div class="src-line"><a name="a264"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*/</span></div></li>
<li><div class="src-line"><a name="a265"></a>&nbsp;&nbsp;<span class="src-key">public&nbsp;</span><span class="src-key">function&nbsp;</span><a href="../swam/Transaction.html#methodget_mean_of_payment_code">get_mean_of_payment_code</a><span class="src-sym">(</span><span class="src-sym">)&nbsp;</span><span class="src-sym">{</span></div></li>
<li><div class="src-line"><a name="a266"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-key">return&nbsp;</span><span class="src-var">$this</span><span class="src-sym">-&gt;</span><span class="src-var">data</span><span class="src-sym">[</span><span class="src-str">'mean_of_payment_code'</span><span class="src-sym">]</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a267"></a>&nbsp;&nbsp;<span class="src-sym">}</span></div></li>
<li><div class="src-line"><a name="a268"></a>&nbsp;</div></li>
<li><div class="src-line"><a name="a269"></a>&nbsp;&nbsp;<span class="src-doc">/**</span></div></li>
<li><div class="src-line"><a name="a270"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;</span><span class="src-doc-coretag">@see</span><span class="src-doc">&nbsp;ITransaction::set_date($date)</span></div></li>
<li><div class="src-line"><a name="a271"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*/</span></div></li>
<li><div class="src-line"><a name="a272"></a>&nbsp;&nbsp;<span class="src-key">public&nbsp;</span><span class="src-key">function&nbsp;</span><a href="../swam/Transaction.html#methodset_date">set_date</a><span class="src-sym">(</span><span class="src-var">$date</span><span class="src-sym">)&nbsp;</span><span class="src-sym">{</span></div></li>
<li><div class="src-line"><a name="a273"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-key">if&nbsp;</span><span class="src-sym">(</span><span class="src-key">empty</span><span class="src-sym">(</span><span class="src-var">$date</span><span class="src-sym">))&nbsp;</span><span class="src-sym">{</span></div></li>
<li><div class="src-line"><a name="a274"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;throw&nbsp;<span class="src-key">new&nbsp;</span><span class="src-id"><a href="../swam/TransactionException.html">TransactionException</a></span><span class="src-sym">(</span><a href="http://www.php.net/_">_</a><span class="src-sym">(</span><span class="src-str">'Please&nbsp;enter&nbsp;the&nbsp;date&nbsp;of&nbsp;the&nbsp;transaction.'</span><span class="src-sym">))</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a275"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-sym">}</span></div></li>
<li><div class="src-line"><a name="a276"></a>&nbsp;&nbsp;&nbsp;&nbsp;list<span class="src-sym">(</span><span class="src-var">$year</span><span class="src-sym">,&nbsp;</span><span class="src-var">$month</span><span class="src-sym">,&nbsp;</span><span class="src-var">$day</span><span class="src-sym">)&nbsp;</span>=&nbsp;<a href="http://www.php.net/explode">explode</a><span class="src-sym">(</span><span class="src-str">'-'</span><span class="src-sym">,&nbsp;</span><span class="src-var">$date</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a277"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-key">if&nbsp;</span><span class="src-sym">(</span><span class="src-sym">!</span><a href="http://www.php.net/checkdate">checkdate</a><span class="src-sym">(</span><span class="src-var">$month</span><span class="src-sym">,&nbsp;</span><span class="src-var">$day</span><span class="src-sym">,&nbsp;</span><span class="src-var">$year</span><span class="src-sym">))&nbsp;</span><span class="src-sym">{</span></div></li>
<li><div class="src-line"><a name="a278"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;throw&nbsp;<span class="src-key">new&nbsp;</span><span class="src-id"><a href="../swam/TransactionException.html">TransactionException</a></span><span class="src-sym">(</span><a href="http://www.php.net/_">_</a><span class="src-sym">(</span><span class="src-str">'The&nbsp;date&nbsp;of&nbsp;the&nbsp;transaction&nbsp;is&nbsp;invalid.&nbsp;Please&nbsp;use&nbsp;the&nbsp;following&nbsp;date&nbsp;format:&nbsp;YYYY-MM-DD.'</span><span class="src-sym">))</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a279"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-sym">}</span></div></li>
<li><div class="src-line"><a name="a280"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-var">$month&nbsp;</span>=&nbsp;<span class="src-id"><a href="../swam/Utils.html">Utils</a></span><span class="src-sym">::</span><a href="../swam/Utils.html#methodnormalize_date">normalize_date</a><span class="src-sym">(</span><span class="src-var">$month</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a281"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-var">$day&nbsp;</span>=&nbsp;<span class="src-id"><a href="../swam/Utils.html">Utils</a></span><span class="src-sym">::</span><a href="../swam/Utils.html#methodnormalize_date">normalize_date</a><span class="src-sym">(</span><span class="src-var">$day</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a282"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-var">$this</span><span class="src-sym">-&gt;</span><span class="src-var">data</span><span class="src-sym">[</span><span class="src-str">'date'</span><span class="src-sym">]&nbsp;</span>=&nbsp;<span class="src-var">$year&nbsp;</span>.&nbsp;<span class="src-str">'-'&nbsp;</span>.&nbsp;<span class="src-var">$month&nbsp;</span>.&nbsp;<span class="src-str">'-'&nbsp;</span>.&nbsp;<span class="src-var">$day</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a283"></a>&nbsp;&nbsp;<span class="src-sym">}</span></div></li>
<li><div class="src-line"><a name="a284"></a>&nbsp;</div></li>
<li><div class="src-line"><a name="a285"></a>&nbsp;&nbsp;<span class="src-doc">/**</span></div></li>
<li><div class="src-line"><a name="a286"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;</span><span class="src-doc-coretag">@see</span><span class="src-doc">&nbsp;ITransaction::get_date()</span></div></li>
<li><div class="src-line"><a name="a287"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*/</span></div></li>
<li><div class="src-line"><a name="a288"></a>&nbsp;&nbsp;<span class="src-key">public&nbsp;</span><span class="src-key">function&nbsp;</span><a href="../swam/Transaction.html#methodget_date">get_date</a><span class="src-sym">(</span><span class="src-sym">)&nbsp;</span><span class="src-sym">{</span></div></li>
<li><div class="src-line"><a name="a289"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-key">return&nbsp;</span><span class="src-var">$this</span><span class="src-sym">-&gt;</span><span class="src-var">data</span><span class="src-sym">[</span><span class="src-str">'date'</span><span class="src-sym">]</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a290"></a>&nbsp;&nbsp;<span class="src-sym">}</span></div></li>
<li><div class="src-line"><a name="a291"></a>&nbsp;</div></li>
<li><div class="src-line"><a name="a292"></a>&nbsp;&nbsp;<span class="src-doc">/**</span></div></li>
<li><div class="src-line"><a name="a293"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;</span><span class="src-doc-coretag">@see</span><span class="src-doc">&nbsp;ITransaction::get_locale_date()</span></div></li>
<li><div class="src-line"><a name="a294"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*/</span></div></li>
<li><div class="src-line"><a name="a295"></a>&nbsp;&nbsp;<span class="src-key">public&nbsp;</span><span class="src-key">function&nbsp;</span><a href="../swam/Transaction.html#methodget_locale_date">get_locale_date</a><span class="src-sym">(</span><span class="src-sym">)&nbsp;</span><span class="src-sym">{</span></div></li>
<li><div class="src-line"><a name="a296"></a>&nbsp;&nbsp;&nbsp;&nbsp;list<span class="src-sym">(</span><span class="src-var">$year</span><span class="src-sym">,&nbsp;</span><span class="src-var">$month</span><span class="src-sym">,&nbsp;</span><span class="src-var">$day</span><span class="src-sym">)&nbsp;</span>=&nbsp;<a href="http://www.php.net/explode">explode</a><span class="src-sym">(</span><span class="src-str">'-'</span><span class="src-sym">,&nbsp;</span><span class="src-var">$this</span><span class="src-sym">-&gt;</span><span class="src-var">data</span><span class="src-sym">[</span><span class="src-str">'date'</span><span class="src-sym">]</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a297"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-var">$timestamp&nbsp;</span>=&nbsp;<a href="http://www.php.net/mktime">mktime</a><span class="src-sym">(</span><span class="src-num">0</span><span class="src-sym">,&nbsp;</span><span class="src-num">0</span><span class="src-sym">,&nbsp;</span><span class="src-num">0</span><span class="src-sym">,&nbsp;</span><span class="src-var">$month</span><span class="src-sym">,&nbsp;</span><span class="src-var">$day&nbsp;</span>+&nbsp;<span class="src-num">1</span><span class="src-sym">,&nbsp;</span><span class="src-var">$year</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a298"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-key">return&nbsp;</span><a href="http://www.php.net/gmstrftime">gmstrftime</a><span class="src-sym">(</span><a href="http://www.php.net/_">_</a><span class="src-sym">(</span><span class="src-str">'%Y/%m/%d'</span><span class="src-sym">)</span><span class="src-sym">,&nbsp;</span><span class="src-var">$timestamp</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a299"></a>&nbsp;&nbsp;<span class="src-sym">}</span></div></li>
<li><div class="src-line"><a name="a300"></a>&nbsp;</div></li>
<li><div class="src-line"><a name="a301"></a>&nbsp;&nbsp;<span class="src-doc">/**</span></div></li>
<li><div class="src-line"><a name="a302"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;</span><span class="src-doc-coretag">@see</span><span class="src-doc">&nbsp;ITransaction::set_comment($comment)</span></div></li>
<li><div class="src-line"><a name="a303"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*/</span></div></li>
<li><div class="src-line"><a name="a304"></a>&nbsp;&nbsp;<span class="src-key">public&nbsp;</span><span class="src-key">function&nbsp;</span><a href="../swam/Transaction.html#methodset_comment">set_comment</a><span class="src-sym">(</span><span class="src-var">$comment</span><span class="src-sym">)&nbsp;</span><span class="src-sym">{</span></div></li>
<li><div class="src-line"><a name="a305"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-id"><a href="../swam/Utils.html">Utils</a></span><span class="src-sym">::</span><a href="../swam/Utils.html#methodcheck_max_length">check_max_length</a><span class="src-sym">(</span><span class="src-var">$comment</span><span class="src-sym">,&nbsp;</span><span class="src-id">self</span><span class="src-sym">::</span><span class="src-id">COMMENT_MAX_LENGTH</span><span class="src-sym">,&nbsp;</span><a href="http://www.php.net/_">_</a><span class="src-sym">(</span><span class="src-str">'The&nbsp;comment&nbsp;associated&nbsp;to&nbsp;the&nbsp;transaction&nbsp;is&nbsp;too&nbsp;long;&nbsp;it&nbsp;must&nbsp;consist&nbsp;of&nbsp;a&nbsp;maximum&nbsp;of&nbsp;%s&nbsp;characters.'</span><span class="src-sym">))</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a306"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-var">$this</span><span class="src-sym">-&gt;</span><span class="src-var">data</span><span class="src-sym">[</span><span class="src-str">'comment'</span><span class="src-sym">]&nbsp;</span>=&nbsp;<span class="src-var">$comment</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a307"></a>&nbsp;&nbsp;<span class="src-sym">}</span></div></li>
<li><div class="src-line"><a name="a308"></a>&nbsp;</div></li>
<li><div class="src-line"><a name="a309"></a>&nbsp;&nbsp;<span class="src-doc">/**</span></div></li>
<li><div class="src-line"><a name="a310"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;</span><span class="src-doc-coretag">@see</span><span class="src-doc">&nbsp;ITransaction::get_comment()</span></div></li>
<li><div class="src-line"><a name="a311"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*/</span></div></li>
<li><div class="src-line"><a name="a312"></a>&nbsp;&nbsp;<span class="src-key">public&nbsp;</span><span class="src-key">function&nbsp;</span><a href="../swam/Transaction.html#methodget_comment">get_comment</a><span class="src-sym">(</span><span class="src-sym">)&nbsp;</span><span class="src-sym">{</span></div></li>
<li><div class="src-line"><a name="a313"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-key">return&nbsp;</span><span class="src-var">$this</span><span class="src-sym">-&gt;</span><span class="src-var">data</span><span class="src-sym">[</span><span class="src-str">'comment'</span><span class="src-sym">]</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a314"></a>&nbsp;&nbsp;<span class="src-sym">}</span></div></li>
<li><div class="src-line"><a name="a315"></a>&nbsp;</div></li>
<li><div class="src-line"><a name="a316"></a>&nbsp;&nbsp;<span class="src-doc">/**</span></div></li>
<li><div class="src-line"><a name="a317"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;</span><span class="src-doc-coretag">@see</span><span class="src-doc">&nbsp;ITransaction::set_is_valid($is_valid)</span></div></li>
<li><div class="src-line"><a name="a318"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*/</span></div></li>
<li><div class="src-line"><a name="a319"></a>&nbsp;&nbsp;<span class="src-key">public&nbsp;</span><span class="src-key">function&nbsp;</span><a href="../swam/Transaction.html#methodset_is_valid">set_is_valid</a><span class="src-sym">(</span><span class="src-var">$is_valid</span><span class="src-sym">)&nbsp;</span><span class="src-sym">{</span></div></li>
<li><div class="src-line"><a name="a320"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-id"><a href="../swam/Utils.html">Utils</a></span><span class="src-sym">::</span><a href="../swam/Utils.html#methodcheck_boolean">check_boolean</a><span class="src-sym">(</span><span class="src-var">$is_valid</span><span class="src-sym">,&nbsp;</span><a href="http://www.php.net/_">_</a><span class="src-sym">(</span><span class="src-str">'Invalid&nbsp;parameter:&nbsp;%s&nbsp;(expected&nbsp;boolean&nbsp;value)'</span><span class="src-sym">))</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a321"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-var">$this</span><span class="src-sym">-&gt;</span><span class="src-var">data</span><span class="src-sym">[</span><span class="src-str">'is_valid'</span><span class="src-sym">]&nbsp;</span>=&nbsp;<span class="src-var">$is_valid</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a322"></a>&nbsp;&nbsp;<span class="src-sym">}</span></div></li>
<li><div class="src-line"><a name="a323"></a>&nbsp;</div></li>
<li><div class="src-line"><a name="a324"></a>&nbsp;&nbsp;<span class="src-doc">/**</span></div></li>
<li><div class="src-line"><a name="a325"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;</span><span class="src-doc-coretag">@see</span><span class="src-doc">&nbsp;ITransaction::is_valid()</span></div></li>
<li><div class="src-line"><a name="a326"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*/</span></div></li>
<li><div class="src-line"><a name="a327"></a>&nbsp;&nbsp;<span class="src-key">public&nbsp;</span><span class="src-key">function&nbsp;</span><a href="../swam/Transaction.html#methodis_valid">is_valid</a><span class="src-sym">(</span><span class="src-sym">)&nbsp;</span><span class="src-sym">{</span></div></li>
<li><div class="src-line"><a name="a328"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-key">return&nbsp;</span><span class="src-var">$this</span><span class="src-sym">-&gt;</span><span class="src-var">data</span><span class="src-sym">[</span><span class="src-str">'is_valid'</span><span class="src-sym">]</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a329"></a>&nbsp;&nbsp;<span class="src-sym">}</span></div></li>
<li><div class="src-line"><a name="a330"></a>&nbsp;</div></li>
<li><div class="src-line"><a name="a331"></a>&nbsp;&nbsp;<span class="src-doc">/**</span></div></li>
<li><div class="src-line"><a name="a332"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;</span><span class="src-doc-coretag">@see</span><span class="src-doc">&nbsp;IPersistentObject::set_data($data)</span></div></li>
<li><div class="src-line"><a name="a333"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*/</span></div></li>
<li><div class="src-line"><a name="a334"></a>&nbsp;&nbsp;<span class="src-key">public&nbsp;</span><span class="src-key">function&nbsp;</span><a href="../swam/Transaction.html#methodset_data">set_data</a><span class="src-sym">(</span><span class="src-var">$data</span><span class="src-sym">)&nbsp;</span><span class="src-sym">{</span></div></li>
<li><div class="src-line"><a name="a335"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-var">$name&nbsp;</span>=&nbsp;<span class="src-id"><a href="../swam/Utils.html">Utils</a></span><span class="src-sym">::</span><a href="../swam/Utils.html#methodget_string">get_string</a><span class="src-sym">(</span><span class="src-var">$data</span><span class="src-sym">,&nbsp;</span><span class="src-str">'name'</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a336"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-var">$account&nbsp;</span>=&nbsp;<span class="src-id"><a href="../swam/Utils.html">Utils</a></span><span class="src-sym">::</span><a href="../swam/Utils.html#methodget_object">get_object</a><span class="src-sym">(</span><span class="src-var">$data</span><span class="src-sym">,&nbsp;</span><span class="src-str">'account'</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a337"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-var">$amount&nbsp;</span>=&nbsp;<span class="src-id"><a href="../swam/Utils.html">Utils</a></span><span class="src-sym">::</span><a href="../swam/Utils.html#methodget_string">get_string</a><span class="src-sym">(</span><span class="src-var">$data</span><span class="src-sym">,&nbsp;</span><span class="src-str">'amount'</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a338"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-var">$locale_amount&nbsp;</span>=&nbsp;<span class="src-id"><a href="../swam/Utils.html">Utils</a></span><span class="src-sym">::</span><a href="../swam/Utils.html#methodget_string">get_string</a><span class="src-sym">(</span><span class="src-var">$data</span><span class="src-sym">,&nbsp;</span><span class="src-str">'locale_amount'</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a339"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-key">if&nbsp;</span><span class="src-sym">(</span><span class="src-sym">!</span><span class="src-key">empty</span><span class="src-sym">(</span><span class="src-var">$amount</span><span class="src-sym">)&nbsp;</span>&amp;&amp;&nbsp;<span class="src-sym">!</span><span class="src-key">empty</span><span class="src-sym">(</span><span class="src-var">$locale_amount</span><span class="src-sym">))&nbsp;</span><span class="src-sym">{</span></div></li>
<li><div class="src-line"><a name="a340"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;throw&nbsp;<span class="src-key">new&nbsp;</span><span class="src-id"><a href="../swam/IllegalArgumentException.html">IllegalArgumentException</a></span><span class="src-sym">(</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a341"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-sym">}</span></div></li>
<li><div class="src-line"><a name="a342"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-var">$is_debit&nbsp;</span>=&nbsp;<span class="src-id"><a href="../swam/Utils.html">Utils</a></span><span class="src-sym">::</span><a href="../swam/Utils.html#methodget_string">get_string</a><span class="src-sym">(</span><span class="src-var">$data</span><span class="src-sym">,&nbsp;</span><span class="src-str">'is_debit'</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a343"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-var">$mean_of_payment_code&nbsp;</span>=&nbsp;<span class="src-id"><a href="../swam/Utils.html">Utils</a></span><span class="src-sym">::</span><a href="../swam/Utils.html#methodget_string">get_string</a><span class="src-sym">(</span><span class="src-var">$data</span><span class="src-sym">,&nbsp;</span><span class="src-str">'mean_of_payment_code'</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a344"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-var">$date&nbsp;</span>=&nbsp;<span class="src-id"><a href="../swam/Utils.html">Utils</a></span><span class="src-sym">::</span><a href="../swam/Utils.html#methodget_string">get_string</a><span class="src-sym">(</span><span class="src-var">$data</span><span class="src-sym">,&nbsp;</span><span class="src-str">'date'</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a345"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-var">$comment&nbsp;</span>=&nbsp;<span class="src-id"><a href="../swam/Utils.html">Utils</a></span><span class="src-sym">::</span><a href="../swam/Utils.html#methodget_string">get_string</a><span class="src-sym">(</span><span class="src-var">$data</span><span class="src-sym">,&nbsp;</span><span class="src-str">'comment'</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a346"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-var">$is_valid&nbsp;</span>=&nbsp;<span class="src-id"><a href="../swam/Utils.html">Utils</a></span><span class="src-sym">::</span><a href="../swam/Utils.html#methodget_string">get_string</a><span class="src-sym">(</span><span class="src-var">$data</span><span class="src-sym">,&nbsp;</span><span class="src-str">'is_valid'</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a347"></a>&nbsp;</div></li>
<li><div class="src-line"><a name="a348"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../swam/Transaction.html#methodset_name">set_name</a><span class="src-sym">(</span><span class="src-var">$name</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a349"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../swam/Transaction.html#methodset_account">set_account</a><span class="src-sym">(</span><span class="src-var">$account</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a350"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-key">if&nbsp;</span><span class="src-sym">(</span><span class="src-key">empty</span><span class="src-sym">(</span><span class="src-var">$amount</span><span class="src-sym">))&nbsp;</span><span class="src-sym">{</span></div></li>
<li><div class="src-line"><a name="a351"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../swam/Transaction.html#methodset_locale_amount">set_locale_amount</a><span class="src-sym">(</span><span class="src-var">$locale_amount</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a352"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-sym">}&nbsp;</span><span class="src-key">else&nbsp;</span><span class="src-sym">{</span></div></li>
<li><div class="src-line"><a name="a353"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../swam/Transaction.html#methodset_amount">set_amount</a><span class="src-sym">(</span><span class="src-var">$amount</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a354"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-sym">}</span></div></li>
<li><div class="src-line"><a name="a355"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../swam/Transaction.html#methodset_is_debit">set_is_debit</a><span class="src-sym">(</span><span class="src-var">$is_debit</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a356"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../swam/Transaction.html#methodset_mean_of_payment_code">set_mean_of_payment_code</a><span class="src-sym">(</span><span class="src-var">$mean_of_payment_code</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a357"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../swam/Transaction.html#methodset_date">set_date</a><span class="src-sym">(</span><span class="src-var">$date</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a358"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../swam/Transaction.html#methodset_comment">set_comment</a><span class="src-sym">(</span><span class="src-var">$comment</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a359"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../swam/Transaction.html#methodset_is_valid">set_is_valid</a><span class="src-sym">(</span><span class="src-var">$is_valid</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a360"></a>&nbsp;&nbsp;<span class="src-sym">}</span></div></li>
<li><div class="src-line"><a name="a361"></a>&nbsp;</div></li>
<li><div class="src-line"><a name="a362"></a>&nbsp;&nbsp;<span class="src-doc">/**</span></div></li>
<li><div class="src-line"><a name="a363"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;</span><span class="src-doc-coretag">@see</span><span class="src-doc">&nbsp;IPersistentObject::store()</span></div></li>
<li><div class="src-line"><a name="a364"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*/</span></div></li>
<li><div class="src-line"><a name="a365"></a>&nbsp;&nbsp;<span class="src-key">function&nbsp;</span><a href="../swam/Transaction.html#methodstore">store</a><span class="src-sym">(</span><span class="src-sym">)&nbsp;</span><span class="src-sym">{</span></div></li>
<li><div class="src-line"><a name="a366"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-var">$dbh&nbsp;</span>=&nbsp;<span class="src-id"><a href="../swam/Database.html">Database</a></span><span class="src-sym">::</span><a href="../swam/Database.html#methodinstance">instance</a><span class="src-sym">(</span><span class="src-sym">)</span><span class="src-sym">-&gt;</span><span class="src-id">get_connection</span><span class="src-sym">(</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a367"></a>&nbsp;</div></li>
<li><div class="src-line"><a name="a368"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-key">if&nbsp;</span><span class="src-sym">(</span><span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../swam/PersistentObject.html#methodget_id">get_id</a><span class="src-sym">(</span><span class="src-sym">)&nbsp;</span>==&nbsp;-<span class="src-num">1</span><span class="src-sym">)&nbsp;</span><span class="src-sym">{</span></div></li>
<li><div class="src-line"><a name="a369"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-comm">//&nbsp;Transaction&nbsp;does&nbsp;not&nbsp;exist&nbsp;in&nbsp;the&nbsp;database</span></div></li>
<li><div class="src-line"><a name="a370"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-key">if&nbsp;</span><span class="src-sym">(</span><span class="src-sym">!</span><span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../swam/Transaction.html#methodget_account">get_account</a><span class="src-sym">(</span><span class="src-sym">)</span><span class="src-sym">-&gt;</span><span class="src-id">is_opened</span><span class="src-sym">(</span><span class="src-sym">))&nbsp;</span><span class="src-sym">{</span></div></li>
<li><div class="src-line"><a name="a371"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;throw&nbsp;<span class="src-key">new&nbsp;</span><span class="src-id"><a href="../swam/TransactionException.html">TransactionException</a></span><span class="src-sym">(</span><a href="http://www.php.net/_">_</a><span class="src-sym">(</span><span class="src-str">'Cannot&nbsp;add&nbsp;a&nbsp;transaction&nbsp;to&nbsp;a&nbsp;closed&nbsp;account.'</span><span class="src-sym">))</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a372"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-sym">}</span></div></li>
<li><div class="src-line"><a name="a373"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-var">$sth&nbsp;</span>=&nbsp;<span class="src-var">$dbh</span><span class="src-sym">-&gt;</span><span class="src-id">prepare</span><span class="src-sym">(</span><span class="src-str">'INSERT&nbsp;INTO&nbsp;t_transaction(name,&nbsp;account_id,&nbsp;amount,&nbsp;is_debit,&nbsp;mean_of_payment_code,&nbsp;date,&nbsp;comment,&nbsp;is_valid)&nbsp;VALUES&nbsp;(?,&nbsp;?,&nbsp;?,&nbsp;?,&nbsp;?,&nbsp;?,&nbsp;?,&nbsp;?)'</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a374"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-var">$sth</span><span class="src-sym">-&gt;</span><span class="src-id">execute</span><span class="src-sym">(</span><span class="src-key">array</span><span class="src-sym">(</span><span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../swam/Transaction.html#methodget_name">get_name</a><span class="src-sym">(</span><span class="src-sym">)</span><span class="src-sym">,&nbsp;</span><span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../swam/Transaction.html#methodget_account">get_account</a><span class="src-sym">(</span><span class="src-sym">)</span><span class="src-sym">-&gt;</span><span class="src-id">get_id</span><span class="src-sym">(</span><span class="src-sym">)</span><span class="src-sym">,&nbsp;</span><span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../swam/Transaction.html#methodget_amount">get_amount</a><span class="src-sym">(</span><span class="src-sym">)</span><span class="src-sym">,&nbsp;</span><span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../swam/Transaction.html#methodis_debit">is_debit</a><span class="src-sym">(</span><span class="src-sym">)</span><span class="src-sym">,&nbsp;</span><span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../swam/Transaction.html#methodget_mean_of_payment_code">get_mean_of_payment_code</a><span class="src-sym">(</span><span class="src-sym">)</span><span class="src-sym">,&nbsp;</span><span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../swam/Transaction.html#methodget_date">get_date</a><span class="src-sym">(</span><span class="src-sym">)</span><span class="src-sym">,&nbsp;</span><span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../swam/Transaction.html#methodget_comment">get_comment</a><span class="src-sym">(</span><span class="src-sym">)</span><span class="src-sym">,&nbsp;</span><span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../swam/Transaction.html#methodis_valid">is_valid</a><span class="src-sym">(</span><span class="src-sym">)))</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a375"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../swam/Transaction.html#methodset_id">set_id</a><span class="src-sym">(</span><span class="src-var">$dbh</span><span class="src-sym">-&gt;</span><span class="src-id">lastInsertId</span><span class="src-sym">(</span><span class="src-sym">))</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a376"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-id"><a href="../swam/FileLog.html">FileLog</a></span><span class="src-sym">::</span><a href="../swam/FileLog.html#methodinstance">instance</a><span class="src-sym">(</span><span class="src-sym">)</span><span class="src-sym">-&gt;</span><span class="src-id">info</span><span class="src-sym">(</span><a href="http://www.php.net/sprintf">sprintf</a><span class="src-sym">(</span><span class="src-str">'Added&nbsp;new&nbsp;transaction&nbsp;(user_id:&nbsp;%s,&nbsp;account_id:&nbsp;%s,&nbsp;transaction_id:&nbsp;%s)'</span><span class="src-sym">,&nbsp;</span><span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../swam/Transaction.html#methodget_account">get_account</a><span class="src-sym">(</span><span class="src-sym">)</span><span class="src-sym">-&gt;</span><span class="src-id">get_owner</span><span class="src-sym">(</span><span class="src-sym">)</span><span class="src-sym">-&gt;</span><span class="src-id">get_id</span><span class="src-sym">(</span><span class="src-sym">)</span><span class="src-sym">,&nbsp;</span><span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../swam/Transaction.html#methodget_account">get_account</a><span class="src-sym">(</span><span class="src-sym">)</span><span class="src-sym">-&gt;</span><span class="src-id">get_id</span><span class="src-sym">(</span><span class="src-sym">)</span><span class="src-sym">,&nbsp;</span><span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../swam/PersistentObject.html#methodget_id">get_id</a><span class="src-sym">(</span><span class="src-sym">)))</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a377"></a>&nbsp;</div></li>
<li><div class="src-line"><a name="a378"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-sym">}&nbsp;</span><span class="src-key">else&nbsp;</span><span class="src-sym">{</span></div></li>
<li><div class="src-line"><a name="a379"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-comm">//&nbsp;Transaction&nbsp;already&nbsp;exist&nbsp;in&nbsp;the&nbsp;database&nbsp;(except&nbsp;in&nbsp;case&nbsp;of&nbsp;database&nbsp;import)</span></div></li>
<li><div class="src-line"><a name="a380"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-key">if&nbsp;</span><span class="src-sym">(</span><span class="src-sym">!</span><span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../swam/Transaction.html#methodget_account">get_account</a><span class="src-sym">(</span><span class="src-sym">)</span><span class="src-sym">-&gt;</span><span class="src-id">is_opened</span><span class="src-sym">(</span><span class="src-sym">))&nbsp;</span><span class="src-sym">{</span></div></li>
<li><div class="src-line"><a name="a381"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;throw&nbsp;<span class="src-key">new&nbsp;</span><span class="src-id"><a href="../swam/TransactionException.html">TransactionException</a></span><span class="src-sym">(</span><a href="http://www.php.net/_">_</a><span class="src-sym">(</span><span class="src-str">'Cannot&nbsp;modify&nbsp;the&nbsp;transaction&nbsp;because&nbsp;the&nbsp;corresponding&nbsp;account&nbsp;is&nbsp;closed.'</span><span class="src-sym">))</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a382"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-sym">}</span></div></li>
<li><div class="src-line"><a name="a383"></a>&nbsp;</div></li>
<li><div class="src-line"><a name="a384"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-var">$sth&nbsp;</span>=&nbsp;<span class="src-var">$dbh</span><span class="src-sym">-&gt;</span><span class="src-id">prepare</span><span class="src-sym">(</span><span class="src-str">'INSERT&nbsp;OR&nbsp;REPLACE&nbsp;INTO&nbsp;t_transaction(transaction_id,&nbsp;name,&nbsp;account_id,&nbsp;amount,&nbsp;is_debit,&nbsp;mean_of_payment_code,&nbsp;date,&nbsp;comment,&nbsp;is_valid)&nbsp;VALUES&nbsp;(?,&nbsp;?,&nbsp;?,&nbsp;?,&nbsp;?,&nbsp;?,&nbsp;?,&nbsp;?,&nbsp;?)'</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a385"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-var">$sth</span><span class="src-sym">-&gt;</span><span class="src-id">execute</span><span class="src-sym">(</span><span class="src-key">array</span><span class="src-sym">(</span><span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../swam/PersistentObject.html#methodget_id">get_id</a><span class="src-sym">(</span><span class="src-sym">)</span><span class="src-sym">,&nbsp;</span><span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../swam/Transaction.html#methodget_name">get_name</a><span class="src-sym">(</span><span class="src-sym">)</span><span class="src-sym">,&nbsp;</span><span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../swam/Transaction.html#methodget_account">get_account</a><span class="src-sym">(</span><span class="src-sym">)</span><span class="src-sym">-&gt;</span><span class="src-id">get_id</span><span class="src-sym">(</span><span class="src-sym">)</span><span class="src-sym">,&nbsp;</span><span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../swam/Transaction.html#methodget_amount">get_amount</a><span class="src-sym">(</span><span class="src-sym">)</span><span class="src-sym">,&nbsp;</span><span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../swam/Transaction.html#methodis_debit">is_debit</a><span class="src-sym">(</span><span class="src-sym">)</span><span class="src-sym">,&nbsp;</span><span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../swam/Transaction.html#methodget_mean_of_payment_code">get_mean_of_payment_code</a><span class="src-sym">(</span><span class="src-sym">)</span><span class="src-sym">,&nbsp;</span><span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../swam/Transaction.html#methodget_date">get_date</a><span class="src-sym">(</span><span class="src-sym">)</span><span class="src-sym">,&nbsp;</span><span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../swam/Transaction.html#methodget_comment">get_comment</a><span class="src-sym">(</span><span class="src-sym">)</span><span class="src-sym">,&nbsp;</span><span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../swam/Transaction.html#methodis_valid">is_valid</a><span class="src-sym">(</span><span class="src-sym">)))</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a386"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-id"><a href="../swam/FileLog.html">FileLog</a></span><span class="src-sym">::</span><a href="../swam/FileLog.html#methodinstance">instance</a><span class="src-sym">(</span><span class="src-sym">)</span><span class="src-sym">-&gt;</span><span class="src-id">info</span><span class="src-sym">(</span><a href="http://www.php.net/sprintf">sprintf</a><span class="src-sym">(</span><span class="src-str">'Stored&nbsp;transaction&nbsp;(user_id:&nbsp;%s,&nbsp;account_id:&nbsp;%s,&nbsp;transaction_id:&nbsp;%s)'</span><span class="src-sym">,&nbsp;</span><span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../swam/Transaction.html#methodget_account">get_account</a><span class="src-sym">(</span><span class="src-sym">)</span><span class="src-sym">-&gt;</span><span class="src-id">get_id</span><span class="src-sym">(</span><span class="src-sym">)</span><span class="src-sym">,&nbsp;</span><span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../swam/Transaction.html#methodget_account">get_account</a><span class="src-sym">(</span><span class="src-sym">)</span><span class="src-sym">-&gt;</span><span class="src-id">get_owner</span><span class="src-sym">(</span><span class="src-sym">)</span><span class="src-sym">-&gt;</span><span class="src-id">get_id</span><span class="src-sym">(</span><span class="src-sym">)</span><span class="src-sym">,&nbsp;</span><span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../swam/PersistentObject.html#methodget_id">get_id</a><span class="src-sym">(</span><span class="src-sym">)))</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a387"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-sym">}</span></div></li>
<li><div class="src-line"><a name="a388"></a>&nbsp;&nbsp;<span class="src-sym">}</span></div></li>
<li><div class="src-line"><a name="a389"></a>&nbsp;</div></li>
<li><div class="src-line"><a name="a390"></a>&nbsp;&nbsp;<span class="src-doc">/**</span></div></li>
<li><div class="src-line"><a name="a391"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;Deletes&nbsp;this&nbsp;transaction&nbsp;from&nbsp;the&nbsp;database.&nbsp;If&nbsp;the&nbsp;transaction&nbsp;has</span></div></li>
<li><div class="src-line"><a name="a392"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;not&nbsp;been&nbsp;saved&nbsp;into&nbsp;the&nbsp;database&nbsp;yet,&nbsp;this&nbsp;function&nbsp;does&nbsp;nothing.</span></div></li>
<li><div class="src-line"><a name="a393"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*</span></div></li>
<li><div class="src-line"><a name="a394"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;</span><span class="src-doc-coretag">@see</span><span class="src-doc">&nbsp;IPersistentObject::remove()</span></div></li>
<li><div class="src-line"><a name="a395"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*/</span></div></li>
<li><div class="src-line"><a name="a396"></a>&nbsp;&nbsp;<span class="src-key">public&nbsp;</span><span class="src-key">function&nbsp;</span><a href="../swam/Transaction.html#methodremove">remove</a><span class="src-sym">(</span><span class="src-sym">)&nbsp;</span><span class="src-sym">{</span></div></li>
<li><div class="src-line"><a name="a397"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-key">if&nbsp;</span><span class="src-sym">(</span><span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../swam/PersistentObject.html#methodget_id">get_id</a><span class="src-sym">(</span><span class="src-sym">)&nbsp;</span>!=&nbsp;-<span class="src-num">1</span><span class="src-sym">)&nbsp;</span><span class="src-sym">{</span></div></li>
<li><div class="src-line"><a name="a398"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-key">if&nbsp;</span><span class="src-sym">(</span><span class="src-sym">!</span><span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../swam/Transaction.html#methodget_account">get_account</a><span class="src-sym">(</span><span class="src-sym">)</span><span class="src-sym">-&gt;</span><span class="src-id">is_opened</span><span class="src-sym">(</span><span class="src-sym">))&nbsp;</span><span class="src-sym">{</span></div></li>
<li><div class="src-line"><a name="a399"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;throw&nbsp;<span class="src-key">new&nbsp;</span><span class="src-id"><a href="../swam/TransactionException.html">TransactionException</a></span><span class="src-sym">(</span><a href="http://www.php.net/_">_</a><span class="src-sym">(</span><span class="src-str">'Cannot&nbsp;remove&nbsp;a&nbsp;transaction&nbsp;of&nbsp;a&nbsp;closed&nbsp;account.'</span><span class="src-sym">))</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a400"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-sym">}</span></div></li>
<li><div class="src-line"><a name="a401"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-var">$dbh&nbsp;</span>=&nbsp;<span class="src-id"><a href="../swam/Database.html">Database</a></span><span class="src-sym">::</span><a href="../swam/Database.html#methodinstance">instance</a><span class="src-sym">(</span><span class="src-sym">)</span><span class="src-sym">-&gt;</span><span class="src-id">get_connection</span><span class="src-sym">(</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a402"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-var">$sth&nbsp;</span>=&nbsp;<span class="src-var">$dbh</span><span class="src-sym">-&gt;</span><span class="src-id">prepare</span><span class="src-sym">(</span><span class="src-str">'DELETE&nbsp;FROM&nbsp;t_transaction&nbsp;WHERE&nbsp;transaction_id=?'</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a403"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-var">$sth</span><span class="src-sym">-&gt;</span><span class="src-id">execute</span><span class="src-sym">(</span><span class="src-key">array</span><span class="src-sym">(</span><span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../swam/PersistentObject.html#methodget_id">get_id</a><span class="src-sym">(</span><span class="src-sym">)))</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a404"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-id"><a href="../swam/FileLog.html">FileLog</a></span><span class="src-sym">::</span><a href="../swam/FileLog.html#methodinstance">instance</a><span class="src-sym">(</span><span class="src-sym">)</span><span class="src-sym">-&gt;</span><span class="src-id">info</span><span class="src-sym">(</span><a href="http://www.php.net/sprintf">sprintf</a><span class="src-sym">(</span><span class="src-str">'Removed&nbsp;transaction&nbsp;(user_id:&nbsp;%s,&nbsp;account_id:&nbsp;%s,&nbsp;transaction_id:&nbsp;%s)'</span><span class="src-sym">,&nbsp;</span><span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../swam/Transaction.html#methodget_account">get_account</a><span class="src-sym">(</span><span class="src-sym">)</span><span class="src-sym">-&gt;</span><span class="src-id">get_owner</span><span class="src-sym">(</span><span class="src-sym">)</span><span class="src-sym">-&gt;</span><span class="src-id">get_id</span><span class="src-sym">(</span><span class="src-sym">)</span><span class="src-sym">,&nbsp;</span><span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../swam/Transaction.html#methodget_account">get_account</a><span class="src-sym">(</span><span class="src-sym">)</span><span class="src-sym">-&gt;</span><span class="src-id">get_id</span><span class="src-sym">(</span><span class="src-sym">)</span><span class="src-sym">,&nbsp;</span><span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../swam/PersistentObject.html#methodget_id">get_id</a><span class="src-sym">(</span><span class="src-sym">)))</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a405"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-sym">}</span></div></li>
<li><div class="src-line"><a name="a406"></a>&nbsp;&nbsp;<span class="src-sym">}</span></div></li>
<li><div class="src-line"><a name="a407"></a><span class="src-sym">}</span></div></li>
<li><div class="src-line"><a name="a408"></a><span class="src-php">?&gt;</span></div></li>
</ol></div>
</div>
	<p class="notes" id="credit">
		Documentation generated on Thu, 20 Aug 2009 01:04:19 +0200 by <a href="http://www.phpdoc.org" target="_blank">phpDocumentor 1.4.1</a>
	</p>
	</body>
</html>
Return current item: Simple Web Account Manager