|
<?php |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
namespace Eluceo\iCal\Property\Event; |
|
|
|
use Eluceo\iCal\Property; |
|
|
|
class Attendees extends Property |
|
{ |
|
|
|
|
|
|
|
protected $attendees = []; |
|
|
|
public function __construct() |
|
{ |
|
$this->name = 'ATTENDEES'; |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
public function add($value, $params = []) |
|
{ |
|
$this->attendees[] = new Property('ATTENDEE', $value, $params); |
|
|
|
return $this; |
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
public function setValue($value) |
|
{ |
|
$this->attendees = $value; |
|
|
|
return $this; |
|
} |
|
|
|
|
|
|
|
|
|
public function getValue() |
|
{ |
|
return $this->attendees; |
|
} |
|
|
|
|
|
|
|
|
|
public function toLines() |
|
{ |
|
$lines = []; |
|
foreach ($this->attendees as $attendee) { |
|
$lines[] = $attendee->toLine(); |
|
} |
|
|
|
return $lines; |
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
public function setParam($name, $value) |
|
{ |
|
throw new \BadMethodCallException('Cannot call setParam on Attendees Property'); |
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
public function getParam($name) |
|
{ |
|
throw new \BadMethodCallException('Cannot call getParam on Attendees Property'); |
|
} |
|
} |
|
|