public function __construct(SimpleXMLElement $xml) { parent::__construct($xml); if (!in_array($this->getStatus(), $this->inactive)) { $this->setCategory((string) $xml->commercialCategory->attributes()->name); } }
public function __construct(SimpleXMLElement $xml) { parent::__construct($xml); if (!in_array($this->getStatus(), $this->inactive)) { $this->setCategory((string) $xml->businessCategory->name); $this->setAvailable((string) $xml->currentLeaseEndDate); $this->setSaleType((string) $xml->commercialListingType->attributes()->value); $this->setIncome((int) $xml->takings); } }