Location: PHPKode > projects > Simple Web Account Manager > swam-1.0beta2/phpdoc/__filesource/fsource_swam__accountAccount.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 Account.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 Account.class.inc</h1>
<p>Documentation is available at <a href="../swam/_account---Account.class.inc.html">Account.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;IAccount&nbsp;implementation&nbsp;using&nbsp;PDO&nbsp;and&nbsp;sqlite.</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/Account.html">Account</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/IAccount.html">IAccount</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/Account.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/Account.html#constBANK_NAME_MAX_LENGTH">BANK_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="a42"></a>&nbsp;&nbsp;<span class="src-key">const&nbsp;</span><a href="../swam/Account.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">//&nbsp;-----------------------------</span></div></li>
<li><div class="src-line"><a name="a45"></a>&nbsp;&nbsp;<span class="src-comm">//&nbsp;Static&nbsp;methods</span></div></li>
<li><div class="src-line"><a name="a46"></a>&nbsp;&nbsp;<span class="src-comm">//&nbsp;-----------------------------</span></div></li>
<li><div class="src-line"><a name="a47"></a>&nbsp;</div></li>
<li><div class="src-line"><a name="a48"></a>&nbsp;&nbsp;<span class="src-doc">/**</span></div></li>
<li><div class="src-line"><a name="a49"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;Returns&nbsp;an&nbsp;assoicative&nbsp;array&nbsp;(&lt;iso&nbsp;4217&nbsp;code&gt;&nbsp;-&gt;&nbsp;&lt;currency&nbsp;name&gt;)</span></div></li>
<li><div class="src-line"><a name="a50"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;containing&nbsp;the&nbsp;list&nbsp;of&nbsp;currencies.</span></div></li>
<li><div class="src-line"><a name="a51"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*</span></div></li>
<li><div class="src-line"><a name="a52"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;Found&nbsp;at:&nbsp;http://www.nationmaster.com/encyclopedia/ISO-currency-code</span></div></li>
<li><div class="src-line"><a name="a53"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;See&nbsp;also&nbsp;http://www.bsi-global.com/Technical+Information/Publications/_Publications/tig90.xalter</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><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="a56"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*/</span></div></li>
<li><div class="src-line"><a name="a57"></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/Account.html#methodget_currencies">get_currencies</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="a58"></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">'AFA'&nbsp;</span>=&gt;&nbsp;<a href="http://www.php.net/_">_</a><span class="src-sym">(</span><span class="src-str">'Afghani'</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;<span class="src-str">'ALL'&nbsp;</span>=&gt;&nbsp;<a href="http://www.php.net/_">_</a><span class="src-sym">(</span><span class="src-str">'Albanian&nbsp;lek'</span><span class="src-sym">)</span><span class="src-sym">,</span></div></li>
<li><div class="src-line"><a name="a60"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-str">'DZD'&nbsp;</span>=&gt;&nbsp;<a href="http://www.php.net/_">_</a><span class="src-sym">(</span><span class="src-str">'Algerian&nbsp;Dinar'</span><span class="src-sym">)</span><span class="src-sym">,</span></div></li>
<li><div class="src-line"><a name="a61"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-str">'AOA'&nbsp;</span>=&gt;&nbsp;<a href="http://www.php.net/_">_</a><span class="src-sym">(</span><span class="src-str">'Angolan&nbsp;Kwanza'</span><span class="src-sym">)</span><span class="src-sym">,</span></div></li>
<li><div class="src-line"><a name="a62"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-str">'ARS'&nbsp;</span>=&gt;&nbsp;<a href="http://www.php.net/_">_</a><span class="src-sym">(</span><span class="src-str">'Argentine&nbsp;Peso'</span><span class="src-sym">)</span><span class="src-sym">,</span></div></li>
<li><div class="src-line"><a name="a63"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-str">'AMD'&nbsp;</span>=&gt;&nbsp;<a href="http://www.php.net/_">_</a><span class="src-sym">(</span><span class="src-str">'Armenian&nbsp;Dram'</span><span class="src-sym">)</span><span class="src-sym">,</span></div></li>
<li><div class="src-line"><a name="a64"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-str">'AWG'&nbsp;</span>=&gt;&nbsp;<a href="http://www.php.net/_">_</a><span class="src-sym">(</span><span class="src-str">'Aruban&nbsp;Guilder'</span><span class="src-sym">)</span><span class="src-sym">,</span></div></li>
<li><div class="src-line"><a name="a65"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-str">'AUD'&nbsp;</span>=&gt;&nbsp;<a href="http://www.php.net/_">_</a><span class="src-sym">(</span><span class="src-str">'Australian&nbsp;Dollar'</span><span class="src-sym">)</span><span class="src-sym">,</span></div></li>
<li><div class="src-line"><a name="a66"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-str">'AZM'&nbsp;</span>=&gt;&nbsp;<a href="http://www.php.net/_">_</a><span class="src-sym">(</span><span class="src-str">'Azerbaijani&nbsp;Manat'</span><span class="src-sym">)</span><span class="src-sym">,</span></div></li>
<li><div class="src-line"><a name="a67"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-str">'BSD'&nbsp;</span>=&gt;&nbsp;<a href="http://www.php.net/_">_</a><span class="src-sym">(</span><span class="src-str">'Bahamian&nbsp;Dollar'</span><span class="src-sym">)</span><span class="src-sym">,</span></div></li>
<li><div class="src-line"><a name="a68"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-str">'BHD'&nbsp;</span>=&gt;&nbsp;<a href="http://www.php.net/_">_</a><span class="src-sym">(</span><span class="src-str">'Bahraini&nbsp;Dinar'</span><span class="src-sym">)</span><span class="src-sym">,</span></div></li>
<li><div class="src-line"><a name="a69"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-str">'BDT'&nbsp;</span>=&gt;&nbsp;<a href="http://www.php.net/_">_</a><span class="src-sym">(</span><span class="src-str">'Bangladesh&nbsp;Taka'</span><span class="src-sym">)</span><span class="src-sym">,</span></div></li>
<li><div class="src-line"><a name="a70"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-str">'BBD'&nbsp;</span>=&gt;&nbsp;<a href="http://www.php.net/_">_</a><span class="src-sym">(</span><span class="src-str">'Barbados&nbsp;Dollar'</span><span class="src-sym">)</span><span class="src-sym">,</span></div></li>
<li><div class="src-line"><a name="a71"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-str">'BYR'&nbsp;</span>=&gt;&nbsp;<a href="http://www.php.net/_">_</a><span class="src-sym">(</span><span class="src-str">'Belarussian&nbsp;Ruble'</span><span class="src-sym">)</span><span class="src-sym">,</span></div></li>
<li><div class="src-line"><a name="a72"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-str">'BZD'&nbsp;</span>=&gt;&nbsp;<a href="http://www.php.net/_">_</a><span class="src-sym">(</span><span class="src-str">'Belize&nbsp;Dollar'</span><span class="src-sym">)</span><span class="src-sym">,</span></div></li>
<li><div class="src-line"><a name="a73"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-str">'BMD'&nbsp;</span>=&gt;&nbsp;<a href="http://www.php.net/_">_</a><span class="src-sym">(</span><span class="src-str">'Bermuda&nbsp;Dollar'</span><span class="src-sym">)</span><span class="src-sym">,</span></div></li>
<li><div class="src-line"><a name="a74"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-str">'BTN'&nbsp;</span>=&gt;&nbsp;<a href="http://www.php.net/_">_</a><span class="src-sym">(</span><span class="src-str">'Bhutan&nbsp;Ngultrum'</span><span class="src-sym">)</span><span class="src-sym">,</span></div></li>
<li><div class="src-line"><a name="a75"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-str">'BOB'&nbsp;</span>=&gt;&nbsp;<a href="http://www.php.net/_">_</a><span class="src-sym">(</span><span class="src-str">'Bolivian&nbsp;Boliviano'</span><span class="src-sym">)</span><span class="src-sym">,</span></div></li>
<li><div class="src-line"><a name="a76"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-str">'BOV'&nbsp;</span>=&gt;&nbsp;<a href="http://www.php.net/_">_</a><span class="src-sym">(</span><span class="src-str">'Bolivian&nbsp;Mvdol'</span><span class="src-sym">)</span><span class="src-sym">,</span></div></li>
<li><div class="src-line"><a name="a77"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-str">'BAM'&nbsp;</span>=&gt;&nbsp;<a href="http://www.php.net/_">_</a><span class="src-sym">(</span><span class="src-str">'Bosnia-Herzegovina&nbsp;Convertible&nbsp;Marks'</span><span class="src-sym">)</span><span class="src-sym">,</span></div></li>
<li><div class="src-line"><a name="a78"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-str">'BWP'&nbsp;</span>=&gt;&nbsp;<a href="http://www.php.net/_">_</a><span class="src-sym">(</span><span class="src-str">'Botswana&nbsp;Pula'</span><span class="src-sym">)</span><span class="src-sym">,</span></div></li>
<li><div class="src-line"><a name="a79"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-str">'BRL'&nbsp;</span>=&gt;&nbsp;<a href="http://www.php.net/_">_</a><span class="src-sym">(</span><span class="src-str">'Brazilian&nbsp;Real'</span><span class="src-sym">)</span><span class="src-sym">,</span></div></li>
<li><div class="src-line"><a name="a80"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-str">'BND'&nbsp;</span>=&gt;&nbsp;<a href="http://www.php.net/_">_</a><span class="src-sym">(</span><span class="src-str">'Brunei&nbsp;Dollar'</span><span class="src-sym">)</span><span class="src-sym">,</span></div></li>
<li><div class="src-line"><a name="a81"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-str">'BGN'&nbsp;</span>=&gt;&nbsp;<a href="http://www.php.net/_">_</a><span class="src-sym">(</span><span class="src-str">'Bulgarian&nbsp;Lev'</span><span class="src-sym">)</span><span class="src-sym">,</span></div></li>
<li><div class="src-line"><a name="a82"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-str">'BIF'&nbsp;</span>=&gt;&nbsp;<a href="http://www.php.net/_">_</a><span class="src-sym">(</span><span class="src-str">'Burundi&nbsp;Franc'</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-str">'XOF'&nbsp;</span>=&gt;&nbsp;<a href="http://www.php.net/_">_</a><span class="src-sym">(</span><span class="src-str">'CFA&nbsp;Franc&nbsp;BCEAO'</span><span class="src-sym">)</span><span class="src-sym">,</span></div></li>
<li><div class="src-line"><a name="a84"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-str">'XAF'&nbsp;</span>=&gt;&nbsp;<a href="http://www.php.net/_">_</a><span class="src-sym">(</span><span class="src-str">'CFA&nbsp;Franc&nbsp;BEAC'</span><span class="src-sym">)</span><span class="src-sym">,</span></div></li>
<li><div class="src-line"><a name="a85"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-str">'XPF'&nbsp;</span>=&gt;&nbsp;<a href="http://www.php.net/_">_</a><span class="src-sym">(</span><span class="src-str">'CFP&nbsp;Franc'</span><span class="src-sym">)</span><span class="src-sym">,</span></div></li>
<li><div class="src-line"><a name="a86"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-str">'KHR'&nbsp;</span>=&gt;&nbsp;<a href="http://www.php.net/_">_</a><span class="src-sym">(</span><span class="src-str">'Cambodian&nbsp;Riel'</span><span class="src-sym">)</span><span class="src-sym">,</span></div></li>
<li><div class="src-line"><a name="a87"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-str">'CAD'&nbsp;</span>=&gt;&nbsp;<a href="http://www.php.net/_">_</a><span class="src-sym">(</span><span class="src-str">'Canadian&nbsp;Dollar'</span><span class="src-sym">)</span><span class="src-sym">,</span></div></li>
<li><div class="src-line"><a name="a88"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-str">'CVE'&nbsp;</span>=&gt;&nbsp;<a href="http://www.php.net/_">_</a><span class="src-sym">(</span><span class="src-str">'Cape&nbsp;Verde&nbsp;Escudo'</span><span class="src-sym">)</span><span class="src-sym">,</span></div></li>
<li><div class="src-line"><a name="a89"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-str">'KYD'&nbsp;</span>=&gt;&nbsp;<a href="http://www.php.net/_">_</a><span class="src-sym">(</span><span class="src-str">'Cayman&nbsp;Islands&nbsp;Dollar'</span><span class="src-sym">)</span><span class="src-sym">,</span></div></li>
<li><div class="src-line"><a name="a90"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-str">'CLP'&nbsp;</span>=&gt;&nbsp;<a href="http://www.php.net/_">_</a><span class="src-sym">(</span><span class="src-str">'Chilean&nbsp;Peso'</span><span class="src-sym">)</span><span class="src-sym">,</span></div></li>
<li><div class="src-line"><a name="a91"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-str">'CLF'&nbsp;</span>=&gt;&nbsp;<a href="http://www.php.net/_">_</a><span class="src-sym">(</span><span class="src-str">'Chilean&nbsp;Unidades&nbsp;de&nbsp;fomento'</span><span class="src-sym">)</span><span class="src-sym">,</span></div></li>
<li><div class="src-line"><a name="a92"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-str">'COP'&nbsp;</span>=&gt;&nbsp;<a href="http://www.php.net/_">_</a><span class="src-sym">(</span><span class="src-str">'Colombian&nbsp;Peso'</span><span class="src-sym">)</span><span class="src-sym">,</span></div></li>
<li><div class="src-line"><a name="a93"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-str">'KMF'&nbsp;</span>=&gt;&nbsp;<a href="http://www.php.net/_">_</a><span class="src-sym">(</span><span class="src-str">'Comoro&nbsp;Franc'</span><span class="src-sym">)</span><span class="src-sym">,</span></div></li>
<li><div class="src-line"><a name="a94"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-str">'CRC'&nbsp;</span>=&gt;&nbsp;<a href="http://www.php.net/_">_</a><span class="src-sym">(</span><span class="src-str">'Costa&nbsp;Rican&nbsp;Col&nbsp;n'</span><span class="src-sym">)</span><span class="src-sym">,</span></div></li>
<li><div class="src-line"><a name="a95"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-str">'HRK'&nbsp;</span>=&gt;&nbsp;<a href="http://www.php.net/_">_</a><span class="src-sym">(</span><span class="src-str">'Croatian&nbsp;Kuna'</span><span class="src-sym">)</span><span class="src-sym">,</span></div></li>
<li><div class="src-line"><a name="a96"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-str">'CUP'&nbsp;</span>=&gt;&nbsp;<a href="http://www.php.net/_">_</a><span class="src-sym">(</span><span class="src-str">'Cuban&nbsp;Peso'</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-str">'CYP'&nbsp;</span>=&gt;&nbsp;<a href="http://www.php.net/_">_</a><span class="src-sym">(</span><span class="src-str">'Cyprus&nbsp;Pound'</span><span class="src-sym">)</span><span class="src-sym">,</span></div></li>
<li><div class="src-line"><a name="a98"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-str">'CZK'&nbsp;</span>=&gt;&nbsp;<a href="http://www.php.net/_">_</a><span class="src-sym">(</span><span class="src-str">'Czech&nbsp;Koruna'</span><span class="src-sym">)</span><span class="src-sym">,</span></div></li>
<li><div class="src-line"><a name="a99"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-str">'DKK'&nbsp;</span>=&gt;&nbsp;<a href="http://www.php.net/_">_</a><span class="src-sym">(</span><span class="src-str">'Danish&nbsp;Krone'</span><span class="src-sym">)</span><span class="src-sym">,</span></div></li>
<li><div class="src-line"><a name="a100"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-str">'DJF'&nbsp;</span>=&gt;&nbsp;<a href="http://www.php.net/_">_</a><span class="src-sym">(</span><span class="src-str">'Djibouti&nbsp;Franc'</span><span class="src-sym">)</span><span class="src-sym">,</span></div></li>
<li><div class="src-line"><a name="a101"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-str">'DOP'&nbsp;</span>=&gt;&nbsp;<a href="http://www.php.net/_">_</a><span class="src-sym">(</span><span class="src-str">'Dominican&nbsp;Peso'</span><span class="src-sym">)</span><span class="src-sym">,</span></div></li>
<li><div class="src-line"><a name="a102"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-str">'XCD'&nbsp;</span>=&gt;&nbsp;<a href="http://www.php.net/_">_</a><span class="src-sym">(</span><span class="src-str">'East&nbsp;Caribbean&nbsp;Dollar'</span><span class="src-sym">)</span><span class="src-sym">,</span></div></li>
<li><div class="src-line"><a name="a103"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-str">'EGP'&nbsp;</span>=&gt;&nbsp;<a href="http://www.php.net/_">_</a><span class="src-sym">(</span><span class="src-str">'Egyptian&nbsp;Pound'</span><span class="src-sym">)</span><span class="src-sym">,</span></div></li>
<li><div class="src-line"><a name="a104"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-str">'SVC'&nbsp;</span>=&gt;&nbsp;<a href="http://www.php.net/_">_</a><span class="src-sym">(</span><span class="src-str">'El&nbsp;Salvador&nbsp;Col&nbsp;n'</span><span class="src-sym">)</span><span class="src-sym">,</span></div></li>
<li><div class="src-line"><a name="a105"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-str">'ERN'&nbsp;</span>=&gt;&nbsp;<a href="http://www.php.net/_">_</a><span class="src-sym">(</span><span class="src-str">'Eritrean&nbsp;Nakfa'</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-str">'EEK'&nbsp;</span>=&gt;&nbsp;<a href="http://www.php.net/_">_</a><span class="src-sym">(</span><span class="src-str">'Estonian&nbsp;Kroon'</span><span class="src-sym">)</span><span class="src-sym">,</span></div></li>
<li><div class="src-line"><a name="a107"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-str">'ETB'&nbsp;</span>=&gt;&nbsp;<a href="http://www.php.net/_">_</a><span class="src-sym">(</span><span class="src-str">'Ethiopian&nbsp;Birr'</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-str">'EUR'&nbsp;</span>=&gt;&nbsp;<a href="http://www.php.net/_">_</a><span class="src-sym">(</span><span class="src-str">'Euro'</span><span class="src-sym">)</span><span class="src-sym">,</span></div></li>
<li><div class="src-line"><a name="a109"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-str">'FKP'&nbsp;</span>=&gt;&nbsp;<a href="http://www.php.net/_">_</a><span class="src-sym">(</span><span class="src-str">'Falkland&nbsp;Islands&nbsp;Pound'</span><span class="src-sym">)</span><span class="src-sym">,</span></div></li>
<li><div class="src-line"><a name="a110"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-str">'FJD'&nbsp;</span>=&gt;&nbsp;<a href="http://www.php.net/_">_</a><span class="src-sym">(</span><span class="src-str">'Fiji&nbsp;Dollar'</span><span class="src-sym">)</span><span class="src-sym">,</span></div></li>
<li><div class="src-line"><a name="a111"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-str">'CDF'&nbsp;</span>=&gt;&nbsp;<a href="http://www.php.net/_">_</a><span class="src-sym">(</span><span class="src-str">'Franc&nbsp;Congolais'</span><span class="src-sym">)</span><span class="src-sym">,</span></div></li>
<li><div class="src-line"><a name="a112"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-str">'GMD'&nbsp;</span>=&gt;&nbsp;<a href="http://www.php.net/_">_</a><span class="src-sym">(</span><span class="src-str">'Gambian&nbsp;Dalasi'</span><span class="src-sym">)</span><span class="src-sym">,</span></div></li>
<li><div class="src-line"><a name="a113"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-str">'GEL'&nbsp;</span>=&gt;&nbsp;<a href="http://www.php.net/_">_</a><span class="src-sym">(</span><span class="src-str">'Georgian&nbsp;Lari'</span><span class="src-sym">)</span><span class="src-sym">,</span></div></li>
<li><div class="src-line"><a name="a114"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-str">'GHC'&nbsp;</span>=&gt;&nbsp;<a href="http://www.php.net/_">_</a><span class="src-sym">(</span><span class="src-str">'Ghana&nbsp;Cedi'</span><span class="src-sym">)</span><span class="src-sym">,</span></div></li>
<li><div class="src-line"><a name="a115"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-str">'GIP'&nbsp;</span>=&gt;&nbsp;<a href="http://www.php.net/_">_</a><span class="src-sym">(</span><span class="src-str">'Gibraltar&nbsp;Pound'</span><span class="src-sym">)</span><span class="src-sym">,</span></div></li>
<li><div class="src-line"><a name="a116"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-str">'GTQ'&nbsp;</span>=&gt;&nbsp;<a href="http://www.php.net/_">_</a><span class="src-sym">(</span><span class="src-str">'Guatemalan&nbsp;Quetzal'</span><span class="src-sym">)</span><span class="src-sym">,</span></div></li>
<li><div class="src-line"><a name="a117"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-str">'GNF'&nbsp;</span>=&gt;&nbsp;<a href="http://www.php.net/_">_</a><span class="src-sym">(</span><span class="src-str">'Guinea&nbsp;Franc'</span><span class="src-sym">)</span><span class="src-sym">,</span></div></li>
<li><div class="src-line"><a name="a118"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-str">'GWP'&nbsp;</span>=&gt;&nbsp;<a href="http://www.php.net/_">_</a><span class="src-sym">(</span><span class="src-str">'Guinea-Bissau&nbsp;Peso'</span><span class="src-sym">)</span><span class="src-sym">,</span></div></li>
<li><div class="src-line"><a name="a119"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-str">'GYD'&nbsp;</span>=&gt;&nbsp;<a href="http://www.php.net/_">_</a><span class="src-sym">(</span><span class="src-str">'Guyana&nbsp;Dollar'</span><span class="src-sym">)</span><span class="src-sym">,</span></div></li>
<li><div class="src-line"><a name="a120"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-str">'HTG'&nbsp;</span>=&gt;&nbsp;<a href="http://www.php.net/_">_</a><span class="src-sym">(</span><span class="src-str">'Haitian&nbsp;Gourde'</span><span class="src-sym">)</span><span class="src-sym">,</span></div></li>
<li><div class="src-line"><a name="a121"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-str">'HNL'&nbsp;</span>=&gt;&nbsp;<a href="http://www.php.net/_">_</a><span class="src-sym">(</span><span class="src-str">'Honduran&nbsp;Lempira'</span><span class="src-sym">)</span><span class="src-sym">,</span></div></li>
<li><div class="src-line"><a name="a122"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-str">'HKD'&nbsp;</span>=&gt;&nbsp;<a href="http://www.php.net/_">_</a><span class="src-sym">(</span><span class="src-str">'Hong&nbsp;Kong&nbsp;Dollar'</span><span class="src-sym">)</span><span class="src-sym">,</span></div></li>
<li><div class="src-line"><a name="a123"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-str">'HUF'&nbsp;</span>=&gt;&nbsp;<a href="http://www.php.net/_">_</a><span class="src-sym">(</span><span class="src-str">'Hungarian&nbsp;Forint'</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-str">'ISK'&nbsp;</span>=&gt;&nbsp;<a href="http://www.php.net/_">_</a><span class="src-sym">(</span><span class="src-str">'Iceland&nbsp;Krona'</span><span class="src-sym">)</span><span class="src-sym">,</span></div></li>
<li><div class="src-line"><a name="a125"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-str">'INR'&nbsp;</span>=&gt;&nbsp;<a href="http://www.php.net/_">_</a><span class="src-sym">(</span><span class="src-str">'Indian&nbsp;Rupee'</span><span class="src-sym">)</span><span class="src-sym">,</span></div></li>
<li><div class="src-line"><a name="a126"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-str">'IDR'&nbsp;</span>=&gt;&nbsp;<a href="http://www.php.net/_">_</a><span class="src-sym">(</span><span class="src-str">'Indonesian&nbsp;Rupiah'</span><span class="src-sym">)</span><span class="src-sym">,</span></div></li>
<li><div class="src-line"><a name="a127"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-str">'IRR'&nbsp;</span>=&gt;&nbsp;<a href="http://www.php.net/_">_</a><span class="src-sym">(</span><span class="src-str">'Iranian&nbsp;Rial'</span><span class="src-sym">)</span><span class="src-sym">,</span></div></li>
<li><div class="src-line"><a name="a128"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-str">'IQD'&nbsp;</span>=&gt;&nbsp;<a href="http://www.php.net/_">_</a><span class="src-sym">(</span><span class="src-str">'Iraqi&nbsp;Dinar'</span><span class="src-sym">)</span><span class="src-sym">,</span></div></li>
<li><div class="src-line"><a name="a129"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-str">'JMD'&nbsp;</span>=&gt;&nbsp;<a href="http://www.php.net/_">_</a><span class="src-sym">(</span><span class="src-str">'Jamaican&nbsp;Dollar'</span><span class="src-sym">)</span><span class="src-sym">,</span></div></li>
<li><div class="src-line"><a name="a130"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-str">'JPY'&nbsp;</span>=&gt;&nbsp;<a href="http://www.php.net/_">_</a><span class="src-sym">(</span><span class="src-str">'Japanese&nbsp;Yen'</span><span class="src-sym">)</span><span class="src-sym">,</span></div></li>
<li><div class="src-line"><a name="a131"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-str">'JOD'&nbsp;</span>=&gt;&nbsp;<a href="http://www.php.net/_">_</a><span class="src-sym">(</span><span class="src-str">'Jordanian&nbsp;Dinar'</span><span class="src-sym">)</span><span class="src-sym">,</span></div></li>
<li><div class="src-line"><a name="a132"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-str">'KZT'&nbsp;</span>=&gt;&nbsp;<a href="http://www.php.net/_">_</a><span class="src-sym">(</span><span class="src-str">'Kazakhstan&nbsp;Tenge'</span><span class="src-sym">)</span><span class="src-sym">,</span></div></li>
<li><div class="src-line"><a name="a133"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-str">'KES'&nbsp;</span>=&gt;&nbsp;<a href="http://www.php.net/_">_</a><span class="src-sym">(</span><span class="src-str">'Kenyan&nbsp;Shilling'</span><span class="src-sym">)</span><span class="src-sym">,</span></div></li>
<li><div class="src-line"><a name="a134"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-str">'KWD'&nbsp;</span>=&gt;&nbsp;<a href="http://www.php.net/_">_</a><span class="src-sym">(</span><span class="src-str">'Kuwaiti&nbsp;Dinar'</span><span class="src-sym">)</span><span class="src-sym">,</span></div></li>
<li><div class="src-line"><a name="a135"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-str">'KGS'&nbsp;</span>=&gt;&nbsp;<a href="http://www.php.net/_">_</a><span class="src-sym">(</span><span class="src-str">'Kyrgyzstan&nbsp;Som'</span><span class="src-sym">)</span><span class="src-sym">,</span></div></li>
<li><div class="src-line"><a name="a136"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-str">'LAK'&nbsp;</span>=&gt;&nbsp;<a href="http://www.php.net/_">_</a><span class="src-sym">(</span><span class="src-str">'Lao&nbsp;Kip'</span><span class="src-sym">)</span><span class="src-sym">,</span></div></li>
<li><div class="src-line"><a name="a137"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-str">'LVL'&nbsp;</span>=&gt;&nbsp;<a href="http://www.php.net/_">_</a><span class="src-sym">(</span><span class="src-str">'Latvian&nbsp;Lats'</span><span class="src-sym">)</span><span class="src-sym">,</span></div></li>
<li><div class="src-line"><a name="a138"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-str">'LBP'&nbsp;</span>=&gt;&nbsp;<a href="http://www.php.net/_">_</a><span class="src-sym">(</span><span class="src-str">'Lebanese&nbsp;Pound'</span><span class="src-sym">)</span><span class="src-sym">,</span></div></li>
<li><div class="src-line"><a name="a139"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-str">'LSL'&nbsp;</span>=&gt;&nbsp;<a href="http://www.php.net/_">_</a><span class="src-sym">(</span><span class="src-str">'Lesotho&nbsp;Loti'</span><span class="src-sym">)</span><span class="src-sym">,</span></div></li>
<li><div class="src-line"><a name="a140"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-str">'LRD'&nbsp;</span>=&gt;&nbsp;<a href="http://www.php.net/_">_</a><span class="src-sym">(</span><span class="src-str">'Liberian&nbsp;Dollar'</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-str">'LYD'&nbsp;</span>=&gt;&nbsp;<a href="http://www.php.net/_">_</a><span class="src-sym">(</span><span class="src-str">'Libyan&nbsp;Dinar'</span><span class="src-sym">)</span><span class="src-sym">,</span></div></li>
<li><div class="src-line"><a name="a142"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-str">'LTL'&nbsp;</span>=&gt;&nbsp;<a href="http://www.php.net/_">_</a><span class="src-sym">(</span><span class="src-str">'Lithuanian&nbsp;Litus'</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-str">'MOP'&nbsp;</span>=&gt;&nbsp;<a href="http://www.php.net/_">_</a><span class="src-sym">(</span><span class="src-str">'Macau&nbsp;Pataca'</span><span class="src-sym">)</span><span class="src-sym">,</span></div></li>
<li><div class="src-line"><a name="a144"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-str">'MKD'&nbsp;</span>=&gt;&nbsp;<a href="http://www.php.net/_">_</a><span class="src-sym">(</span><span class="src-str">'Macedonia&nbsp;Denar'</span><span class="src-sym">)</span><span class="src-sym">,</span></div></li>
<li><div class="src-line"><a name="a145"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-str">'MGF'&nbsp;</span>=&gt;&nbsp;<a href="http://www.php.net/_">_</a><span class="src-sym">(</span><span class="src-str">'Malagasy&nbsp;Franc'</span><span class="src-sym">)</span><span class="src-sym">,</span></div></li>
<li><div class="src-line"><a name="a146"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-str">'MWK'&nbsp;</span>=&gt;&nbsp;<a href="http://www.php.net/_">_</a><span class="src-sym">(</span><span class="src-str">'Malawi&nbsp;Kwacha'</span><span class="src-sym">)</span><span class="src-sym">,</span></div></li>
<li><div class="src-line"><a name="a147"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-str">'MYR'&nbsp;</span>=&gt;&nbsp;<a href="http://www.php.net/_">_</a><span class="src-sym">(</span><span class="src-str">'Malaysian&nbsp;Ringgit'</span><span class="src-sym">)</span><span class="src-sym">,</span></div></li>
<li><div class="src-line"><a name="a148"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-str">'MVR'&nbsp;</span>=&gt;&nbsp;<a href="http://www.php.net/_">_</a><span class="src-sym">(</span><span class="src-str">'Maldives&nbsp;Rufiyaa'</span><span class="src-sym">)</span><span class="src-sym">,</span></div></li>
<li><div class="src-line"><a name="a149"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-str">'MTL'&nbsp;</span>=&gt;&nbsp;<a href="http://www.php.net/_">_</a><span class="src-sym">(</span><span class="src-str">'Maltese&nbsp;Lira'</span><span class="src-sym">)</span><span class="src-sym">,</span></div></li>
<li><div class="src-line"><a name="a150"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-str">'MRO'&nbsp;</span>=&gt;&nbsp;<a href="http://www.php.net/_">_</a><span class="src-sym">(</span><span class="src-str">'Mauritania&nbsp;Ouguiya'</span><span class="src-sym">)</span><span class="src-sym">,</span></div></li>
<li><div class="src-line"><a name="a151"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-str">'MUR'&nbsp;</span>=&gt;&nbsp;<a href="http://www.php.net/_">_</a><span class="src-sym">(</span><span class="src-str">'Mauritius&nbsp;Rupee'</span><span class="src-sym">)</span><span class="src-sym">,</span></div></li>
<li><div class="src-line"><a name="a152"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-str">'MXN'&nbsp;</span>=&gt;&nbsp;<a href="http://www.php.net/_">_</a><span class="src-sym">(</span><span class="src-str">'Mexican&nbsp;Peso'</span><span class="src-sym">)</span><span class="src-sym">,</span></div></li>
<li><div class="src-line"><a name="a153"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-str">'MXV'&nbsp;</span>=&gt;&nbsp;<a href="http://www.php.net/_">_</a><span class="src-sym">(</span><span class="src-str">'Mexican&nbsp;Unidad&nbsp;de&nbsp;Inversion'</span><span class="src-sym">)</span><span class="src-sym">,</span></div></li>
<li><div class="src-line"><a name="a154"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-str">'MZM'&nbsp;</span>=&gt;&nbsp;<a href="http://www.php.net/_">_</a><span class="src-sym">(</span><span class="src-str">'Moazambique&nbsp;Metical'</span><span class="src-sym">)</span><span class="src-sym">,</span></div></li>
<li><div class="src-line"><a name="a155"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-str">'MDL'&nbsp;</span>=&gt;&nbsp;<a href="http://www.php.net/_">_</a><span class="src-sym">(</span><span class="src-str">'Moldovan&nbsp;Leu'</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-str">'MNT'&nbsp;</span>=&gt;&nbsp;<a href="http://www.php.net/_">_</a><span class="src-sym">(</span><span class="src-str">'Mongolian&nbsp;Tugrik'</span><span class="src-sym">)</span><span class="src-sym">,</span></div></li>
<li><div class="src-line"><a name="a157"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-str">'MAD'&nbsp;</span>=&gt;&nbsp;<a href="http://www.php.net/_">_</a><span class="src-sym">(</span><span class="src-str">'Moroccan&nbsp;Dirham'</span><span class="src-sym">)</span><span class="src-sym">,</span></div></li>
<li><div class="src-line"><a name="a158"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-str">'MMK'&nbsp;</span>=&gt;&nbsp;<a href="http://www.php.net/_">_</a><span class="src-sym">(</span><span class="src-str">'Myanmar&nbsp;Kyat'</span><span class="src-sym">)</span><span class="src-sym">,</span></div></li>
<li><div class="src-line"><a name="a159"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-str">'NAD'&nbsp;</span>=&gt;&nbsp;<a href="http://www.php.net/_">_</a><span class="src-sym">(</span><span class="src-str">'Namibia&nbsp;Dollar'</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;<span class="src-str">'NPR'&nbsp;</span>=&gt;&nbsp;<a href="http://www.php.net/_">_</a><span class="src-sym">(</span><span class="src-str">'Nepalese&nbsp;Rupee'</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;<span class="src-str">'ANG'&nbsp;</span>=&gt;&nbsp;<a href="http://www.php.net/_">_</a><span class="src-sym">(</span><span class="src-str">'Netherlands&nbsp;Antillian&nbsp;Guilder'</span><span class="src-sym">)</span><span class="src-sym">,</span></div></li>
<li><div class="src-line"><a name="a162"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-str">'ILS'&nbsp;</span>=&gt;&nbsp;<a href="http://www.php.net/_">_</a><span class="src-sym">(</span><span class="src-str">'New&nbsp;Israeli&nbsp;Shekel'</span><span class="src-sym">)</span><span class="src-sym">,</span></div></li>
<li><div class="src-line"><a name="a163"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-str">'TWD'&nbsp;</span>=&gt;&nbsp;<a href="http://www.php.net/_">_</a><span class="src-sym">(</span><span class="src-str">'New&nbsp;Taiwan&nbsp;Dollar'</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;<span class="src-str">'NZD'&nbsp;</span>=&gt;&nbsp;<a href="http://www.php.net/_">_</a><span class="src-sym">(</span><span class="src-str">'New&nbsp;Zealand&nbsp;Dollar'</span><span class="src-sym">)</span><span class="src-sym">,</span></div></li>
<li><div class="src-line"><a name="a165"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-str">'NIO'&nbsp;</span>=&gt;&nbsp;<a href="http://www.php.net/_">_</a><span class="src-sym">(</span><span class="src-str">'Nicaraguan&nbsp;Cordoba&nbsp;Oro'</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;<span class="src-str">'NGN'&nbsp;</span>=&gt;&nbsp;<a href="http://www.php.net/_">_</a><span class="src-sym">(</span><span class="src-str">'Nigerian&nbsp;Naira'</span><span class="src-sym">)</span><span class="src-sym">,</span></div></li>
<li><div class="src-line"><a name="a167"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-str">'KPW'&nbsp;</span>=&gt;&nbsp;<a href="http://www.php.net/_">_</a><span class="src-sym">(</span><span class="src-str">'North&nbsp;Korean&nbsp;Won'</span><span class="src-sym">)</span><span class="src-sym">,</span></div></li>
<li><div class="src-line"><a name="a168"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-str">'NOK'&nbsp;</span>=&gt;&nbsp;<a href="http://www.php.net/_">_</a><span class="src-sym">(</span><span class="src-str">'Norwegian&nbsp;Krone'</span><span class="src-sym">)</span><span class="src-sym">,</span></div></li>
<li><div class="src-line"><a name="a169"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-str">'PKR'&nbsp;</span>=&gt;&nbsp;<a href="http://www.php.net/_">_</a><span class="src-sym">(</span><span class="src-str">'Pakistan&nbsp;Rupee'</span><span class="src-sym">)</span><span class="src-sym">,</span></div></li>
<li><div class="src-line"><a name="a170"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-str">'PAB'&nbsp;</span>=&gt;&nbsp;<a href="http://www.php.net/_">_</a><span class="src-sym">(</span><span class="src-str">'Panama&nbsp;Balboa'</span><span class="src-sym">)</span><span class="src-sym">,</span></div></li>
<li><div class="src-line"><a name="a171"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-str">'PGK'&nbsp;</span>=&gt;&nbsp;<a href="http://www.php.net/_">_</a><span class="src-sym">(</span><span class="src-str">'Papua&nbsp;New&nbsp;Guinea&nbsp;Kina'</span><span class="src-sym">)</span><span class="src-sym">,</span></div></li>
<li><div class="src-line"><a name="a172"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-str">'PYG'&nbsp;</span>=&gt;&nbsp;<a href="http://www.php.net/_">_</a><span class="src-sym">(</span><span class="src-str">'Paraguay&nbsp;Guarani'</span><span class="src-sym">)</span><span class="src-sym">,</span></div></li>
<li><div class="src-line"><a name="a173"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-str">'PEN'&nbsp;</span>=&gt;&nbsp;<a href="http://www.php.net/_">_</a><span class="src-sym">(</span><span class="src-str">'Peruvian&nbsp;Nuevo&nbsp;Sol'</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-str">'UYU'&nbsp;</span>=&gt;&nbsp;<a href="http://www.php.net/_">_</a><span class="src-sym">(</span><span class="src-str">'Peso&nbsp;Uruguayo'</span><span class="src-sym">)</span><span class="src-sym">,</span></div></li>
<li><div class="src-line"><a name="a175"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-str">'PHP'&nbsp;</span>=&gt;&nbsp;<a href="http://www.php.net/_">_</a><span class="src-sym">(</span><span class="src-str">'Philippine&nbsp;peso'</span><span class="src-sym">)</span><span class="src-sym">,</span></div></li>
<li><div class="src-line"><a name="a176"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-str">'PLN'&nbsp;</span>=&gt;&nbsp;<a href="http://www.php.net/_">_</a><span class="src-sym">(</span><span class="src-str">'Polish&nbsp;Zloty'</span><span class="src-sym">)</span><span class="src-sym">,</span></div></li>
<li><div class="src-line"><a name="a177"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-str">'GBP'&nbsp;</span>=&gt;&nbsp;<a href="http://www.php.net/_">_</a><span class="src-sym">(</span><span class="src-str">'Pound&nbsp;Sterling'</span><span class="src-sym">)</span><span class="src-sym">,</span></div></li>
<li><div class="src-line"><a name="a178"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-str">'QAR'&nbsp;</span>=&gt;&nbsp;<a href="http://www.php.net/_">_</a><span class="src-sym">(</span><span class="src-str">'Qatari&nbsp;Rial'</span><span class="src-sym">)</span><span class="src-sym">,</span></div></li>
<li><div class="src-line"><a name="a179"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-str">'OMR'&nbsp;</span>=&gt;&nbsp;<a href="http://www.php.net/_">_</a><span class="src-sym">(</span><span class="src-str">'Rial&nbsp;Omani'</span><span class="src-sym">)</span><span class="src-sym">,</span></div></li>
<li><div class="src-line"><a name="a180"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-str">'ROL'&nbsp;</span>=&gt;&nbsp;<a href="http://www.php.net/_">_</a><span class="src-sym">(</span><span class="src-str">'Romanian&nbsp;Leu'</span><span class="src-sym">)</span><span class="src-sym">,</span></div></li>
<li><div class="src-line"><a name="a181"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-str">'RUR'&nbsp;</span>=&gt;&nbsp;<a href="http://www.php.net/_">_</a><span class="src-sym">(</span><span class="src-str">'Russian&nbsp;Ruble'</span><span class="src-sym">)</span><span class="src-sym">,</span></div></li>
<li><div class="src-line"><a name="a182"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-str">'RUB'&nbsp;</span>=&gt;&nbsp;<a href="http://www.php.net/_">_</a><span class="src-sym">(</span><span class="src-str">'Russian&nbsp;Ruble'</span><span class="src-sym">)</span><span class="src-sym">,</span></div></li>
<li><div class="src-line"><a name="a183"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-str">'RWF'&nbsp;</span>=&gt;&nbsp;<a href="http://www.php.net/_">_</a><span class="src-sym">(</span><span class="src-str">'Rwanda&nbsp;Franc'</span><span class="src-sym">)</span><span class="src-sym">,</span></div></li>
<li><div class="src-line"><a name="a184"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-str">'SHP'&nbsp;</span>=&gt;&nbsp;<a href="http://www.php.net/_">_</a><span class="src-sym">(</span><span class="src-str">'Saint&nbsp;Helena&nbsp;Pound'</span><span class="src-sym">)</span><span class="src-sym">,</span></div></li>
<li><div class="src-line"><a name="a185"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-str">'WST'&nbsp;</span>=&gt;&nbsp;<a href="http://www.php.net/_">_</a><span class="src-sym">(</span><span class="src-str">'Samoa&nbsp;Tala'</span><span class="src-sym">)</span><span class="src-sym">,</span></div></li>
<li><div class="src-line"><a name="a186"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-str">'SAR'&nbsp;</span>=&gt;&nbsp;<a href="http://www.php.net/_">_</a><span class="src-sym">(</span><span class="src-str">'Saudi&nbsp;Riyal'</span><span class="src-sym">)</span><span class="src-sym">,</span></div></li>
<li><div class="src-line"><a name="a187"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-str">'CSD'&nbsp;</span>=&gt;&nbsp;<a href="http://www.php.net/_">_</a><span class="src-sym">(</span><span class="src-str">'Serbian&nbsp;Dinar'</span><span class="src-sym">)</span><span class="src-sym">,</span></div></li>
<li><div class="src-line"><a name="a188"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-str">'SCR'&nbsp;</span>=&gt;&nbsp;<a href="http://www.php.net/_">_</a><span class="src-sym">(</span><span class="src-str">'Seychelles&nbsp;Rupee'</span><span class="src-sym">)</span><span class="src-sym">,</span></div></li>
<li><div class="src-line"><a name="a189"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-str">'SLL'&nbsp;</span>=&gt;&nbsp;<a href="http://www.php.net/_">_</a><span class="src-sym">(</span><span class="src-str">'Sierra&nbsp;Leonean&nbsp;Leone'</span><span class="src-sym">)</span><span class="src-sym">,</span></div></li>
<li><div class="src-line"><a name="a190"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-str">'SGD'&nbsp;</span>=&gt;&nbsp;<a href="http://www.php.net/_">_</a><span class="src-sym">(</span><span class="src-str">'Singapore&nbsp;Dollar'</span><span class="src-sym">)</span><span class="src-sym">,</span></div></li>
<li><div class="src-line"><a name="a191"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-str">'SKK'&nbsp;</span>=&gt;&nbsp;<a href="http://www.php.net/_">_</a><span class="src-sym">(</span><span class="src-str">'Slovak&nbsp;Koruna'</span><span class="src-sym">)</span><span class="src-sym">,</span></div></li>
<li><div class="src-line"><a name="a192"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-str">'SIT'&nbsp;</span>=&gt;&nbsp;<a href="http://www.php.net/_">_</a><span class="src-sym">(</span><span class="src-str">'Slovene&nbsp;Tolar'</span><span class="src-sym">)</span><span class="src-sym">,</span></div></li>
<li><div class="src-line"><a name="a193"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-str">'STD'&nbsp;</span>=&gt;&nbsp;<a href="http://www.php.net/_">_</a><span class="src-sym">(</span><span class="src-str">'So&nbsp;Tom&nbsp;and&nbsp;Principe&nbsp;Dobra'</span><span class="src-sym">)</span><span class="src-sym">,</span></div></li>
<li><div class="src-line"><a name="a194"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-str">'SBD'&nbsp;</span>=&gt;&nbsp;<a href="http://www.php.net/_">_</a><span class="src-sym">(</span><span class="src-str">'Solomon&nbsp;Islands&nbsp;Dollar'</span><span class="src-sym">)</span><span class="src-sym">,</span></div></li>
<li><div class="src-line"><a name="a195"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-str">'SOS'&nbsp;</span>=&gt;&nbsp;<a href="http://www.php.net/_">_</a><span class="src-sym">(</span><span class="src-str">'Somali&nbsp;Shilling'</span><span class="src-sym">)</span><span class="src-sym">,</span></div></li>
<li><div class="src-line"><a name="a196"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-str">'ZAR'&nbsp;</span>=&gt;&nbsp;<a href="http://www.php.net/_">_</a><span class="src-sym">(</span><span class="src-str">'South&nbsp;African&nbsp;Rand'</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-str">'KRW'&nbsp;</span>=&gt;&nbsp;<a href="http://www.php.net/_">_</a><span class="src-sym">(</span><span class="src-str">'South&nbsp;Korean&nbsp;Won'</span><span class="src-sym">)</span><span class="src-sym">,</span></div></li>
<li><div class="src-line"><a name="a198"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-str">'LKR'&nbsp;</span>=&gt;&nbsp;<a href="http://www.php.net/_">_</a><span class="src-sym">(</span><span class="src-str">'Sri&nbsp;Lanka&nbsp;Rupee'</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-str">'SDD'&nbsp;</span>=&gt;&nbsp;<a href="http://www.php.net/_">_</a><span class="src-sym">(</span><span class="src-str">'Sudanese&nbsp;Dinar'</span><span class="src-sym">)</span><span class="src-sym">,</span></div></li>
<li><div class="src-line"><a name="a200"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-str">'SRG'&nbsp;</span>=&gt;&nbsp;<a href="http://www.php.net/_">_</a><span class="src-sym">(</span><span class="src-str">'Suriname&nbsp;Guilder'</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-str">'SZL'&nbsp;</span>=&gt;&nbsp;<a href="http://www.php.net/_">_</a><span class="src-sym">(</span><span class="src-str">'Swaziland&nbsp;Lilangeni'</span><span class="src-sym">)</span><span class="src-sym">,</span></div></li>
<li><div class="src-line"><a name="a202"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-str">'SEK'&nbsp;</span>=&gt;&nbsp;<a href="http://www.php.net/_">_</a><span class="src-sym">(</span><span class="src-str">'Swedish&nbsp;Krona'</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;<span class="src-str">'CHF'&nbsp;</span>=&gt;&nbsp;<a href="http://www.php.net/_">_</a><span class="src-sym">(</span><span class="src-str">'Swiss&nbsp;franc'</span><span class="src-sym">)</span><span class="src-sym">,</span></div></li>
<li><div class="src-line"><a name="a204"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-str">'SYP'&nbsp;</span>=&gt;&nbsp;<a href="http://www.php.net/_">_</a><span class="src-sym">(</span><span class="src-str">'Syrian&nbsp;Pound'</span><span class="src-sym">)</span><span class="src-sym">,</span></div></li>
<li><div class="src-line"><a name="a205"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-str">'TJS'&nbsp;</span>=&gt;&nbsp;<a href="http://www.php.net/_">_</a><span class="src-sym">(</span><span class="src-str">'Tajikistan&nbsp;Somoni'</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;<span class="src-str">'TZS'&nbsp;</span>=&gt;&nbsp;<a href="http://www.php.net/_">_</a><span class="src-sym">(</span><span class="src-str">'Tanzanian&nbsp;Shilling'</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-str">'THB'&nbsp;</span>=&gt;&nbsp;<a href="http://www.php.net/_">_</a><span class="src-sym">(</span><span class="src-str">'Thai&nbsp;Baht'</span><span class="src-sym">)</span><span class="src-sym">,</span></div></li>
<li><div class="src-line"><a name="a208"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-str">'TPE'&nbsp;</span>=&gt;&nbsp;<a href="http://www.php.net/_">_</a><span class="src-sym">(</span><span class="src-str">'Timor&nbsp;Escudo'</span><span class="src-sym">)</span><span class="src-sym">,</span></div></li>
<li><div class="src-line"><a name="a209"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-str">'TOP'&nbsp;</span>=&gt;&nbsp;<a href="http://www.php.net/_">_</a><span class="src-sym">(</span><span class="src-str">&quot;Tongan&nbsp;Pa'anga&quot;</span><span class="src-sym">)</span><span class="src-sym">,</span></div></li>
<li><div class="src-line"><a name="a210"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-str">'TTD'&nbsp;</span>=&gt;&nbsp;<a href="http://www.php.net/_">_</a><span class="src-sym">(</span><span class="src-str">'Trinidad&nbsp;and&nbsp;Tobago&nbsp;Dollar'</span><span class="src-sym">)</span><span class="src-sym">,</span></div></li>
<li><div class="src-line"><a name="a211"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-str">'TND'&nbsp;</span>=&gt;&nbsp;<a href="http://www.php.net/_">_</a><span class="src-sym">(</span><span class="src-str">'Tunisian&nbsp;Dinar'</span><span class="src-sym">)</span><span class="src-sym">,</span></div></li>
<li><div class="src-line"><a name="a212"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-str">'TRL'&nbsp;</span>=&gt;&nbsp;<a href="http://www.php.net/_">_</a><span class="src-sym">(</span><span class="src-str">'Turkish&nbsp;Lira'</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-str">'TMM'&nbsp;</span>=&gt;&nbsp;<a href="http://www.php.net/_">_</a><span class="src-sym">(</span><span class="src-str">'Turkmenistan&nbsp;Manat'</span><span class="src-sym">)</span><span class="src-sym">,</span></div></li>
<li><div class="src-line"><a name="a214"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-str">'UGX'&nbsp;</span>=&gt;&nbsp;<a href="http://www.php.net/_">_</a><span class="src-sym">(</span><span class="src-str">'Uganda&nbsp;Shilling'</span><span class="src-sym">)</span><span class="src-sym">,</span></div></li>
<li><div class="src-line"><a name="a215"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-str">'UAH'&nbsp;</span>=&gt;&nbsp;<a href="http://www.php.net/_">_</a><span class="src-sym">(</span><span class="src-str">'Ukrainian&nbsp;Hryvnia'</span><span class="src-sym">)</span><span class="src-sym">,</span></div></li>
<li><div class="src-line"><a name="a216"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-str">'AED'&nbsp;</span>=&gt;&nbsp;<a href="http://www.php.net/_">_</a><span class="src-sym">(</span><span class="src-str">'United&nbsp;Arab&nbsp;Emirates&nbsp;dirham'</span><span class="src-sym">)</span><span class="src-sym">,</span></div></li>
<li><div class="src-line"><a name="a217"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-str">'USD'&nbsp;</span>=&gt;&nbsp;<a href="http://www.php.net/_">_</a><span class="src-sym">(</span><span class="src-str">'United&nbsp;States&nbsp;Dollar'</span><span class="src-sym">)</span><span class="src-sym">,</span></div></li>
<li><div class="src-line"><a name="a218"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-str">'UZS'&nbsp;</span>=&gt;&nbsp;<a href="http://www.php.net/_">_</a><span class="src-sym">(</span><span class="src-str">'Uzbekistan&nbsp;Sum'</span><span class="src-sym">)</span><span class="src-sym">,</span></div></li>
<li><div class="src-line"><a name="a219"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-str">'VUV'&nbsp;</span>=&gt;&nbsp;<a href="http://www.php.net/_">_</a><span class="src-sym">(</span><span class="src-str">'Vanuatu&nbsp;Vatu'</span><span class="src-sym">)</span><span class="src-sym">,</span></div></li>
<li><div class="src-line"><a name="a220"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-str">'VEB'&nbsp;</span>=&gt;&nbsp;<a href="http://www.php.net/_">_</a><span class="src-sym">(</span><span class="src-str">'Venezuelan&nbsp;Bolivar'</span><span class="src-sym">)</span><span class="src-sym">,</span></div></li>
<li><div class="src-line"><a name="a221"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-str">'VND'&nbsp;</span>=&gt;&nbsp;<a href="http://www.php.net/_">_</a><span class="src-sym">(</span><span class="src-str">'Viet&nbsp;Nam&nbsp;Dong'</span><span class="src-sym">)</span><span class="src-sym">,</span></div></li>
<li><div class="src-line"><a name="a222"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-str">'YER'&nbsp;</span>=&gt;&nbsp;<a href="http://www.php.net/_">_</a><span class="src-sym">(</span><span class="src-str">'Yemeni&nbsp;Rial'</span><span class="src-sym">)</span><span class="src-sym">,</span></div></li>
<li><div class="src-line"><a name="a223"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-str">'CNY'&nbsp;</span>=&gt;&nbsp;<a href="http://www.php.net/_">_</a><span class="src-sym">(</span><span class="src-str">'Yuan&nbsp;Renminbi'</span><span class="src-sym">)</span><span class="src-sym">,</span></div></li>
<li><div class="src-line"><a name="a224"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-str">'ZMK'&nbsp;</span>=&gt;&nbsp;<a href="http://www.php.net/_">_</a><span class="src-sym">(</span><span class="src-str">'Zambian&nbsp;Kwacha'</span><span class="src-sym">)</span><span class="src-sym">,</span></div></li>
<li><div class="src-line"><a name="a225"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-str">'ZWD'&nbsp;</span>=&gt;&nbsp;<a href="http://www.php.net/_">_</a><span class="src-sym">(</span><span class="src-str">'Zimbabwe&nbsp;Dollar'</span><span class="src-sym">))</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a226"></a>&nbsp;&nbsp;<span class="src-sym">}</span></div></li>
<li><div class="src-line"><a name="a227"></a>&nbsp;</div></li>
<li><div class="src-line"><a name="a228"></a>&nbsp;&nbsp;<span class="src-comm">//&nbsp;-----------------------------</span></div></li>
<li><div class="src-line"><a name="a229"></a>&nbsp;&nbsp;<span class="src-comm">//&nbsp;Constructor</span></div></li>
<li><div class="src-line"><a name="a230"></a>&nbsp;&nbsp;<span class="src-comm">//&nbsp;-----------------------------</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;Creates&nbsp;a&nbsp;new&nbsp;Account.&nbsp;The&nbsp;method&nbsp;does&nbsp;NOT&nbsp;add&nbsp;the&nbsp;account&nbsp;in&nbsp;the</span></div></li>
<li><div class="src-line"><a name="a234"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;database&nbsp;as&nbsp;long&nbsp;as&nbsp;the&nbsp;store()&nbsp;method&nbsp;is&nbsp;not&nbsp;called.&nbsp;If&nbsp;the</span></div></li>
<li><div class="src-line"><a name="a235"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;account&nbsp;has&nbsp;been&nbsp;already&nbsp;stored&nbsp;in&nbsp;the&nbsp;database,&nbsp;the&nbsp;account&nbsp;id</span></div></li>
<li><div class="src-line"><a name="a236"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;must&nbsp;be&nbsp;given.&nbsp;Otherwise&nbsp;the&nbsp;id&nbsp;will&nbsp;be&nbsp;set&nbsp;when&nbsp;the&nbsp;account&nbsp;will</span></div></li>
<li><div class="src-line"><a name="a237"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;be&nbsp;saved.</span></div></li>
<li><div class="src-line"><a name="a238"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*</span></div></li>
<li><div class="src-line"><a name="a239"></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="a240"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;&nbsp;containing:&nbsp;owner&nbsp;object,&nbsp;name,&nbsp;bank_name,&nbsp;currency_code,</span></div></li>
<li><div class="src-line"><a name="a241"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;&nbsp;comment,&nbsp;is_opened).</span></div></li>
<li><div class="src-line"><a name="a242"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;</span><span class="src-doc-coretag">@param&nbsp;</span><span class="src-doc-type">int&nbsp;</span><span class="src-doc-var">$account_id&nbsp;</span><span class="src-doc">optional&nbsp;account&nbsp;id.</span></div></li>
<li><div class="src-line"><a name="a243"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;</span><span class="src-doc-tag">@exception</span><span class="src-doc">&nbsp;IllegalArgumentException</span></div></li>
<li><div class="src-line"><a name="a244"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;</span><span class="src-doc-tag">@exception</span><span class="src-doc">&nbsp;AccountException&nbsp;if&nbsp;the&nbsp;account&nbsp;data&nbsp;are&nbsp;not&nbsp;valid&nbsp;or</span></div></li>
<li><div class="src-line"><a name="a245"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;&nbsp;if&nbsp;this&nbsp;account&nbsp;name&nbsp;already&nbsp;exists&nbsp;in&nbsp;this&nbsp;bank&nbsp;in&nbsp;the&nbsp;database.</span></div></li>
<li><div class="src-line"><a name="a246"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*/</span></div></li>
<li><div class="src-line"><a name="a247"></a>&nbsp;&nbsp;<span class="src-key">public&nbsp;</span><span class="src-key">function&nbsp;</span><a href="../swam/Account.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">$account_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="a248"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../swam/Account.html#methodset_id">set_id</a><span class="src-sym">(</span><span class="src-var">$account_id</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a249"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../swam/Account.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="a250"></a>&nbsp;&nbsp;<span class="src-sym">}</span></div></li>
<li><div class="src-line"><a name="a251"></a>&nbsp;</div></li>
<li><div class="src-line"><a name="a252"></a>&nbsp;&nbsp;<span class="src-comm">//&nbsp;-----------------------------</span></div></li>
<li><div class="src-line"><a name="a253"></a>&nbsp;&nbsp;<span class="src-comm">//&nbsp;Instance&nbsp;methods</span></div></li>
<li><div class="src-line"><a name="a254"></a>&nbsp;&nbsp;<span class="src-comm">//&nbsp;-----------------------------</span></div></li>
<li><div class="src-line"><a name="a255"></a>&nbsp;</div></li>
<li><div class="src-line"><a name="a256"></a>&nbsp;&nbsp;<span class="src-doc">/**</span></div></li>
<li><div class="src-line"><a name="a257"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;Throws&nbsp;a&nbsp;PermissionDeniedException&nbsp;if&nbsp;this&nbsp;user&nbsp;is&nbsp;not&nbsp;allowed&nbsp;to</span></div></li>
<li><div class="src-line"><a name="a258"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;edit&nbsp;accounts.</span></div></li>
<li><div class="src-line"><a name="a259"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*</span></div></li>
<li><div class="src-line"><a name="a260"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;</span><span class="src-doc-tag">@exception</span><span class="src-doc">&nbsp;PermissionDeniedException</span></div></li>
<li><div class="src-line"><a name="a261"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*/</span></div></li>
<li><div class="src-line"><a name="a262"></a>&nbsp;&nbsp;<span class="src-key">private&nbsp;</span><span class="src-key">function&nbsp;</span><span class="src-id">check_permissions</span><span class="src-sym">(</span><span class="src-var">$user</span><span class="src-sym">)&nbsp;</span><span class="src-sym">{</span></div></li>
<li><div class="src-line"><a name="a263"></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-var">$user</span><span class="src-sym">-&gt;</span><span class="src-id">is_allowed_to_edit_accounts</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="a264"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-var">$message&nbsp;</span>=&nbsp;<span class="src-sym">(</span><span class="src-var">$user</span><span class="src-sym">-&gt;</span><span class="src-id">is_guest_user</span><span class="src-sym">(</span><span class="src-sym">)&nbsp;</span>?&nbsp;<a href="http://www.php.net/_">_</a><span class="src-sym">(</span><span class="src-str">'Sorry,&nbsp;this&nbsp;action&nbsp;is&nbsp;not&nbsp;authorized&nbsp;for&nbsp;the&nbsp;guest&nbsp;user.'</span><span class="src-sym">)&nbsp;</span>:&nbsp;<span class="src-id">null</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a265"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;throw&nbsp;<span class="src-key">new&nbsp;</span><span class="src-id"><a href="../swam/PermissionDeniedException.html">PermissionDeniedException</a></span><span class="src-sym">(</span><span class="src-var">$message</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a266"></a>&nbsp;&nbsp;&nbsp;&nbsp;<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;Sets&nbsp;the&nbsp;account&nbsp;id.&nbsp;If&nbsp;the&nbsp;account&nbsp;has&nbsp;not&nbsp;been&nbsp;saved&nbsp;into&nbsp;the</span></div></li>
<li><div class="src-line"><a name="a271"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;database,&nbsp;the&nbsp;id&nbsp;is&nbsp;set&nbsp;to&nbsp;-1.</span></div></li>
<li><div class="src-line"><a name="a272"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*</span></div></li>
<li><div class="src-line"><a name="a273"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;</span><span class="src-doc-coretag">@param&nbsp;</span><span class="src-doc-type">int&nbsp;</span><span class="src-doc-var">$id&nbsp;</span></div></li>
<li><div class="src-line"><a name="a274"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;</span><span class="src-doc-tag">@exception</span><span class="src-doc">&nbsp;IllegalArgumentException</span></div></li>
<li><div class="src-line"><a name="a275"></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="a276"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*/</span></div></li>
<li><div class="src-line"><a name="a277"></a>&nbsp;&nbsp;<span class="src-key">protected&nbsp;</span><span class="src-key">function&nbsp;</span><a href="../swam/Account.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="a278"></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_account_id">check_account_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="a279"></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="a280"></a>&nbsp;&nbsp;<span class="src-sym">}</span></div></li>
<li><div class="src-line"><a name="a281"></a>&nbsp;</div></li>
<li><div class="src-line"><a name="a282"></a>&nbsp;&nbsp;<span class="src-doc">/**</span></div></li>
<li><div class="src-line"><a name="a283"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;</span><span class="src-doc-coretag">@see</span><span class="src-doc">&nbsp;IAccount::set_owner($owner)</span></div></li>
<li><div class="src-line"><a name="a284"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*/</span></div></li>
<li><div class="src-line"><a name="a285"></a>&nbsp;&nbsp;<span class="src-key">public&nbsp;</span><span class="src-key">function&nbsp;</span><a href="../swam/Account.html#methodset_owner">set_owner</a><span class="src-sym">(</span><span class="src-var">$owner</span><span class="src-sym">)&nbsp;</span><span class="src-sym">{</span></div></li>
<li><div class="src-line"><a name="a286"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-key">if&nbsp;</span><span class="src-sym">(</span><span class="src-var">$owner&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="a287"></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;owner.'</span><span class="src-sym">))</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a288"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-sym">}</span></div></li>
<li><div class="src-line"><a name="a289"></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">'owner'</span><span class="src-sym">]&nbsp;</span>=&nbsp;<span class="src-var">$owner</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;IAccount::get_owner()</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/Account.html#methodget_owner">get_owner</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;<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">'owner'</span><span class="src-sym">]</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a297"></a>&nbsp;&nbsp;<span class="src-sym">}</span></div></li>
<li><div class="src-line"><a name="a298"></a>&nbsp;</div></li>
<li><div class="src-line"><a name="a299"></a>&nbsp;&nbsp;<span class="src-doc">/**</span></div></li>
<li><div class="src-line"><a name="a300"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;</span><span class="src-doc-coretag">@see</span><span class="src-doc">&nbsp;IAccount::set_name($name)</span></div></li>
<li><div class="src-line"><a name="a301"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*/</span></div></li>
<li><div class="src-line"><a name="a302"></a>&nbsp;&nbsp;<span class="src-key">public&nbsp;</span><span class="src-key">function&nbsp;</span><a href="../swam/Account.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="a303"></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="a304"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;throw&nbsp;<span class="src-key">new&nbsp;</span><span class="src-id"><a href="../swam/AccountException.html">AccountException</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;account.'</span><span class="src-sym">))</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a305"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-sym">}</span></div></li>
<li><div class="src-line"><a name="a306"></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;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="a307"></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="a308"></a>&nbsp;&nbsp;<span class="src-sym">}</span></div></li>
<li><div class="src-line"><a name="a309"></a>&nbsp;</div></li>
<li><div class="src-line"><a name="a310"></a>&nbsp;&nbsp;<span class="src-doc">/**</span></div></li>
<li><div class="src-line"><a name="a311"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;</span><span class="src-doc-coretag">@see</span><span class="src-doc">&nbsp;IAccount::get_name()</span></div></li>
<li><div class="src-line"><a name="a312"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*/</span></div></li>
<li><div class="src-line"><a name="a313"></a>&nbsp;&nbsp;<span class="src-key">public&nbsp;</span><span class="src-key">function&nbsp;</span><a href="../swam/Account.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="a314"></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="a315"></a>&nbsp;&nbsp;<span class="src-sym">}</span></div></li>
<li><div class="src-line"><a name="a316"></a>&nbsp;</div></li>
<li><div class="src-line"><a name="a317"></a>&nbsp;&nbsp;<span class="src-doc">/**</span></div></li>
<li><div class="src-line"><a name="a318"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;</span><span class="src-doc-coretag">@see</span><span class="src-doc">&nbsp;IAccount::set_bank_name($bank_name)</span></div></li>
<li><div class="src-line"><a name="a319"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*/</span></div></li>
<li><div class="src-line"><a name="a320"></a>&nbsp;&nbsp;<span class="src-key">public&nbsp;</span><span class="src-key">function&nbsp;</span><a href="../swam/Account.html#methodset_bank_name">set_bank_name</a><span class="src-sym">(</span><span class="src-var">$bank_name</span><span class="src-sym">)&nbsp;</span><span class="src-sym">{</span></div></li>
<li><div class="src-line"><a name="a321"></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">$bank_name</span><span class="src-sym">))&nbsp;</span><span class="src-sym">{</span></div></li>
<li><div class="src-line"><a name="a322"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;throw&nbsp;<span class="src-key">new&nbsp;</span><span class="src-id"><a href="../swam/AccountException.html">AccountException</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;bank.'</span><span class="src-sym">))</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a323"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-sym">}</span></div></li>
<li><div class="src-line"><a name="a324"></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">$bank_name</span><span class="src-sym">,&nbsp;</span><span class="src-id">self</span><span class="src-sym">::</span><span class="src-id">BANK_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;bank&nbsp;name&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="a325"></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">'bank_name'</span><span class="src-sym">]&nbsp;</span>=&nbsp;<span class="src-var">$bank_name</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a326"></a>&nbsp;&nbsp;<span class="src-sym">}</span></div></li>
<li><div class="src-line"><a name="a327"></a>&nbsp;</div></li>
<li><div class="src-line"><a name="a328"></a>&nbsp;&nbsp;<span class="src-doc">/**</span></div></li>
<li><div class="src-line"><a name="a329"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;</span><span class="src-doc-coretag">@see</span><span class="src-doc">&nbsp;IAccount::get_bank_name()</span></div></li>
<li><div class="src-line"><a name="a330"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*/</span></div></li>
<li><div class="src-line"><a name="a331"></a>&nbsp;&nbsp;<span class="src-key">public&nbsp;</span><span class="src-key">function&nbsp;</span><a href="../swam/Account.html#methodget_bank_name">get_bank_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="a332"></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">'bank_name'</span><span class="src-sym">]</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a333"></a>&nbsp;&nbsp;<span class="src-sym">}</span></div></li>
<li><div class="src-line"><a name="a334"></a>&nbsp;</div></li>
<li><div class="src-line"><a name="a335"></a>&nbsp;&nbsp;<span class="src-doc">/**</span></div></li>
<li><div class="src-line"><a name="a336"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;</span><span class="src-doc-coretag">@see</span><span class="src-doc">&nbsp;IAccount::set_currency_code($currency_code)</span></div></li>
<li><div class="src-line"><a name="a337"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*/</span></div></li>
<li><div class="src-line"><a name="a338"></a>&nbsp;&nbsp;<span class="src-key">public&nbsp;</span><span class="src-key">function&nbsp;</span><a href="../swam/Account.html#methodset_currency_code">set_currency_code</a><span class="src-sym">(</span><span class="src-var">$currency_code</span><span class="src-sym">)&nbsp;</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-key">empty</span><span class="src-sym">(</span><span class="src-var">$currency_code</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/AccountException.html">AccountException</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;choose&nbsp;the&nbsp;currency.'</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">$currencies&nbsp;</span>=&nbsp;<span class="src-id">self</span><span class="src-sym">::</span><span class="src-id">get_currencies</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="a343"></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">$currencies</span><span class="src-sym">[</span><span class="src-var">$currency_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="a344"></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><span class="src-id">safe_printf</span><span class="src-sym">(</span><a href="http://www.php.net/_">_</a><span class="src-sym">(</span><span class="src-str">'Invalid&nbsp;currency:&nbsp;%s.'</span><span class="src-sym">)</span><span class="src-sym">,&nbsp;</span><span class="src-var">$currency_code</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-sym">}</span></div></li>
<li><div class="src-line"><a name="a346"></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">'currency_code'</span><span class="src-sym">]&nbsp;</span>=&nbsp;<span class="src-var">$currency_code</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a347"></a>&nbsp;&nbsp;<span class="src-sym">}</span></div></li>
<li><div class="src-line"><a name="a348"></a>&nbsp;</div></li>
<li><div class="src-line"><a name="a349"></a>&nbsp;&nbsp;<span class="src-doc">/**</span></div></li>
<li><div class="src-line"><a name="a350"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;</span><span class="src-doc-coretag">@see</span><span class="src-doc">&nbsp;IAccount::get_currency_code()</span></div></li>
<li><div class="src-line"><a name="a351"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*/</span></div></li>
<li><div class="src-line"><a name="a352"></a>&nbsp;&nbsp;<span class="src-key">public&nbsp;</span><span class="src-key">function&nbsp;</span><a href="../swam/Account.html#methodget_currency_code">get_currency_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="a353"></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">'currency_code'</span><span class="src-sym">]</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a354"></a>&nbsp;&nbsp;<span class="src-sym">}</span></div></li>
<li><div class="src-line"><a name="a355"></a>&nbsp;</div></li>
<li><div class="src-line"><a name="a356"></a>&nbsp;&nbsp;<span class="src-doc">/**</span></div></li>
<li><div class="src-line"><a name="a357"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;</span><span class="src-doc-coretag">@see</span><span class="src-doc">&nbsp;IAccount::get_currency()</span></div></li>
<li><div class="src-line"><a name="a358"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*/</span></div></li>
<li><div class="src-line"><a name="a359"></a>&nbsp;&nbsp;<span class="src-key">public&nbsp;</span><span class="src-key">function&nbsp;</span><a href="../swam/Account.html#methodget_currency">get_currency</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="a360"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-key">return&nbsp;</span><span class="src-id">I18n</span><span class="src-sym">::</span><span class="src-id">translate</span><span class="src-sym">(</span><span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../swam/Account.html#methodget_currency_code">get_currency_code</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="a361"></a>&nbsp;&nbsp;<span class="src-sym">}</span></div></li>
<li><div class="src-line"><a name="a362"></a>&nbsp;</div></li>
<li><div class="src-line"><a name="a363"></a>&nbsp;&nbsp;<span class="src-doc">/**</span></div></li>
<li><div class="src-line"><a name="a364"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;</span><span class="src-doc-coretag">@see</span><span class="src-doc">&nbsp;IAccount::set_comment($comment)</span></div></li>
<li><div class="src-line"><a name="a365"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*/</span></div></li>
<li><div class="src-line"><a name="a366"></a>&nbsp;&nbsp;<span class="src-key">public&nbsp;</span><span class="src-key">function&nbsp;</span><a href="../swam/Account.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="a367"></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;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="a368"></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="a369"></a>&nbsp;&nbsp;<span class="src-sym">}</span></div></li>
<li><div class="src-line"><a name="a370"></a>&nbsp;</div></li>
<li><div class="src-line"><a name="a371"></a>&nbsp;&nbsp;<span class="src-doc">/**</span></div></li>
<li><div class="src-line"><a name="a372"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;</span><span class="src-doc-coretag">@see</span><span class="src-doc">&nbsp;IAccount::get_comment()</span></div></li>
<li><div class="src-line"><a name="a373"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*/</span></div></li>
<li><div class="src-line"><a name="a374"></a>&nbsp;&nbsp;<span class="src-key">public&nbsp;</span><span class="src-key">function&nbsp;</span><a href="../swam/Account.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="a375"></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="a376"></a>&nbsp;&nbsp;<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;<span class="src-doc">/**</span></div></li>
<li><div class="src-line"><a name="a379"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;</span><span class="src-doc-coretag">@see</span><span class="src-doc">&nbsp;IAccount::set_is_opened($is_opened)</span></div></li>
<li><div class="src-line"><a name="a380"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*/</span></div></li>
<li><div class="src-line"><a name="a381"></a>&nbsp;&nbsp;<span class="src-key">public&nbsp;</span><span class="src-key">function&nbsp;</span><a href="../swam/Account.html#methodset_is_opened">set_is_opened</a><span class="src-sym">(</span><span class="src-var">$is_opened</span><span class="src-sym">)&nbsp;</span><span class="src-sym">{</span></div></li>
<li><div class="src-line"><a name="a382"></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_opened</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="a383"></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_opened'</span><span class="src-sym">]&nbsp;</span>=&nbsp;<span class="src-var">$is_opened</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a384"></a>&nbsp;&nbsp;<span class="src-sym">}</span></div></li>
<li><div class="src-line"><a name="a385"></a>&nbsp;</div></li>
<li><div class="src-line"><a name="a386"></a>&nbsp;&nbsp;<span class="src-doc">/**</span></div></li>
<li><div class="src-line"><a name="a387"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;</span><span class="src-doc-coretag">@see</span><span class="src-doc">&nbsp;IAccount::is_opened()</span></div></li>
<li><div class="src-line"><a name="a388"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*/</span></div></li>
<li><div class="src-line"><a name="a389"></a>&nbsp;&nbsp;<span class="src-key">public&nbsp;</span><span class="src-key">function&nbsp;</span><a href="../swam/Account.html#methodis_opened">is_opened</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="a390"></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_opened'</span><span class="src-sym">]</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a391"></a>&nbsp;&nbsp;<span class="src-sym">}</span></div></li>
<li><div class="src-line"><a name="a392"></a>&nbsp;</div></li>
<li><div class="src-line"><a name="a393"></a>&nbsp;&nbsp;<span class="src-doc">/**</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;IAccount::set_data($data)</span></div></li>
<li><div class="src-line"><a name="a395"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;</span><span class="src-doc-tag">@exception</span><span class="src-doc">&nbsp;PDOException</span></div></li>
<li><div class="src-line"><a name="a396"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*/</span></div></li>
<li><div class="src-line"><a name="a397"></a>&nbsp;&nbsp;<span class="src-key">public&nbsp;</span><span class="src-key">function&nbsp;</span><a href="../swam/Account.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="a398"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-var">$owner&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">'owner'</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a399"></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="a400"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-var">$bank_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">'bank_name'</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a401"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-var">$currency_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">'currency_code'</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;<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="a403"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-var">$is_opened&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_opened'</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;<span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../swam/Account.html#methodset_owner">set_owner</a><span class="src-sym">(</span><span class="src-var">$owner</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-var">$this</span><span class="src-sym">-&gt;</span><a href="../swam/Account.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="a406"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../swam/Account.html#methodset_bank_name">set_bank_name</a><span class="src-sym">(</span><span class="src-var">$bank_name</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a407"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../swam/Account.html#methodset_currency_code">set_currency_code</a><span class="src-sym">(</span><span class="src-var">$currency_code</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a408"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../swam/Account.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="a409"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../swam/Account.html#methodset_is_opened">set_is_opened</a><span class="src-sym">(</span><span class="src-var">$is_opened</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a410"></a>&nbsp;</div></li>
<li><div class="src-line"><a name="a411"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-comm">//&nbsp;Check&nbsp;if&nbsp;this&nbsp;account&nbsp;name&nbsp;is&nbsp;already&nbsp;registered&nbsp;in&nbsp;this&nbsp;bank&nbsp;name</span></div></li>
<li><div class="src-line"><a name="a412"></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="a413"></a>&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">'SELECT&nbsp;account_id&nbsp;FROM&nbsp;t_account&nbsp;WHERE&nbsp;name=?&nbsp;AND&nbsp;bank_name=?'</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a414"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-var">$rs&nbsp;</span>=&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/Account.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/Account.html#methodget_bank_name">get_bank_name</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="a415"></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">$rs</span><span class="src-sym">[</span><span class="src-str">'account_id'</span><span class="src-sym">]</span><span class="src-sym">)&nbsp;</span>&amp;&amp;&nbsp;<span class="src-sym">(</span><span class="src-var">$rs</span><span class="src-sym">[</span><span class="src-str">'account_id'</span><span class="src-sym">]&nbsp;</span>!=&nbsp;<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><span class="src-sym">{</span></div></li>
<li><div class="src-line"><a name="a416"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;throw&nbsp;<span class="src-key">new&nbsp;</span><span class="src-id"><a href="../swam/AccountException.html">AccountException</a></span><span class="src-sym">(</span><a href="http://www.php.net/_">_</a><span class="src-sym">(</span><span class="src-str">'Account&nbsp;name&nbsp;already&nbsp;exists&nbsp;in&nbsp;this&nbsp;bank.'</span><span class="src-sym">))</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a417"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-sym">}</span></div></li>
<li><div class="src-line"><a name="a418"></a>&nbsp;&nbsp;<span class="src-sym">}</span></div></li>
<li><div class="src-line"><a name="a419"></a>&nbsp;</div></li>
<li><div class="src-line"><a name="a420"></a>&nbsp;&nbsp;<span class="src-doc">/**</span></div></li>
<li><div class="src-line"><a name="a421"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;</span><span class="src-doc-coretag">@see</span><span class="src-doc">&nbsp;IAccount::get_virtual_balance()</span></div></li>
<li><div class="src-line"><a name="a422"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;</span><span class="src-doc-tag">@exception</span><span class="src-doc">&nbsp;PDOException</span></div></li>
<li><div class="src-line"><a name="a423"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*/</span></div></li>
<li><div class="src-line"><a name="a424"></a>&nbsp;&nbsp;<span class="src-key">public&nbsp;</span><span class="src-key">function&nbsp;</span><a href="../swam/Account.html#methodget_virtual_balance">get_virtual_balance</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="a425"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-key">return&nbsp;</span><span class="src-id">self</span><span class="src-sym">::</span><span class="src-id">get_balance</span><span class="src-sym">(</span><span class="src-num">0</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a426"></a>&nbsp;&nbsp;<span class="src-sym">}</span></div></li>
<li><div class="src-line"><a name="a427"></a>&nbsp;</div></li>
<li><div class="src-line"><a name="a428"></a>&nbsp;&nbsp;<span class="src-doc">/**</span></div></li>
<li><div class="src-line"><a name="a429"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;</span><span class="src-doc-coretag">@see</span><span class="src-doc">&nbsp;IAccount::get_real_balance()</span></div></li>
<li><div class="src-line"><a name="a430"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;</span><span class="src-doc-tag">@exception</span><span class="src-doc">&nbsp;PDOException</span></div></li>
<li><div class="src-line"><a name="a431"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*/</span></div></li>
<li><div class="src-line"><a name="a432"></a>&nbsp;&nbsp;<span class="src-key">public&nbsp;</span><span class="src-key">function&nbsp;</span><a href="../swam/Account.html#methodget_real_balance">get_real_balance</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="a433"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-key">return&nbsp;</span><span class="src-id">self</span><span class="src-sym">::</span><span class="src-id">get_balance</span><span class="src-sym">(</span><span class="src-num">1</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a434"></a>&nbsp;&nbsp;<span class="src-sym">}</span></div></li>
<li><div class="src-line"><a name="a435"></a>&nbsp;</div></li>
<li><div class="src-line"><a name="a436"></a>&nbsp;&nbsp;<span class="src-key">private&nbsp;</span><span class="src-key">function&nbsp;</span><span class="src-id">get_balance</span><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="a437"></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="a438"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-var">$sql&nbsp;</span>=&nbsp;<span class="src-str">'SELECT&nbsp;amount,&nbsp;is_debit&nbsp;FROM&nbsp;t_transaction&nbsp;WHERE&nbsp;account_id=?'</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a439"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-key">if&nbsp;</span><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="a440"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-var">$sql&nbsp;</span>.=&nbsp;<span class="src-str">'&nbsp;AND&nbsp;is_valid=1'</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a441"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-sym">}</span></div></li>
<li><div class="src-line"><a name="a442"></a>&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-var">$sql</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a443"></a>&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="a444"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-var">$balance&nbsp;</span>=&nbsp;<span class="src-num">0</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a445"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-key">while&nbsp;</span><span class="src-sym">(</span><span class="src-var">$transaction&nbsp;</span>=&nbsp;<span class="src-var">$sth</span><span class="src-sym">-&gt;</span><span class="src-id">fetchObject</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="a446"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-key">if&nbsp;</span><span class="src-sym">(</span><span class="src-var">$transaction</span><span class="src-sym">-&gt;</span><span class="src-id">is_debit</span><span class="src-sym">)&nbsp;</span><span class="src-sym">{</span></div></li>
<li><div class="src-line"><a name="a447"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-var">$balance&nbsp;</span>-=&nbsp;<span class="src-var">$transaction</span><span class="src-sym">-&gt;</span><span class="src-id">amount</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a448"></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="a449"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-var">$balance&nbsp;</span>+=&nbsp;<span class="src-var">$transaction</span><span class="src-sym">-&gt;</span><span class="src-id">amount</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a450"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-sym">}</span></div></li>
<li><div class="src-line"><a name="a451"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-sym">}</span></div></li>
<li><div class="src-line"><a name="a452"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-key">return&nbsp;</span><span class="src-var">$balance</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a453"></a>&nbsp;&nbsp;<span class="src-sym">}</span></div></li>
<li><div class="src-line"><a name="a454"></a>&nbsp;</div></li>
<li><div class="src-line"><a name="a455"></a>&nbsp;&nbsp;<span class="src-doc">/**</span></div></li>
<li><div class="src-line"><a name="a456"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;</span><span class="src-doc-coretag">@see</span><span class="src-doc">&nbsp;IAccount::get_transactions()</span></div></li>
<li><div class="src-line"><a name="a457"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;</span><span class="src-doc-tag">@exception</span><span class="src-doc">&nbsp;PDOException</span></div></li>
<li><div class="src-line"><a name="a458"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*/</span></div></li>
<li><div class="src-line"><a name="a459"></a>&nbsp;&nbsp;<span class="src-key">public&nbsp;</span><span class="src-key">function&nbsp;</span><a href="../swam/Account.html#methodget_transactions">get_transactions</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="a460"></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="a461"></a>&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">'SELECT&nbsp;transaction_id,&nbsp;name,&nbsp;LOWER(name)&nbsp;as&nbsp;lower_name,&nbsp;account_id,&nbsp;amount,&nbsp;is_debit,&nbsp;mean_of_payment_code,&nbsp;date,&nbsp;comment,&nbsp;is_valid&nbsp;FROM&nbsp;t_transaction&nbsp;WHERE&nbsp;account_id=?&nbsp;ORDER&nbsp;BY&nbsp;date,&nbsp;lower_name'</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a462"></a>&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="a463"></a>&nbsp;</div></li>
<li><div class="src-line"><a name="a464"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-var">$transactions&nbsp;</span>=&nbsp;<span class="src-key">array</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="a465"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-key">while&nbsp;</span><span class="src-sym">(</span><span class="src-var">$data&nbsp;</span>=&nbsp;<span class="src-var">$sth</span><span class="src-sym">-&gt;</span><span class="src-id">fetch</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="a466"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<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">$this</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a467"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-var">$transaction&nbsp;</span>=&nbsp;<span class="src-key">new&nbsp;</span><span class="src-id"><a href="../swam/Transaction.html">Transaction</a></span><span class="src-sym">(</span><span class="src-var">$data</span><span class="src-sym">,&nbsp;</span><span class="src-var">$data</span><span class="src-sym">[</span><span class="src-str">'transaction_id'</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="a468"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-var">$transactions</span><span class="src-sym">[</span><span class="src-sym">]&nbsp;</span>=&nbsp;<span class="src-var">$transaction</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a469"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-sym">}</span></div></li>
<li><div class="src-line"><a name="a470"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-key">return&nbsp;</span><span class="src-var">$transactions</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a471"></a>&nbsp;&nbsp;<span class="src-sym">}</span></div></li>
<li><div class="src-line"><a name="a472"></a>&nbsp;</div></li>
<li><div class="src-line"><a name="a473"></a>&nbsp;&nbsp;<span class="src-doc">/**</span></div></li>
<li><div class="src-line"><a name="a474"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;</span><span class="src-doc-coretag">@see</span><span class="src-doc">&nbsp;IAccount::get_transactions_of_month($year,&nbsp;$month)</span></div></li>
<li><div class="src-line"><a name="a475"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;</span><span class="src-doc-tag">@exception</span><span class="src-doc">&nbsp;PDOException</span></div></li>
<li><div class="src-line"><a name="a476"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*/</span></div></li>
<li><div class="src-line"><a name="a477"></a>&nbsp;&nbsp;<span class="src-key">public&nbsp;</span><span class="src-key">function&nbsp;</span><a href="../swam/Account.html#methodget_transactions_of_month">get_transactions_of_month</a><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-sym">{</span></div></li>
<li><div class="src-line"><a name="a478"></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="a479"></a>&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">'SELECT&nbsp;transaction_id,&nbsp;name,&nbsp;LOWER(name)&nbsp;as&nbsp;lower_name,&nbsp;account_id,&nbsp;amount,&nbsp;is_debit,&nbsp;mean_of_payment_code,&nbsp;date,&nbsp;comment,&nbsp;is_valid&nbsp;FROM&nbsp;t_transaction&nbsp;WHERE&nbsp;account_id=?&nbsp;AND&nbsp;date&nbsp;BETWEEN&nbsp;?&nbsp;AND&nbsp;?&nbsp;ORDER&nbsp;BY&nbsp;date,&nbsp;lower_name'</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a480"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-var">$from&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">'-01'</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a481"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-var">$to&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">'-31'</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a482"></a>&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">$from</span><span class="src-sym">,&nbsp;</span><span class="src-var">$to</span><span class="src-sym">))</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a483"></a>&nbsp;</div></li>
<li><div class="src-line"><a name="a484"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-var">$transactions&nbsp;</span>=&nbsp;<span class="src-key">array</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="a485"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-key">while&nbsp;</span><span class="src-sym">(</span><span class="src-var">$data&nbsp;</span>=&nbsp;<span class="src-var">$sth</span><span class="src-sym">-&gt;</span><span class="src-id">fetch</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="a486"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<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">$this</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a487"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-var">$transaction&nbsp;</span>=&nbsp;<span class="src-key">new&nbsp;</span><span class="src-id"><a href="../swam/Transaction.html">Transaction</a></span><span class="src-sym">(</span><span class="src-var">$data</span><span class="src-sym">,&nbsp;</span><span class="src-var">$data</span><span class="src-sym">[</span><span class="src-str">'transaction_id'</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="a488"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-var">$transactions</span><span class="src-sym">[</span><span class="src-sym">]&nbsp;</span>=&nbsp;<span class="src-var">$transaction</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a489"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-sym">}</span></div></li>
<li><div class="src-line"><a name="a490"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-key">return&nbsp;</span><span class="src-var">$transactions</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a491"></a>&nbsp;&nbsp;<span class="src-sym">}</span></div></li>
<li><div class="src-line"><a name="a492"></a>&nbsp;</div></li>
<li><div class="src-line"><a name="a493"></a>&nbsp;&nbsp;<span class="src-doc">/**</span></div></li>
<li><div class="src-line"><a name="a494"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;</span><span class="src-doc-coretag">@see</span><span class="src-doc">&nbsp;IAccount::get_pending_transactions()</span></div></li>
<li><div class="src-line"><a name="a495"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;</span><span class="src-doc-tag">@exception</span><span class="src-doc">&nbsp;PDOException</span></div></li>
<li><div class="src-line"><a name="a496"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*/</span></div></li>
<li><div class="src-line"><a name="a497"></a>&nbsp;&nbsp;<span class="src-key">public&nbsp;</span><span class="src-key">function&nbsp;</span><a href="../swam/Account.html#methodget_pending_transactions">get_pending_transactions</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="a498"></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="a499"></a>&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">'SELECT&nbsp;*&nbsp;FROM&nbsp;t_transaction&nbsp;WHERE&nbsp;account_id=?&nbsp;AND&nbsp;is_valid=0&nbsp;ORDER&nbsp;BY&nbsp;date'</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a500"></a>&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="a501"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-var">$transactions&nbsp;</span>=&nbsp;<span class="src-key">array</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="a502"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-key">while&nbsp;</span><span class="src-sym">(</span><span class="src-var">$data&nbsp;</span>=&nbsp;<span class="src-var">$sth</span><span class="src-sym">-&gt;</span><span class="src-id">fetch</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="a503"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<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">$this</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a504"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-var">$transactions</span><span class="src-sym">[</span><span class="src-sym">]&nbsp;</span>=&nbsp;<span class="src-key">new&nbsp;</span><span class="src-id"><a href="../swam/Transaction.html">Transaction</a></span><span class="src-sym">(</span><span class="src-var">$data</span><span class="src-sym">,&nbsp;</span><span class="src-var">$data</span><span class="src-sym">[</span><span class="src-str">'transaction_id'</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="a505"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-sym">}</span></div></li>
<li><div class="src-line"><a name="a506"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-key">return&nbsp;</span><span class="src-var">$transactions</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a507"></a>&nbsp;&nbsp;<span class="src-sym">}</span></div></li>
<li><div class="src-line"><a name="a508"></a>&nbsp;</div></li>
<li><div class="src-line"><a name="a509"></a>&nbsp;&nbsp;<span class="src-doc">/**</span></div></li>
<li><div class="src-line"><a name="a510"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;</span><span class="src-doc-coretag">@see</span><span class="src-doc">&nbsp;IAccount::get_transaction_templates()</span></div></li>
<li><div class="src-line"><a name="a511"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;</span><span class="src-doc-tag">@exception</span><span class="src-doc">&nbsp;PDOException</span></div></li>
<li><div class="src-line"><a name="a512"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*/</span></div></li>
<li><div class="src-line"><a name="a513"></a>&nbsp;&nbsp;<span class="src-key">public&nbsp;</span><span class="src-key">function&nbsp;</span><a href="../swam/Account.html#methodget_transaction_templates">get_transaction_templates</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="a514"></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="a515"></a>&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">'SELECT&nbsp;transaction_template_id,&nbsp;name,&nbsp;LOWER(name)&nbsp;as&nbsp;lower_name,&nbsp;account_id,&nbsp;amount,&nbsp;is_debit,&nbsp;mean_of_payment_code,&nbsp;date,&nbsp;comment,&nbsp;is_valid&nbsp;FROM&nbsp;t_transaction_template&nbsp;WHERE&nbsp;account_id=?&nbsp;ORDER&nbsp;BY&nbsp;date,&nbsp;lower_name'</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a516"></a>&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="a517"></a>&nbsp;</div></li>
<li><div class="src-line"><a name="a518"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-var">$transaction_templates&nbsp;</span>=&nbsp;<span class="src-key">array</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="a519"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-key">while&nbsp;</span><span class="src-sym">(</span><span class="src-var">$data&nbsp;</span>=&nbsp;<span class="src-var">$sth</span><span class="src-sym">-&gt;</span><span class="src-id">fetch</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="a520"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<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">$this</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a521"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-var">$transaction_template&nbsp;</span>=&nbsp;<span class="src-key">new&nbsp;</span><span class="src-id"><a href="../swam/TransactionTemplate.html">TransactionTemplate</a></span><span class="src-sym">(</span><span class="src-var">$data</span><span class="src-sym">,&nbsp;</span><span class="src-var">$data</span><span class="src-sym">[</span><span class="src-str">'transaction_template_id'</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="a522"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-var">$transaction_templates</span><span class="src-sym">[</span><span class="src-sym">]&nbsp;</span>=&nbsp;<span class="src-var">$transaction_template</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a523"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-sym">}</span></div></li>
<li><div class="src-line"><a name="a524"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-key">return&nbsp;</span><span class="src-var">$transaction_templates</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a525"></a>&nbsp;&nbsp;<span class="src-sym">}</span></div></li>
<li><div class="src-line"><a name="a526"></a>&nbsp;</div></li>
<li><div class="src-line"><a name="a527"></a>&nbsp;&nbsp;<span class="src-doc">/**</span></div></li>
<li><div class="src-line"><a name="a528"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;</span><span class="src-doc-coretag">@see</span><span class="src-doc">&nbsp;IAccount::belongs_to()</span></div></li>
<li><div class="src-line"><a name="a529"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*/</span></div></li>
<li><div class="src-line"><a name="a530"></a>&nbsp;&nbsp;<span class="src-key">public&nbsp;</span><span class="src-key">function&nbsp;</span><a href="../swam/Account.html#methodbelongs_to">belongs_to</a><span class="src-sym">(</span><span class="src-var">$user</span><span class="src-sym">)&nbsp;</span><span class="src-sym">{</span></div></li>
<li><div class="src-line"><a name="a531"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-key">if&nbsp;</span><span class="src-sym">(</span><span class="src-var">$user&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="a532"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;throw&nbsp;<span class="src-key">new&nbsp;</span><span class="src-id"><a href="../swam/AccountException.html">AccountException</a></span><span class="src-sym">(</span><a href="http://www.php.net/_">_</a><span class="src-sym">(</span><span class="src-str">'Invalid&nbsp;null&nbsp;user.'</span><span class="src-sym">))</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a533"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-sym">}</span></div></li>
<li><div class="src-line"><a name="a534"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-key">return&nbsp;</span><span class="src-sym">(</span><span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../swam/Account.html#methodget_owner">get_owner</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">)&nbsp;</span>==&nbsp;<span class="src-var">$user</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">;</span></div></li>
<li><div class="src-line"><a name="a535"></a>&nbsp;&nbsp;<span class="src-sym">}</span></div></li>
<li><div class="src-line"><a name="a536"></a>&nbsp;</div></li>
<li><div class="src-line"><a name="a537"></a>&nbsp;&nbsp;<span class="src-doc">/**</span></div></li>
<li><div class="src-line"><a name="a538"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;</span><span class="src-doc-tag">@exception</span><span class="src-doc">&nbsp;PermissionDeniedException&nbsp;if&nbsp;the&nbsp;owner&nbsp;of&nbsp;this</span></div></li>
<li><div class="src-line"><a name="a539"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;&nbsp;account&nbsp;is&nbsp;not&nbsp;allowed&nbsp;to&nbsp;edit&nbsp;accounts&nbsp;(case&nbsp;of&nbsp;the&nbsp;guest&nbsp;user,</span></div></li>
<li><div class="src-line"><a name="a540"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;&nbsp;login:&nbsp;SWAM_GUEST_USER_LOGIN).</span></div></li>
<li><div class="src-line"><a name="a541"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*</span></div></li>
<li><div class="src-line"><a name="a542"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;&nbsp;TODO:&nbsp;when&nbsp;the&nbsp;account&nbsp;already&nbsp;exits&nbsp;in&nbsp;the&nbsp;database,&nbsp;should&nbsp;we</span></div></li>
<li><div class="src-line"><a name="a543"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;&nbsp;use&nbsp;transaction&nbsp;to&nbsp;prevent&nbsp;another&nbsp;thread&nbsp;to&nbsp;close&nbsp;the&nbsp;account</span></div></li>
<li><div class="src-line"><a name="a544"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;&nbsp;just&nbsp;before&nbsp;the&nbsp;transaction&nbsp;is&nbsp;saved?&nbsp;(default&nbsp;transaction</span></div></li>
<li><div class="src-line"><a name="a545"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;&nbsp;isolation&nbsp;of&nbsp;sqlite&nbsp;is&nbsp;serializable,&nbsp;providing&nbsp;the&nbsp;strictest</span></div></li>
<li><div class="src-line"><a name="a546"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;&nbsp;transaction&nbsp;isolation&nbsp;by&nbsp;emulating&nbsp;serial&nbsp;transaction&nbsp;execution,</span></div></li>
<li><div class="src-line"><a name="a547"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;&nbsp;as&nbsp;if&nbsp;transactions&nbsp;had&nbsp;been&nbsp;executed&nbsp;one&nbsp;after&nbsp;another).</span></div></li>
<li><div class="src-line"><a name="a548"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*</span></div></li>
<li><div class="src-line"><a name="a549"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;</span><span class="src-doc-tag">@exception</span><span class="src-doc">&nbsp;AccountException</span></div></li>
<li><div class="src-line"><a name="a550"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;</span><span class="src-doc-tag">@exception</span><span class="src-doc">&nbsp;PDOException</span></div></li>
<li><div class="src-line"><a name="a551"></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="a552"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*/</span></div></li>
<li><div class="src-line"><a name="a553"></a>&nbsp;&nbsp;<span class="src-key">public&nbsp;</span><span class="src-key">function&nbsp;</span><a href="../swam/Account.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="a554"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-id">self</span><span class="src-sym">::</span><span class="src-id">check_permissions</span><span class="src-sym">(</span><span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../swam/Account.html#methodget_owner">get_owner</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="a555"></a>&nbsp;</div></li>
<li><div class="src-line"><a name="a556"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-comm">//&nbsp;An&nbsp;account&nbsp;cannot&nbsp;be&nbsp;closed&nbsp;if&nbsp;all&nbsp;transactions&nbsp;have&nbsp;not&nbsp;been&nbsp;validated</span></div></li>
<li><div class="src-line"><a name="a557"></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-var">$this</span><span class="src-sym">-&gt;</span><a href="../swam/Account.html#methodis_opened">is_opened</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="a558"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-var">$transactions&nbsp;</span>=&nbsp;<span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../swam/Account.html#methodget_transactions">get_transactions</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="a559"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-key">while&nbsp;</span><span class="src-sym">(</span><span class="src-var">$transaction&nbsp;</span>=&nbsp;<a href="http://www.php.net/current">current</a><span class="src-sym">(</span><span class="src-var">$transactions</span><span class="src-sym">))&nbsp;</span><span class="src-sym">{</span></div></li>
<li><div class="src-line"><a name="a560"></a>&nbsp;&nbsp;&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">$transaction</span><span class="src-sym">-&gt;</span><span class="src-id">is_valid</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="a561"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;throw&nbsp;<span class="src-key">new&nbsp;</span><span class="src-id"><a href="../swam/AccountException.html">AccountException</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;close&nbsp;account&nbsp;because&nbsp;all&nbsp;transactions&nbsp;have&nbsp;not&nbsp;been&nbsp;validated.'</span><span class="src-sym">))</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a562"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-sym">}</span></div></li>
<li><div class="src-line"><a name="a563"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href="http://www.php.net/next">next</a><span class="src-sym">(</span><span class="src-var">$transactions</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a564"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-sym">}</span></div></li>
<li><div class="src-line"><a name="a565"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-sym">}</span></div></li>
<li><div class="src-line"><a name="a566"></a>&nbsp;</div></li>
<li><div class="src-line"><a name="a567"></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="a568"></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="a569"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-comm">//&nbsp;Account&nbsp;does&nbsp;not&nbsp;exist&nbsp;in&nbsp;the&nbsp;database</span></div></li>
<li><div class="src-line"><a name="a570"></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_account(owner_id,&nbsp;name,&nbsp;bank_name,&nbsp;currency_code,&nbsp;comment,&nbsp;is_opened)&nbsp;VALUES&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="a571"></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&nbsp;</span><span class="src-sym">(</span><span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../swam/Account.html#methodget_owner">get_owner</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/Account.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/Account.html#methodget_bank_name">get_bank_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/Account.html#methodget_currency_code">get_currency_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/Account.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/Account.html#methodis_opened">is_opened</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="a572"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../swam/Account.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="a573"></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;account&nbsp;(user_id:&nbsp;%s,&nbsp;account_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/Account.html#methodget_owner">get_owner</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="a574"></a>&nbsp;</div></li>
<li><div class="src-line"><a name="a575"></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="a576"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-comm">//&nbsp;Account&nbsp;already&nbsp;exits&nbsp;in&nbsp;the&nbsp;database&nbsp;(except&nbsp;in&nbsp;case&nbsp;of</span></div></li>
<li><div class="src-line"><a name="a577"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-comm">//&nbsp;database&nbsp;import).</span></div></li>
<li><div class="src-line"><a name="a578"></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_account(account_id,&nbsp;owner_id,&nbsp;name,&nbsp;bank_name,&nbsp;currency_code,&nbsp;comment,&nbsp;is_opened)&nbsp;VALUES&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="a579"></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/Account.html#methodget_owner">get_owner</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/Account.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/Account.html#methodget_bank_name">get_bank_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/Account.html#methodget_currency_code">get_currency_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/Account.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/Account.html#methodis_opened">is_opened</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="a580"></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;account&nbsp;(user_id:&nbsp;%s,&nbsp;account_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/Account.html#methodget_owner">get_owner</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="a581"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-sym">}</span></div></li>
<li><div class="src-line"><a name="a582"></a>&nbsp;&nbsp;<span class="src-sym">}</span></div></li>
<li><div class="src-line"><a name="a583"></a>&nbsp;</div></li>
<li><div class="src-line"><a name="a584"></a>&nbsp;&nbsp;<span class="src-doc">/**</span></div></li>
<li><div class="src-line"><a name="a585"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;Removes&nbsp;this&nbsp;account&nbsp;from&nbsp;the&nbsp;database.&nbsp;If&nbsp;the&nbsp;transaction&nbsp;has</span></div></li>
<li><div class="src-line"><a name="a586"></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</span></div></li>
<li><div class="src-line"><a name="a587"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;nothing.&nbsp;Transactions&nbsp;of&nbsp;this&nbsp;account&nbsp;will&nbsp;be&nbsp;removed&nbsp;by</span></div></li>
<li><div class="src-line"><a name="a588"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;triggers.</span></div></li>
<li><div class="src-line"><a name="a589"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*</span></div></li>
<li><div class="src-line"><a name="a590"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;</span><span class="src-doc-tag">@exception</span><span class="src-doc">&nbsp;PermissionDeniedException&nbsp;if&nbsp;the&nbsp;owner&nbsp;of&nbsp;this</span></div></li>
<li><div class="src-line"><a name="a591"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;&nbsp;account&nbsp;is&nbsp;not&nbsp;allowed&nbsp;to&nbsp;edit&nbsp;accounts&nbsp;(case&nbsp;of&nbsp;the&nbsp;guest&nbsp;user,</span></div></li>
<li><div class="src-line"><a name="a592"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;&nbsp;login:&nbsp;SWAM_GUEST_USER_LOGIN).</span></div></li>
<li><div class="src-line"><a name="a593"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;</span><span class="src-doc-tag">@exception</span><span class="src-doc">&nbsp;PDOException</span></div></li>
<li><div class="src-line"><a name="a594"></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="a595"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*/</span></div></li>
<li><div class="src-line"><a name="a596"></a>&nbsp;&nbsp;<span class="src-key">public&nbsp;</span><span class="src-key">function&nbsp;</span><a href="../swam/Account.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="a597"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-id">self</span><span class="src-sym">::</span><span class="src-id">check_permissions</span><span class="src-sym">(</span><span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../swam/Account.html#methodget_owner">get_owner</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="a598"></a>&nbsp;</div></li>
<li><div class="src-line"><a name="a599"></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="a600"></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="a601"></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_account&nbsp;WHERE&nbsp;account_id=?'</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a602"></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="a603"></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;account&nbsp;(account_id:&nbsp;%s,&nbsp;user_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/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/Account.html#methodget_owner">get_owner</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">;</span></div></li>
<li><div class="src-line"><a name="a604"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-sym">}</span></div></li>
<li><div class="src-line"><a name="a605"></a>&nbsp;&nbsp;<span class="src-sym">}</span></div></li>
<li><div class="src-line"><a name="a606"></a><span class="src-sym">}</span></div></li>
<li><div class="src-line"><a name="a607"></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:07 +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