src/EventPayload.php
/**
     * Constructs array of object's attributes and values and transforms attributes to snake case.
     *
     * @return array
     */
Constructs array of object's attributes and values and transforms attributes to snake case.
@return array
Constructs array of object ' s attributes and values and transforms attributes to snake case . @return array
public function toPayload(): array
    {
        $attributes = get_object_vars($this);
        $keys = map(array_keys($attributes), $this->transformToSnakeCase());
        $values = map(array_values($attributes), $this->transformToPayload());
        return array_combine($keys, $values);
    }
public function toPayload ( ) : array { $ attributes = get_object_vars ( $ this ) ; $ keys = map ( array_keys ( $ attributes ) , $ this -> transformToSnakeCase ( ) ) ; $ values = map ( array_values ( $ attributes ) , $ this -> transformToPayload ( ) ) ; return array_combine ( $ keys , $ values ) ; }
Constructs array of object's attributes and values and transforms attributes to snake case.
Constructs array of object ' s attributes and values and transforms attributes to snake case .