CP Product documentation
Documentation for cp product subclass
Have to implements
Inherited from CpProduct class
Methods and properties you can use from main class
Properties
protected int $adultAge = 18; - Definition of age which is considered as adult
protected bool $definedEnd = false; - Definition if end of insurance is defined or not
protected ?int $maxTripLength = null; - Definition of max one trip length in days (0 = without limit)
protected int $seniorAge = 150; - Definition of age which is considered as senior (if not set, there will be no seniors)
Methods
adults(): array
/**
* Get list of people which are only adults
*
* @return Person[]
*/
bikes(): array
/**
* Helper method to get array or all bikes
*
* array of DataObjects:
* ->type
* BICYKEL = štandardný bicykel
* EBICYKEL = elektro bicykel
* KOLOBEZKA = kolobežka
* EKOLOBEZKA = elektrická kolobežka
*
* Keyed with same keys as $this->people() to match people to reinsurance
*
* @return DataObject[]
*/
children(): array
/**
* Get list of people which are only children
*
* @return Person[]
*/
pets(): array
/**
* Helper method to get array or all pets
*
* array of DataObjects:
* ->type (CODELIST_PET_TYPE)
* ->type_other (string)
* ->number (string)
*
* Keyed with same keys as $this->people() to match people to reinsurance
*
* @return DataObject[]
*/
people(): array
/**
* Helper method to get array or all persons from request with additional data
*
* Additional data:
* ->age
* ->isAdult
* ->isChild
* ->isSenior
*
* @return Person[]
*/
seniors(): array
/**
* Get list of people which are only seniors (set $seniorAge)
*
* @return Person[]
*/
tripDays(): int
/**
* Get trip length in days for CP Short
*
* @return integer
*/
vacationHomes(): array
/**
* Helper method to get array or all vacation homes
*
* array of DataObjects:
* ->type (CODELIST_HOME_TYPE)
* ->address (Address object)
*
* Keyed with same keys as $this->people() to match people to reinsurance
*
* @return DataObject[]
*/