public function jsonSerialize()
    {
        $feedbacks = [];

        foreach ($this->feedbacks as $feedback) {
            $feedbacks[] = $feedback->serialize($this->controllerContext);
        }

        return [
            'timestamp' => new \DateTime(),
            'feedbacks' => $feedbacks
        ];
    }
public function jsonSerialize()
    {
        $feedbacks = [];

        foreach ($this->feedbacks as $feedback) {
            $feedbacks[] = $feedback->serialize($this->controllerContext);
        }

        return [
            'timestamp' => new \DateTime(),
            'feedbacks' => $feedbacks
        ];
    }
public function jsonSerialize ( ) { $ feedbacks = [ ] ; foreach ( $ this -> feedbacks as $ feedback ) { $ feedbacks [ ] = $ feedback -> serialize ( $ this -> controllerContext ) ; } return [ 'timestamp' => new \ DateTime ( ) , 'feedbacks' => $ feedbacks ] ; }
Serialize collection to `json_encode`able array

@return array
Serialize collection to json_encode able array