本文整理汇总了PHP中Company::setWebsite方法的典型用法代码示例。如果您正苦于以下问题:PHP Company::setWebsite方法的具体用法?PHP Company::setWebsite怎么用?PHP Company::setWebsite使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Company
的用法示例。
在下文中一共展示了Company::setWebsite方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: createCompany
/**
* @param int $id
* @param string $name
* @param string $contactname
* @param string $email
* @param string $phonenumber
* @param string $region
* @param string $website
* @param int $status
* @return Company
*/
public static function createCompany($id, $name, $contactname, $email, $phonenumber, $region, $website, $status)
{
$newCompany = new Company();
$newCompany->setId($id);
$newCompany->setName($name);
$newCompany->setContactName($contactname);
$newCompany->setEmail($email);
$newCompany->setPhoneNumber($phonenumber);
$newCompany->setRegion($region);
$newCompany->setWebsite($website);
$newCompany->setStatus($status);
return $newCompany;
}
示例2: mapDtoToCompany
public function mapDtoToCompany(CompanyDto $companyDto)
{
$company = new Company();
$company->setId($companyDto->getId());
$company->setName($companyDto->getName());
$company->setContactName($companyDto->getContactName());
$company->setEmail($companyDto->getEmail());
$company->setPhoneNumber($companyDto->getPhoneNumber());
$company->setRegion($companyDto->getRegion());
$company->setWebsite($companyDto->getWebsite());
$company->setStatus($companyDto->getStatus());
return $company;
}
示例3: Main
function Main()
{
switch ($this->formArray["formAction"]) {
case "edit":
$CompanyDetails = new SoapObject(NCCBIZ . "CompanyDetails.php", "urn:Object");
if (!($xmlStr = $CompanyDetails->getCompanyDetails($this->formArray["companyID"]))) {
$this->tpl->set_block("rptsTemplate", "Table", "TableBlock");
$this->tpl->set_var("TableBlock", "record not found");
} else {
if (!($domDoc = domxml_open_mem($xmlStr))) {
$this->tpl->set_block("rptsTemplate", "Table", "TableBlock");
$this->tpl->set_var("TableBlock", "error xmlDoc");
} else {
$company = new Company();
$company->parseDomDocument($domDoc);
$this->formArray["companyID"] = $company->getCompanyID();
$this->formArray["companyName"] = $company->getCompanyName();
$this->formArray["tin"] = $company->getTin();
$this->formArray["telephone"] = $company->getTelephone();
$this->formArray["fax"] = $company->getFax();
$address = $company->addressArray[0];
if (is_a($address, Address)) {
$this->formArray["addressID"] = $address->getAddressID();
$this->formArray["number"] = $address->getNumber();
$this->formArray["street"] = $address->getStreet();
$this->formArray["barangay"] = $address->getBarangay();
$this->formArray["district"] = $address->getDistrict();
$this->formArray["municipalityCity"] = $address->getMunicipalitycity();
$this->formArray["province"] = $address->getProvince();
}
$this->formArray["email"] = $company->getEmail();
$this->formArray["website"] = $company->getWebsite();
}
}
break;
case "save":
$CompanyEncode = new SoapObject(NCCBIZ . "CompanyEncode.php", "urn:Object");
if ($this->formArray["companyID"] != "") {
$CompanyDetails = new SoapObject(NCCBIZ . "CompanyDetails.php", "urn:Object");
if (!($xmlStr = $CompanyDetails->getCompanyDetails($this->formArray["companyID"]))) {
$this->tpl->set_block("rptsTemplate", "Table", "TableBlock");
$this->tpl->set_var("TableBlock", "record not found");
} else {
if (!($domDoc = domxml_open_mem($xmlStr))) {
$this->tpl->set_block("rptsTemplate", "Table", "TableBlock");
$this->tpl->set_var("TableBlock", "error xmlDoc");
} else {
$company = new Company();
$company->parseDomDocument($domDoc);
$address = $company->addressArray[0];
if (is_a($address, Address)) {
$address->setAddressID($this->formArray["addressID"]);
$address->setNumber($this->formArray["number"]);
$address->setStreet($this->formArray["street"]);
$address->setBarangay($this->formArray["barangay"]);
$address->setDistrict($this->formArray["district"]);
$address->setMunicipalityCity($this->formArray["municipalityCity"]);
$address->setProvince($this->formArray["province"]);
$address->setDomDocument();
}
//$company->selectRecord($this->formArray["companyID"]);
$company->setCompanyID($this->formArray["companyID"]);
$company->setCompanyName($this->formArray["companyName"]);
$company->setTin($this->formArray["tin"]);
$company->setTelephone($this->formArray["telephone"]);
$company->setFax($this->formArray["fax"]);
$company->setAddressArray($address);
$company->setEmail($this->formArray["email"]);
$company->setWebsite($this->formArray["website"]);
$company->setDomDocument();
$doc = $company->getDomDocument();
$xmlStr = $doc->dump_mem(true);
if (!($ret = $CompanyEncode->updateCompany($xmlStr))) {
exit("error update");
}
}
}
} else {
$address = new Address();
$address->setNumber($this->formArray["number"]);
$address->setStreet($this->formArray["street"]);
$address->setBarangay($this->formArray["barangay"]);
$address->setDistrict($this->formArray["district"]);
$address->setMunicipalityCity($this->formArray["municipalityCity"]);
$address->setProvince($this->formArray["province"]);
$address->setDomDocument();
$company = new Company();
$company->setCompanyID($this->formArray["companyID"]);
$company->setCompanyName($this->formArray["companyName"]);
$company->setTelephone($this->formArray["telephone"]);
$company->setFax($this->formArray["fax"]);
$company->setTin($this->formArray["tin"]);
$company->setAddressArray($address);
$company->setEmail($this->formArray["email"]);
$company->setWebsite($this->formArray["website"]);
$company->setDomDocument();
$doc = $company->getDomDocument();
$xmlStr = $doc->dump_mem(true);
if (!($ret = $CompanyEncode->saveCompany($xmlStr, $this->formArray["ownerID"]))) {
exit("error save");
//.........这里部分代码省略.........