<?php
 namespace App\ImportedOrder\PopulateEntity; class Corporate extends GeneralAbstract { protected $importedEntity; protected $importedEntityClass = '\App\ImportedOrder\Corporate'; protected $populatingEntityClass = '\Entity\Corporate'; public function populate() { if ($this->importedEntity->nameLocal!==null) { $this->populatingEntity->alias = htmlClean(mb_strtoupper($this->importedEntity->nameLocal)); $this->populatingEntity->companyLocal = htmlClean(mb_strtoupper($this->importedEntity->nameLocal)); } if ($this->importedEntity->nameStandard!==null) { $this->populatingEntity->alias = htmlClean(mb_strtoupper($this->importedEntity->nameStandard)); $this->populatingEntity->companyStandard = htmlClean(mb_strtoupper($this->importedEntity->nameStandard)); } if ($this->importedEntity->prefixStandard!==null) { $this->populatingEntity->companyPrefixStandard = $this->importedEntity->prefixStandard; } if ($this->importedEntity->suffixStandard!==null) { $this->populatingEntity->companySuffixStandard = $this->importedEntity->suffixStandard; } if ($this->importedEntity->prefixLocal!==null) { $this->populatingEntity->companyPrefixLocal = $this->importedEntity->prefixLocal; } if ($this->importedEntity->suffixLocal!==null) { $this->populatingEntity->companySuffixLocal = $this->importedEntity->suffixLocal; } if ($this->importedEntity->fiscalCode!==null) { $this->populatingEntity->fiscalCode = htmlClean($this->importedEntity->fiscalCode); } if ($this->importedEntity->vatCertificateNumber!==null) { $this->populatingEntity->vatCertificateNumber = htmlClean($this->importedEntity->vatCertificateNumber); if (strlen($this->importedEntity->vatCertificateNumber)) { $this->populatingEntity->vatRegistered = 1; } } if ($this->importedEntity->registryAddress!==null) { $this->populatingEntity->registryAddress = htmlClean($this->importedEntity->registryAddress); } if ($this->importedEntity->email!==null) { $this->populatingEntity->email = $this->importedEntity->email; } if ($this->importedEntity->telephone!==null) { $this->populatingEntity->telephone = htmlClean($this->importedEntity->telephone); } if ($this->importedEntity->remarks!==null) { $this->populatingEntity->remarks = htmlClean($this->importedEntity->remarks); } } } 