public static function buildResponse($value, $success, $httpCode, Paginer $pagingInfo = null)
    {
        $response = new stdClass();
        $response->success = $success;
        $response->http_code = $httpCode;

        if ($pagingInfo) {
            $response->pageNumber = $pagingInfo->getPageNumber();
            $response->pageSize = $pagingInfo->getPageSize();

            $totalPages = $pagingInfo->getPageCount();
            if ($totalPages > 0) {
                $response->totalPages = $totalPages;
            }
        }

        $response->data = $value;

        return $response;
    }