public function toArray() : array
    {
        $output = [];
        foreach ($this->data as $key => $val) {
            $output[$key] = $val instanceof ArraySerializable ? $val->toArray() : $val;
        }
        return $output;
    }
public function toArray() : array
    {
        $output = [];
        foreach ($this->data as $key => $val) {
            $output[$key] = $val instanceof ArraySerializable ? $val->toArray() : $val;
        }
        return $output;
    }
public function toArray ( ) : array { $ output = [ ] ; foreach ( $ this -> data as $ key => $ val ) { $ output [ $ key ] = $ val instanceof ArraySerializable ? $ val -> toArray ( ) : $ val ; } return $ output ; }
Array representation of this entity.

@return array
Array representation of this entity .