JeroenDesloovere\VCard\VCard::addCompany PHP Method

addCompany() public method

Add company
public addCompany ( string $company )
$company string
    public function addCompany($company)
    {
        $this->setProperty('company', 'ORG' . $this->getCharsetString(), $company);
        // if filename is empty, add to filename
        if ($this->filename === null) {
            $this->setFilename($company);
        }
        return $this;
    }

Usage Example

 public function testOrganization()
 {
     $vcard = new VCard();
     $vcard->addCompany('Lorem Corp.');
     $parser = new VCardParser($vcard->buildVCard());
     $this->assertEquals($parser->getCardAtIndex(0)->organization, 'Lorem Corp.');
 }
All Usage Examples Of JeroenDesloovere\VCard\VCard::addCompany