This is the base class for all entities.
/** * {@inheritdoc} */ public function __construct($data = []) { $data = call_user_func_array([$this, 'createFromParams'], func_get_args()); parent::__construct($data); // Remove any empty buttons. $this->{$this->getKeyboardType()} = array_filter($this->{$this->getKeyboardType()}); }
/** * {@inheritdoc} */ public function __call($method, $args) { // Only 1 of these can be set, so clear the others when setting a new one. if (in_array($method, ['setRequestContact', 'setRequestLocation'], true)) { unset($this->request_contact, $this->request_location); } return parent::__call($method, $args); }