public function toArray(): array
    {
        $array = parent::toArray();
        $array["creator"] = $this->creator_id;
        $array["registered_edges"] = [
            "in" => $this->incoming_edges,
            "out" => $this->outgoing_edges,
        ];
        if($this instanceof Actor) {
            $array["notifications"] = $this->notifications()->toArray();
        }
        return $array;
    }
public function toArray(): array
    {
        $array = parent::toArray();
        $array["creator"] = $this->creator_id;
        $array["registered_edges"] = [
            "in" => $this->incoming_edges,
            "out" => $this->outgoing_edges,
        ];
        if($this instanceof Actor) {
            $array["notifications"] = $this->notifications()->toArray();
        }
        return $array;
    }
public function toArray ( ) : array { $ array = parent :: toArray ( ) ; $ array [ "creator" ] = $ this -> creator_id ; $ array [ "registered_edges" ] = [ "in" => $ this -> incoming_edges , "out" => $ this -> outgoing_edges , ] ; if ( $ this instanceof Actor ) { $ array [ "notifications" ] = $ this -> notifications ( ) -> toArray ( ) ; } return $ array ; }
Converts the particle into array

For serialization and portability.

@return array
Converts the particle into array