<?php

/*!
     * ifsoft.co.uk v1.1
     *
     * http://ifsoft.com.ua, http://ifsoft.co.uk
     * qascript@mail.ru
     *
     * Copyright 2012-2017 Demyanchuk Dmitry (https://vk.com/dmitry.demyanchuk)
     */

class draw extends db_connect
{
    private $requestFrom = 0;

    public function __construct($dbo = NULL)
    {
        parent::__construct($dbo);
    }

    static function comment($comment, $postInfo, $LANG = array()) {

        $comment['comment'] = helper::processCommentText($comment['comment']);

        $fromUserPhoto = "/img/profile_default_photo.png";

        if (strlen($comment['fromUserPhotoUrl']) != 0) {

            $fromUserPhoto = $comment['fromUserPhotoUrl'];
        }

        ?>

        <li class="custom-list-item comment-item" data-id="<?php echo $comment['id']; ?>">

            <a href="/<?php echo $comment['fromUserUsername']; ?>" class="item-logo" style="background-image:url(<?php echo $fromUserPhoto; ?>)"></a>

            <span class="custom-item-link"><?php echo $comment['comment']; ?></span>

            <div class="item-meta">

                <span class="featured"><?php echo $comment['timeAgo']; ?></span>

                <?php

                if ($comment['replyToUserId'] != 0) {

                    ?>
                    <span class="location"> <?php echo $LANG['label-to-user']; ?> <a href="/<?php echo $comment['replyToUserUsername']; ?>"><?php echo $comment['replyToFullname']; ?></a></span>
                    <?php
                }
                ?>

                <?php

                if ((auth::getCurrentUserId() != 0) && ($comment['fromUserId'] != auth::getCurrentUserId()) && ($postInfo['allowComments'] != 0) ) {

                    ?>
                    <span class="post-date"><a href="javascript:void(0)" onclick="Comments.reply('<?php echo $comment['fromUserId']; ?>', '<?php echo $comment['fromUserUsername']; ?>', '<?php echo $comment['fromUserFullname']; ?>'); return false;"><?php echo $LANG['action-reply']; ?></a></span>
                    <?php
                }
                ?>

                <?php

                if (auth::getCurrentUserId() != 0) {

                    if ($postInfo['fromUserId'] == auth::getCurrentUserId() || auth::getCurrentUserId() == $comment['fromUserId']) {

                        ?>

                        <span class="post-date"><a href="javascript:void(0)" onclick="Comments.remove('<?php echo $comment['fromUserUsername']; ?>', '<?php echo $postInfo['id']; ?>', '<?php echo $comment['id']; ?>', '<?php echo auth::getAccessToken(); ?>'); return false;"><?php echo $LANG['action-remove']; ?></a></span>

                        <?php
                    }
                }

                ?>

            </div>

        </li>

        <?php
    }

    static function galleryItem($photo, $LANG, $helper)
    {

        ?>

        <div class="gallery-item" data-id="<?php echo $photo['id']; ?>">

            <div class="item-inner">

                <a href="/<?php echo $photo['fromUserUsername']; ?>/image/<?php echo $photo['id']; ?>">
                    <div class="gallery-item-preview" style="background-image:url(<?php echo $photo['previewImgUrl']; ?>)"></div>
                </a>

                <div class="gallery-item-titles">

                    <p class="gallery-item-author">

                        <span><?php echo $photo['timeAgo']; ?></span>

                        <?php

                        if (auth::getCurrentUserId() != 0 && auth::getCurrentUserId() == $photo['fromUserId']) {

                            ?>

                            | <span><a href="javascript:void(0)" onclick="Photo.remove('<?php echo $photo['id']; ?>', '<?php echo auth::getAccessToken(); ?>'); return false;"><?php echo $LANG['action-remove']; ?></a></span>

                            <?php

                        } else {

                            ?>

                            | <span><a href="javascript:void(0)" onclick="Photo.getReportBox('<?php echo $photo['fromUserUsername']; ?>', '<?php echo $photo['id']; ?>', '<?php echo $LANG['action-report']; ?>'); return false;"><?php echo $LANG['action-report']; ?></a></span>

                            <?php
                        }
                        ?>
                    </p>

                </div>

            </div>
        </div>

        <?php
    }

    static function post($post, $LANG, $helper = null, $showComments = false)
    {
        $time = new language(NULL, $LANG['lang-code']);

        $post['post'] = helper::processPostText($post['post']);

        $fromUserPhoto = "/img/profile_default_photo.png";

        if (strlen($post['fromUserPhoto']) != 0) {

            $fromUserPhoto = $post['fromUserPhoto'];
        }

        if ($post['groupId'] != 0) {

            $group = new group(null, $post['groupId']);
            $group->setRequestFrom(auth::getCurrentUserId());

            $groupInfo = $group->get();

            if ($groupInfo['accountAuthor'] == $post['fromUserId']) {

                if (strlen($groupInfo['lowPhotoUrl'])) {

                    $fromUserPhoto = $groupInfo['lowPhotoUrl'];
                }
            }
        }

        ?>

        <li class="custom-list-item post-item" data-id="<?php echo $post['id']; ?>">

            <a href="/<?php echo $post['fromUserUsername']; ?>" class="item-logo" style="background-image:url(<?php echo $fromUserPhoto; ?>)"></a>

            <a href="/<?php echo $post['fromUserUsername']; ?>" class="custom-item-link"><?php echo $post['fromUserFullname']; ?></a>

            <div class="item-meta">

                <span class="post-date"><a href="/<?php echo $post['fromUserUsername']; ?>/post/<?php echo $post['id']; ?>"><?php echo $time->timeAgo($post['createAt']); ?></a></span>

                <p class="post-text"><?php echo $post['post']; ?></p>

                <?php

                    if (strlen($post['imgUrl'])) {

                        ?>
                            <img class="post-img" style="" alt="post-img" src="<?php echo $post['imgUrl']; ?>">
                        <?php
                    }
                ?>

                <?php

                    if (strlen($post['videoUrl']) > 0) {

                        ?>

                        <video width = "100%" height = "auto" style="max-height: 300px" controls>
                            <source src="<?php echo $post['videoUrl']; ?>" type="video/mp4">
                        </video>

                        <?php
                    }
                ?>

                <?php

                    if (strlen($post['urlPreviewLink']) > 0) {

                        if (strlen($post['urlPreviewImage']) == 0) $post['urlPreviewImage'] = "/img/img_link.png";
                        if (strlen($post['urlPreviewTitle']) == 0) $post['urlPreviewTitle'] = "Link";

                        ?>

                        <ul class="items-list link-preview-list">
                            <li class="custom-list-item link-preview-item" data-id="<?php echo $post['id']; ?>">
                                <a href="<?php echo $post['urlPreviewLink']; ?>">
                                    <span class="link-img" style="background-image:url(<?php echo $post['urlPreviewImage']; ?>)"></span>
                                    <span class="link-title"><?php echo $post['urlPreviewTitle']; ?></span>

                                    <div class="item-meta">
                                        <span class="link-description"><?php echo $post['urlPreviewDescription']; ?></span>
                                    </div>
                                </a>
                            </li>
                        </ul>

                        <?php
                    }
                ?>

                <?php

                    $rePost = $post['rePost'];
                    $rePost = $rePost[0];

                    if ($post['rePostId'] != 0 && $rePost['error'] === false) {

                        if ($rePost['removeAt'] != 0) {

                            ?>

                            <div class="post post_item" data-id="<?php echo $rePost['id']; ?>" style="width: 100%;display: inline-block; border-left: 1px solid #DAE1E8; border-bottom: 0px; padding-left: 5px; margin-top: 10px; margin-bottom: 10px;">

                                <div class="post_content">
                                    <div class="post_data">
                                        <?php echo $LANG['label-repost-error']; ?>
                                    </div>
                                </div>
                            </div>

                            <?php

                        }  else {


                            $rePost['post'] = helper::processPostText($rePost['post']);

                            $rePostFromUserPhoto = "/img/profile_default_photo.png";

                            if (strlen($rePost['fromUserPhoto']) != 0) {

                                $rePostFromUserPhoto = $rePost['fromUserPhoto'];
                            }

                            ?>

                                <ul class="items-list repost-list">

                                    <li class="custom-list-item repost-item" data-id="<?php echo $rePost['id']; ?>">

                                        <a href="/<?php echo $rePost['fromUserUsername']; ?>/post/<?php echo $rePost['id'] ?>" class="item-logo" style="background-image:url(<?php echo $rePostFromUserPhoto; ?>)"></a>

                                        <a href="/<?php echo $rePost['fromUserUsername']; ?>/post/<?php echo $rePost['id'] ?>" class="custom-item-link"><?php echo $rePost['fromUserFullname']; ?></a>

                                        <div class="item-meta">

                                            <span class="post-date"><?php echo $time->timeAgo($rePost['createAt']); ?></span>

                                            <p class="post-text"><?php echo $rePost['post']; ?></p>

                                            <?php

                                                if (strlen($rePost['imgUrl'])) {

                                                    ?>

                                                    <img class="post-img" style="" src="<?php echo $rePost['imgUrl']; ?>">
                                                    <?php
                                                }
                                            ?>

                                        </div
                                    </li>

                                </ul>

                            <?php
                        }
                    }

                ?>

                <div class="post-footer">

                    <?php

                    if ((auth::isSession() && $post['fromUserId'] == auth::getCurrentUserId()) || (isset($groupInfo) && $groupInfo['accountAuthor'] == auth::getCurrentUserId())) {

                        ?>

                        <span class="post-footer-link"><a href="javascript:void(0)" onclick="Post.remove('<?php echo $post['id']; ?>', '<?php echo auth::getAccessToken(); ?>'); return false;"><?php echo $LANG['action-remove']; ?></a></span>

                        <?php

                    }

                    if (auth::isSession() && $post['fromUserId'] != auth::getCurrentUserId()) {

                        ?>

                        <span class="post-footer-link"><a href="javascript:void(0)" onclick="Post.getReportBox('<?php echo $post['fromUserUsername']; ?>', '<?php echo $post['id']; ?>', '<?php echo $LANG['page-profile-report']; ?>'); return false;"><?php echo $LANG['action-report']; ?></a></span>

                        <?php
                    }

                    ?>

                    <?php

                        if (!$showComments) {

                            ?>

                                <span class="post-footer-link"><a href="/<?php echo $post['fromUserUsername']; ?>/post/<?php echo $post['id']; ?>"><?php echo $LANG['action-comment']; ?> <?php if ($post['commentsCount'] > 0) echo "({$post['commentsCount']})"; ?></a></span>

                            <?php

                            if (auth::isSession() && $post['fromUserId'] != auth::getCurrentUserId()) {

                                $re_post_id = $post['id'];

                                if ($post['rePostId'] != 0) {

                                    $re_post_id = $post['rePostId'];
                                }

                                ?>

                                <span class="post-footer-link"><a data-id="<?php echo $post['id']; ?>" onclick="Post.getRepostBox('<?php echo $post['fromUserUsername']; ?>', '<?php echo $re_post_id; ?>', '<?php echo $LANG['action-share-post']; ?>', '<?php echo $post['myRePost']; ?>'); return false;" class="post-share" href="javascript:void(0)"><?php echo $LANG['action-share']; ?> <?php if ($post['rePostsCount'] > 0) echo "({$post['rePostsCount']})"; ?></a></span>

                                <?php
                            }
                            ?>

                            <?php
                        }
                    ?>

                    <div class="likes-content" style="<?php if ($showComments) echo 'float: right;' ?>">
                        <span class="post-like" onclick="Post.like('<?php echo $post['fromUserUsername']; ?>', '<?php echo $post['id']; ?>', '<?php echo auth::getAccessToken(); ?>'); return false;"><i data-id="<?php echo $post['id']; ?>" class="like-icon <?php if ($post['myLike']) echo "mylike"; ?>"></i></span>
                        <span class="post-likes-count <?php if ($post['likesCount'] == 0) echo 'gone' ?> " data-id="<?php echo $post['id']; ?>"><a data-id="<?php echo $post['id']; ?>" class="likes-count" href="/<?php echo $post['fromUserUsername'].'/post/'.$post['id'].'/people'; ?>"><?php echo $post['likesCount']; ?></a></span>
                    </div>
                </div>

                <?php

                if ($showComments) {

                    ?>

                    <ul class="items-list comments-list" data-id="<?php echo $post['id']; ?>">

                        <?php

                        $comments = new comments();
                        $comments->setLanguage($LANG['lang-code']);
                        $comments->setRequestFrom(auth::getCurrentUserId());

                        $data = $comments->getPreview($post['id']);

                        $commentsCount = $data['count'];

                        if ($commentsCount > 3) {

                            ?>
                            <a data-id="<?php echo $post['id']; ?>" onclick="Comments.more('<?php echo $post['fromUserUsername']; ?>', '<?php echo $post['id'] ?>', '<?php echo $data['commentId']; ?>'); return false;" class="get_comments_header comment-loader">
                                <?php echo $LANG['action-show-all']; ?> (<?php echo $commentsCount - 3; ?>)
                            </a>
                            <?php
                        }

                        $data['comments'] = array_reverse($data['comments'], false);

                        foreach ($data['comments'] as $key => $value) {

                            draw::comment($value, $post, $LANG);
                        }

                        ?>

                    </ul>

                    <?php

                        if (auth::getCurrentUserId() != 0) {

                            if ($post['allowComments'] != 0) {

                                ?>

                                <div class="comment_form comment-form" data-id="<?php echo $post['id']; ?>">

                                    <form class="" onsubmit="Comments.create('<?php echo $post['fromUserUsername']; ?>', '<?php echo $post['id'] ?>', '<?php echo auth::getAccessToken(); ?>'); return false;">
                                        <input data-id="<?php echo $post['id']; ?>" class="comment_text" name="comment_text" maxlength="140" placeholder="<?Php echo $LANG['label-placeholder-comment']; ?>" type="text" value="">
                                        <button class="primary_btn comment_send blue"><?Php echo $LANG['action-send']; ?></button>
                                    </form>

                                </div>

                                <?php

                            } else {

                                ?>

                                <header class="top-banner info-banner" style="border: 0">

                                    <div class="info">
                                        <p style="white-space: normal; border: 0; text-align: center;"><?php echo $LANG['label-comments-disallow']; ?></p>
                                    </div>

                                </header>

                                <?php
                            }

                        } else {

                            ?>

                            <header class="top-banner info-banner" style="border: 0">

                                <div class="info">
                                    <p style="white-space: normal; border: 0; text-align: center;"><?php echo $LANG['label-comments-prompt']; ?></p>
                                </div>

                            </header>

                            <?php
                        }
                        ?>

                    <?php
                }
                ?>

            </div

        </li>

        <?php
    }

    static function userItem($profile, $LANG, $helper = null)
    {
        $profilePhotoUrl = "/img/profile_default_photo.png";

        if (strlen($profile['lowPhotoUrl']) != 0) {

            $profilePhotoUrl = $profile['lowPhotoUrl'];
        }

        ?>

        <li class="custom-list-item">

            <a href="/<?php echo $profile['username']; ?>" class="item-logo" style="background-image:url(<?php echo $profilePhotoUrl; ?>)"></a>

            <a href="/<?php echo $profile['username']; ?>" class="custom-item-link"><?php echo $profile['fullname']; ?></a>

            <?php if ( $profile['verify'] == 1) echo "<b original-title=\"{$LANG['label-account-verified']}\" class=\"verified\"></b>"; ?>

            <div class="item-meta">

                <span class="featured">@<?php echo $profile['username']; ?></span>

            </div>

        </li>

        <?php
    }


    static function friendItem($profile, $LANG, $helper = null)
    {
        $profilePhotoUrl = "/img/profile_default_photo.png";

        if (strlen($profile['friendUserPhoto']) != 0) {

            $profilePhotoUrl = $profile['friendUserPhoto'];
        }

        ?>

        <li class="custom-list-item">

            <a href="/<?php echo $profile['friendUserUsername']; ?>" class="item-logo" style="background-image:url(<?php echo $profilePhotoUrl; ?>)"></a>

            <a href="/<?php echo $profile['friendUserUsername']; ?>" class="custom-item-link"><?php echo $profile['friendUserFullname']; ?></a>

            <?php if ( $profile['friendUserVerify'] == 1) echo "<b original-title=\"{$LANG['label-account-verified']}\" class=\"verified\"></b>"; ?>

            <div class="item-meta">

                <span class="featured">@<?php echo $profile['friendUserUsername']; ?></span>

            </div>

        </li>

        <?php
    }

    static function image($post, $LANG, $helper = null, $showComments = false)
    {
        $post['comment'] = helper::processPostText($post['comment']);

        $fromUserPhoto = "/img/profile_default_photo.png";

        if (strlen($post['fromUserPhoto']) != 0) {

            $fromUserPhoto = $post['fromUserPhoto'];
        }

        $time = new language(NULL, $LANG['lang-code']);

        ?>

        <li class="custom-list-item post-item" data-id="<?php echo $post['id']; ?>">

            <a href="/<?php echo $post['fromUserUsername']; ?>" class="item-logo" style="background-image:url(<?php echo $fromUserPhoto; ?>)"></a>

            <a href="/<?php echo $post['fromUserUsername']; ?>" class="custom-item-link"><?php echo $post['fromUserFullname']; ?></a>

            <div class="item-meta">

                <span class="post-date"><a href="/<?php echo $post['fromUserUsername']; ?>/image/<?php echo $post['id']; ?>"><?php echo $time->timeAgo($post['createAt']); ?></a></span>

                <p class="post-text"><?php echo $post['comment']; ?></p>

                <?php

                if (strlen($post['imgUrl'])) {

                    ?>
                    <img class="post-img" style="" alt="post-img" src="<?php echo $post['imgUrl']; ?>">
                    <?php
                }
                ?>

                <div class="post-footer">

                    <?php

                    if (auth::isSession() && $post['fromUserId'] == auth::getCurrentUserId()) {

                        ?>

                        <span class="post-footer-link"><a href="javascript:void(0)" onclick="Images.remove('<?php echo $post['id']; ?>', '<?php echo auth::getAccessToken(); ?>'); return false;"><?php echo $LANG['action-remove']; ?></a></span>

                        <?php

                    }

                    if (auth::isSession() && $post['fromUserId'] != auth::getCurrentUserId()) {

                        ?>

                        <span class="post-footer-link"><a href="javascript:void(0)" onclick="Photo.getReportBox('<?php echo $post['fromUserUsername']; ?>', '<?php echo $post['id']; ?>', '<?php echo $LANG['action-report']; ?>'); return false;"><?php echo $LANG['action-report']; ?></a></span>

                        <?php
                    }

                    ?>

                    <?php

                    if (!$showComments) {

                        ?>

                        <span class="post-footer-link"><a href="/<?php echo $post['fromUserUsername']; ?>/post/<?php echo $post['id']; ?>"><?php echo $LANG['action-comment']; ?> <?php if ($post['commentsCount'] > 0) echo "({$post['commentsCount']})"; ?></a></span>

                        <?php

                        if (auth::isSession() && $post['fromUserId'] != auth::getCurrentUserId()) {

                            $re_post_id = $post['id'];

                            if ($post['rePostId'] != 0) {

                                $re_post_id = $post['rePostId'];
                            }

                            ?>

                            <span class="post-footer-link"><a data-id="<?php echo $post['id']; ?>" onclick="Post.getRepostBox('<?php echo $post['fromUserUsername']; ?>', '<?php echo $re_post_id; ?>', '<?php echo $LANG['action-share-post']; ?>', '<?php echo $post['myRePost']; ?>'); return false;" class="post-share" href="javascript:void(0)"><?php echo $LANG['action-share']; ?> <?php if ($post['rePostsCount'] > 0) echo "({$post['rePostsCount']})"; ?></a></span>

                            <?php
                        }
                        ?>

                        <?php
                    }
                    ?>

                    <span class="post-like" onclick="Images.like('<?php echo $post['fromUserUsername']; ?>', '<?php echo $post['id']; ?>', '<?php echo auth::getAccessToken(); ?>'); return false;"><i data-id="<?php echo $post['id']; ?>" class="like-icon <?php if ($post['myLike']) echo "mylike"; ?>"></i></span>
                    <span class="post-likes-count <?php if ($post['likesCount'] == 0) echo 'gone' ?> " data-id="<?php echo $post['id']; ?>"><a data-id="<?php echo $post['id']; ?>" class="likes-count" href="/<?php echo $post['fromUserUsername'].'/image/'.$post['id'].'/people'; ?>"><?php echo $post['likesCount']; ?></a></span>
                </div>

                <?php

                if ($showComments) {

                    ?>

                    <ul class="items-list comments-list" data-id="<?php echo $post['id']; ?>">

                        <?php

                        $images = new images();
                        $images->setLanguage($LANG['lang-code']);
                        $images->setRequestFrom(auth::getCurrentUserId());

                        $data = $images->commentsGet($post['id']);

                        $commentsCount = count($data['comments']);

                        $data['comments'] = array_reverse($data['comments'], false);

                        foreach ($data['comments'] as $key => $value) {

                            draw::image_comment($value, $post, $LANG);
                        }

                        ?>

                    </ul>

                    <?php

                    if (auth::getCurrentUserId() != 0) {

                        if ($post['fromUserAllowPhotosComments'] != 0) {

                            ?>

                            <div class="comment_form comment-form" data-id="<?php echo $post['id']; ?>">

                                <form class="" onsubmit="imagesComments.create('<?php echo $post['fromUserUsername']; ?>', '<?php echo $post['id'] ?>', '<?php echo auth::getAccessToken(); ?>'); return false;">
                                    <input data-id="<?php echo $post['id']; ?>" class="comment_text" name="comment_text" maxlength="140" placeholder="<?Php echo $LANG['label-placeholder-comment']; ?>" type="text" value="">
                                    <button class="primary_btn comment_send blue"><?Php echo $LANG['action-send']; ?></button>
                                </form>

                            </div>

                            <?php

                        } else {

                            ?>

                            <header class="top-banner info-banner" style="border: 0">

                                <div class="info">
                                    <p style="white-space: normal; border: 0; text-align: center;"><?php echo $LANG['label-comments-disallow']; ?></p>
                                </div>

                            </header>

                            <?php
                        }

                    } else {

                        ?>

                        <header class="top-banner info-banner" style="border: 0">

                            <div class="info">
                                <p style="white-space: normal; border: 0; text-align: center;"><?php echo $LANG['label-comments-prompt']; ?></p>
                            </div>

                        </header>

                        <?php
                    }
                    ?>

                    <?php
                }
                ?>

            </div

        </li>

        <?php
    }

    static function image_comment($comment, $postInfo, $LANG = array()) {

        $comment['comment'] = helper::processCommentText($comment['comment']);

        $fromUserPhoto = "/img/profile_default_photo.png";

        if (strlen($comment['fromUserPhotoUrl']) != 0) {

            $fromUserPhoto = $comment['fromUserPhotoUrl'];
        }

        ?>

        <li class="custom-list-item comment-item" data-id="<?php echo $comment['id']; ?>">

            <a href="/<?php echo $comment['fromUserUsername']; ?>" class="item-logo" style="background-image:url(<?php echo $fromUserPhoto; ?>)"></a>

            <span class="custom-item-link"><?php echo $comment['comment']; ?></span>

            <div class="item-meta">

                <span class="featured"><?php echo $comment['timeAgo']; ?></span>

                <?php

                if ($comment['replyToUserId'] != 0) {

                    ?>
                    <span class="location"> <?php echo $LANG['label-to-user']; ?> <a href="/<?php echo $comment['replyToUserUsername']; ?>"><?php echo $comment['replyToFullname']; ?></a></span>
                    <?php
                }
                ?>

                <?php

                if ((auth::getCurrentUserId() != 0) && ($comment['fromUserId'] != auth::getCurrentUserId()) && ($postInfo['fromUserAllowPhotosComments'] != 0) ) {

                    ?>
                    <span class="post-date"><a href="javascript:void(0)" onclick="imagesComments.reply('<?php echo $comment['fromUserId']; ?>', '<?php echo $comment['fromUserUsername']; ?>', '<?php echo $comment['fromUserFullname']; ?>'); return false;"><?php echo $LANG['action-reply']; ?></a></span>
                    <?php
                }
                ?>

                <?php

                if (auth::getCurrentUserId() != 0) {

                    if ($postInfo['fromUserId'] == auth::getCurrentUserId() || auth::getCurrentUserId() == $comment['fromUserId']) {

                        ?>

                        <span class="post-date"><a href="javascript:void(0)" onclick="imagesComments.remove('<?php echo $comment['fromUserUsername']; ?>', '<?php echo $postInfo['id']; ?>', '<?php echo $comment['id']; ?>', '<?php echo auth::getAccessToken(); ?>'); return false;"><?php echo $LANG['action-remove']; ?></a></span>

                        <?php
                    }
                }

                ?>

            </div>

        </li>

        <?php
    }

    public function setRequestFrom($requestFrom)
    {
        $this->requestFrom = $requestFrom;
    }

    public function getRequestFrom()
    {
        return $this->requestFrom;
    }
}

