public function toItem($object): Item
    {
        /**
         * @var Comment $object
         */
        return Item::create(
            $this->toItemUUID($object),
            [
                'parent' => $object->getParent() instanceof Comment
                    ? $object
                        ->getParent()
                        ->getId()
                    : null,
                'author_name' => $object->getAuthorName(),
                'author_email' => $object->getAuthorEmail(),
                'author_avatar' => $object->getAuthorAvatar(),
                'author_role' => $object->getAuthorRole(),
                'content' => $object->getContent(),
            ],
            [
                'author_uuid' => $object->getAuthorUUID(),
                'thumb' => $object->getThumb(),
                'source' => $object->getSource(),
                'state' => $object->getState(),
                'rating' => $object->getRating(),
                'created_at' => $object->getCreatedAt()->format(DATE_ATOM),
            ],
            [
                $object->getContent()
            ]
        );
    }
public function toItem($object): Item
    {
        /**
         * @var Comment $object
         */
        return Item::create(
            $this->toItemUUID($object),
            [
                'parent' => $object->getParent() instanceof Comment
                    ? $object
                        ->getParent()
                        ->getId()
                    : null,
                'author_name' => $object->getAuthorName(),
                'author_email' => $object->getAuthorEmail(),
                'author_avatar' => $object->getAuthorAvatar(),
                'author_role' => $object->getAuthorRole(),
                'content' => $object->getContent(),
            ],
            [
                'author_uuid' => $object->getAuthorUUID(),
                'thumb' => $object->getThumb(),
                'source' => $object->getSource(),
                'state' => $object->getState(),
                'rating' => $object->getRating(),
                'created_at' => $object->getCreatedAt()->format(DATE_ATOM),
            ],
            [
                $object->getContent()
            ]
        );
    }
public function toItem ( $ object ) : Item { /**
         * @var Comment $object
         */ return Item :: create ( $ this -> toItemUUID ( $ object ) , [ 'parent' => $ object -> getParent ( ) instanceof Comment ? $ object -> getParent ( ) -> getId ( ) : null , 'author_name' => $ object -> getAuthorName ( ) , 'author_email' => $ object -> getAuthorEmail ( ) , 'author_avatar' => $ object -> getAuthorAvatar ( ) , 'author_role' => $ object -> getAuthorRole ( ) , 'content' => $ object -> getContent ( ) , ] , [ 'author_uuid' => $ object -> getAuthorUUID ( ) , 'thumb' => $ object -> getThumb ( ) , 'source' => $ object -> getSource ( ) , 'state' => $ object -> getState ( ) , 'rating' => $ object -> getRating ( ) , 'created_at' => $ object -> getCreatedAt ( ) -> format ( DATE_ATOM ) , ] , [ $ object -> getContent ( ) ] ) ; }
Create item by object.

@param mixed $object

@return Item
Create item by object .