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 protected $_blSelected = false;
00029
00035 public function __construct()
00036 {
00037 parent::__construct();
00038 $this->init( 'oxaddress' );
00039 }
00040
00046 public function __toString()
00047 {
00048 return $this->toString();
00049 }
00050
00056 public function toString()
00057 {
00058 $sFirstName = $this->oxaddress__oxfname->value;
00059 $sLastName = $this->oxaddress__oxlname->value;
00060 $sStreet = $this->oxaddress__oxstreet->value;
00061 $sStreetNr = $this->oxaddress__oxstreetnr->value;
00062 $sCity = $this->oxaddress__oxcity->value;
00063
00064
00065 $sAddress = "";
00066 if ($sFirstName || $sLastName) {
00067 $sAddress = $sFirstName. ($sFirstName?" ":"") . "$sLastName, ";
00068 }
00069 $sAddress .= "$sStreet $sStreetNr $sCity";
00070
00071 $sAddress = trim($sAddress);
00072
00073 return $sAddress;
00074 }
00075
00081 public function getState()
00082 {
00083 return $this->oxaddress__oxstateid->value;
00084 }
00085
00091 public function isSelected()
00092 {
00093 return $this->_blSelected;
00094 }
00095
00101 public function setSelected()
00102 {
00103 $this->_blSelected = true;
00104 }
00105 }