JeroenDesloovere\VCard\VCard::addRole PHP Method

addRole() public method

Add role
public addRole ( string $role )
$role string The role for the person.
    public function addRole($role)
    {
        $this->setProperty('role', 'ROLE' . $this->getCharsetString(), $role);
        return $this;
    }

Usage Example

Example #1
0
 /**
  * Test multiple roles
  *
  * @expectedException JeroenDesloovere\VCard\Exception
  */
 public function testMultipleRoles()
 {
     $this->assertEquals($this->vcard, $this->vcard->addRole('1'));
     $this->assertEquals($this->vcard, $this->vcard->addRole('2'));
 }