oxaddress.php

Go to the documentation of this file.
00001 <?php
00002 
00007 class oxAddress extends oxBase
00008 {
00014     protected $_sCoreTbl = 'oxaddress';
00015 
00021     protected $_sClassName = 'oxaddress';
00022 
00028     public function __construct()
00029     {
00030         parent::__construct();
00031         $this->init( 'oxaddress' );
00032     }
00033 
00039     public function __toString()
00040     {
00041         return $this->toString();
00042     }
00043 
00049     public function toString()
00050     {
00051         $sFirstName = $this->oxaddress__oxfname->value;
00052         $sLastName  = $this->oxaddress__oxlname->value;
00053         $sStreet    = $this->oxaddress__oxstreet->value;
00054         $sStreetNr  = $this->oxaddress__oxstreetnr->value;
00055         $sCity      = $this->oxaddress__oxcity->value;
00056 
00057         //format it
00058         $sAddress = "";
00059         if ($sFirstName || $sLastName) {
00060             $sAddress = $sFirstName. ($sFirstName?" ":"") . "$sLastName, ";
00061         }
00062         $sAddress .= "$sStreet $sStreetNr $sCity";
00063 
00064         $sAddress = trim($sAddress);
00065 
00066         return $sAddress;
00067     }
00068 
00074     public function getState()
00075     {
00076         return $this->oxaddress__oxstateid->value;
00077     }
00078 
00079 }

Generated by  doxygen 1.6.2