src/EventHeaders.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
    {
        $carrier = TracerCapsule::injectCarrier();
        $attributes = get_object_vars($this);
        unset($attributes['createdAt']);
        if (empty($carrier) === false) {
            $attributes['carrier'] = $carrier;
        }
        $keys = map(array_keys($attributes), $this->transformToSnakeCase());
        $values = map(array_values($attributes), $this->transformToPayload());
        return array_combine($keys, $values);
    }
public function toPayload ( ) : array { $ carrier = TracerCapsule :: injectCarrier ( ) ; $ attributes = get_object_vars ( $ this ) ; unset ( $ attributes [ 'createdAt' ] ) ; if ( empty ( $ carrier ) === false ) { $ attributes [ 'carrier' ] = $ carrier ; } $ 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 .