| 1 | <?php |
| 2 | |
| 3 | /* |
| 4 | +--------------------------------------------------------------------+ |
| 5 | | Copyright CiviCRM LLC. All rights reserved. | |
| 6 | | | |
| 7 | | This work is published under the GNU AGPLv3 license with some | |
| 8 | | permitted exceptions and without any warranty. For full license | |
| 9 | | and copyright information, see https://civicrm.org/licensing | |
| 10 | +--------------------------------------------------------------------+ |
| 11 | */ |
| 12 | |
| 13 | /** |
| 14 | * |
| 15 | * @package CRM |
| 16 | * @copyright CiviCRM LLC https://civicrm.org/licensing |
| 17 | */ |
| 18 | |
| 19 | |
| 20 | namespace Civi\Api4; |
| 21 | |
| 22 | /** |
| 23 | * Address Entity. |
| 24 | * |
| 25 | * This entity holds the address informatiom of a contact. Each contact may hold |
| 26 | * one or more addresses but must have different location types respectively. |
| 27 | * |
| 28 | * Creating a new address requires at minimum a contact's ID and location type ID |
| 29 | * and other attributes (although optional) like street address, city, country etc. |
| 30 | * |
| 31 | * @package Civi\Api4 |
| 32 | */ |
| 33 | class Address extends Generic\DAOEntity { |
| 34 | |
| 35 | /** |
| 36 | * @return \Civi\Api4\Action\Address\Create |
| 37 | */ |
| 38 | public static function create() { |
| 39 | return new \Civi\Api4\Action\Address\Create(__CLASS__, __FUNCTION__); |
| 40 | } |
| 41 | |
| 42 | /** |
| 43 | * @return \Civi\Api4\Action\Address\Save |
| 44 | */ |
| 45 | public static function save() { |
| 46 | return new \Civi\Api4\Action\Address\Save(__CLASS__, __FUNCTION__); |
| 47 | } |
| 48 | |
| 49 | /** |
| 50 | * @return \Civi\Api4\Action\Address\Update |
| 51 | */ |
| 52 | public static function update() { |
| 53 | return new \Civi\Api4\Action\Address\Update(__CLASS__, __FUNCTION__); |
| 54 | } |
| 55 | |
| 56 | } |