public function __construct(Endpoint $endpoint, $index, $isDefault = false) { Assertion::integer($index); Assertion::boolean($isDefault); $this->endpoint = $endpoint; $this->index = $index; $this->isDefault = $isDefault; }
/** * @param int $index * @return TelephoneNumber */ public function get($index) { Assertion::integer($index); if ($index < 0) { throw IndexOutOfBoundsException::tooLow($index, 0); } if ($index > count($this->telephoneNumbers) - 1) { throw IndexOutOfBoundsException::tooHigh($index, count($this->telephoneNumbers) - 1); } return $this->telephoneNumbers[$index]; }
/** * @param int $index * @return NameIdFormat */ public function get($index) { Assertion::integer($index); if ($index < 0) { throw IndexOutOfBoundsException::tooLow($index, 0); } if ($index > count($this->nameIdFormats) - 1) { throw IndexOutOfBoundsException::tooHigh($index, count($this->nameIdFormats) - 1); } return $this->nameIdFormats[$index]; }
/** * @param int $index * @return OrganizationDisplayName */ public function get($index) { Assertion::integer($index); if ($index < 0) { throw IndexOutOfBoundsException::tooLow($index, 0); } if ($index > count($this->organizationDisplayNames) - 1) { throw IndexOutOfBoundsException::tooHigh($index, count($this->organizationDisplayNames) - 1); } return $this->organizationDisplayNames[$index]; }