{"action":"closed","number":10985,"pull_request":{"url":"https://api.github.com/repos/phalcon/cphalcon/pulls/10985","id":46242745,"html_url":"https://github.com/phalcon/cphalcon/pull/10985","diff_url":"https://github.com/phalcon/cphalcon/pull/10985.diff","patch_url":"https://github.com/phalcon/cphalcon/pull/10985.patch","issue_url":"https://api.github.com/repos/phalcon/cphalcon/issues/10985","number":10985,"state":"closed","locked":false,"title":"[2.1.x] Added new feature for pagination and also optional sets the aliases","user":{"login":"KorsaR-ZN","id":579410,"avatar_url":"https://avatars0.githubusercontent.com/u/579410?v=3","gravatar_id":"","url":"https://api.github.com/users/KorsaR-ZN","html_url":"https://github.com/KorsaR-ZN","followers_url":"https://api.github.com/users/KorsaR-ZN/followers","following_url":"https://api.github.com/users/KorsaR-ZN/following{/other_user}","gists_url":"https://api.github.com/users/KorsaR-ZN/gists{/gist_id}","starred_url":"https://api.github.com/users/KorsaR-ZN/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/KorsaR-ZN/subscriptions","organizations_url":"https://api.github.com/users/KorsaR-ZN/orgs","repos_url":"https://api.github.com/users/KorsaR-ZN/repos","events_url":"https://api.github.com/users/KorsaR-ZN/events{/privacy}","received_events_url":"https://api.github.com/users/KorsaR-ZN/received_events","type":"User","site_admin":false},"body":"**Maintain compatibility with version 2.0.x**\nsee  #10957 \n\n``` php\n$repository = new \\Phalcon\\Paginator\\Repository();\n$repository->setAliases(array(\n    'myFirstPage' => $repository::PROPERTY_FIRST_PAGE,\n    'myLastPage' => $repository::PROPERTY_LAST_PAGE,\n    'myCurrentPage' => $repository::PROPERTY_CURRENT_PAGE\n));\n\n$paginator = new \\Phalcon\\Paginator\\Adapter\\NativeArray(array(\n    'data' => array_fill(0, 30, 'banana'),\n    'limit'=> 25,\n    'page' => 1,\n    'repository' => $repository\n));\n\n$page = $paginator->getPaginate();\n\n// First page\necho $page->first . PHP_EOL; // compatibility with version 2.0.x\necho $page->getFirstPage() . PHP_EOL; // Getter\necho $page->firstPage . PHP_EOL; // Magic getter\necho $page->myFirstPage . PHP_EOL; // Alias\n\n// Current page\necho $page->current . PHP_EOL; // compatibility with version 2.0.x\necho $page->getCurrentPage() . PHP_EOL; // Getter\necho $page->currentPage . PHP_EOL; // Magic getter\necho $page->myCurrentPage . PHP_EOL; // Alias\n\n// Last page\necho $page->last . PHP_EOL; // compatibility with version 2.0.x\necho $page->getLastPage() . PHP_EOL; // Getter\necho $page->lastPage . PHP_EOL; // Magic getter\necho $page->myLastPage . PHP_EOL; // Alias\n```\n","created_at":"2015-09-29T07:03:54Z","updated_at":"2017-04-26T05:58:56Z","closed_at":"2017-04-26T05:58:56Z","merged_at":null,"merge_commit_sha":"e16a169cdd0ece84ddcb539866e5f3108577e423","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/phalcon/cphalcon/pulls/10985/commits","review_comments_url":"https://api.github.com/repos/phalcon/cphalcon/pulls/10985/comments","review_comment_url":"https://api.github.com/repos/phalcon/cphalcon/pulls/comments{/number}","comments_url":"https://api.github.com/repos/phalcon/cphalcon/issues/10985/comments","statuses_url":"https://api.github.com/repos/phalcon/cphalcon/statuses/be859f0172f5e7af5cda7a252360b5bad8ea123a","head":{"label":"KorsaR-ZN:feature-4","ref":"feature-4","sha":"be859f0172f5e7af5cda7a252360b5bad8ea123a","user":{"login":"KorsaR-ZN","id":579410,"avatar_url":"https://avatars0.githubusercontent.com/u/579410?v=3","gravatar_id":"","url":"https://api.github.com/users/KorsaR-ZN","html_url":"https://github.com/KorsaR-ZN","followers_url":"https://api.github.com/users/KorsaR-ZN/followers","following_url":"https://api.github.com/users/KorsaR-ZN/following{/other_user}","gists_url":"https://api.github.com/users/KorsaR-ZN/gists{/gist_id}","starred_url":"https://api.github.com/users/KorsaR-ZN/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/KorsaR-ZN/subscriptions","organizations_url":"https://api.github.com/users/KorsaR-ZN/orgs","repos_url":"https://api.github.com/users/KorsaR-ZN/repos","events_url":"https://api.github.com/users/KorsaR-ZN/events{/privacy}","received_events_url":"https://api.github.com/users/KorsaR-ZN/received_events","type":"User","site_admin":false},"repo":{"id":27946457,"name":"phalcon-core","full_name":"KorsaR-ZN/phalcon-core","owner":{"login":"KorsaR-ZN","id":579410,"avatar_url":"https://avatars0.githubusercontent.com/u/579410?v=3","gravatar_id":"","url":"https://api.github.com/users/KorsaR-ZN","html_url":"https://github.com/KorsaR-ZN","followers_url":"https://api.github.com/users/KorsaR-ZN/followers","following_url":"https://api.github.com/users/KorsaR-ZN/following{/other_user}","gists_url":"https://api.github.com/users/KorsaR-ZN/gists{/gist_id}","starred_url":"https://api.github.com/users/KorsaR-ZN/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/KorsaR-ZN/subscriptions","organizations_url":"https://api.github.com/users/KorsaR-ZN/orgs","repos_url":"https://api.github.com/users/KorsaR-ZN/repos","events_url":"https://api.github.com/users/KorsaR-ZN/events{/privacy}","received_events_url":"https://api.github.com/users/KorsaR-ZN/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/KorsaR-ZN/phalcon-core","description":"Web framework delivered as a C-extension for PHP","fork":true,"url":"https://api.github.com/repos/KorsaR-ZN/phalcon-core","forks_url":"https://api.github.com/repos/KorsaR-ZN/phalcon-core/forks","keys_url":"https://api.github.com/repos/KorsaR-ZN/phalcon-core/keys{/key_id}","collaborators_url":"https://api.github.com/repos/KorsaR-ZN/phalcon-core/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/KorsaR-ZN/phalcon-core/teams","hooks_url":"https://api.github.com/repos/KorsaR-ZN/phalcon-core/hooks","issue_events_url":"https://api.github.com/repos/KorsaR-ZN/phalcon-core/issues/events{/number}","events_url":"https://api.github.com/repos/KorsaR-ZN/phalcon-core/events","assignees_url":"https://api.github.com/repos/KorsaR-ZN/phalcon-core/assignees{/user}","branches_url":"https://api.github.com/repos/KorsaR-ZN/phalcon-core/branches{/branch}","tags_url":"https://api.github.com/repos/KorsaR-ZN/phalcon-core/tags","blobs_url":"https://api.github.com/repos/KorsaR-ZN/phalcon-core/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/KorsaR-ZN/phalcon-core/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/KorsaR-ZN/phalcon-core/git/refs{/sha}","trees_url":"https://api.github.com/repos/KorsaR-ZN/phalcon-core/git/trees{/sha}","statuses_url":"https://api.github.com/repos/KorsaR-ZN/phalcon-core/statuses/{sha}","languages_url":"https://api.github.com/repos/KorsaR-ZN/phalcon-core/languages","stargazers_url":"https://api.github.com/repos/KorsaR-ZN/phalcon-core/stargazers","contributors_url":"https://api.github.com/repos/KorsaR-ZN/phalcon-core/contributors","subscribers_url":"https://api.github.com/repos/KorsaR-ZN/phalcon-core/subscribers","subscription_url":"https://api.github.com/repos/KorsaR-ZN/phalcon-core/subscription","commits_url":"https://api.github.com/repos/KorsaR-ZN/phalcon-core/commits{/sha}","git_commits_url":"https://api.github.com/repos/KorsaR-ZN/phalcon-core/git/commits{/sha}","comments_url":"https://api.github.com/repos/KorsaR-ZN/phalcon-core/comments{/number}","issue_comment_url":"https://api.github.com/repos/KorsaR-ZN/phalcon-core/issues/comments{/number}","contents_url":"https://api.github.com/repos/KorsaR-ZN/phalcon-core/contents/{+path}","compare_url":"https://api.github.com/repos/KorsaR-ZN/phalcon-core/compare/{base}...{head}","merges_url":"https://api.github.com/repos/KorsaR-ZN/phalcon-core/merges","archive_url":"https://api.github.com/repos/KorsaR-ZN/phalcon-core/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/KorsaR-ZN/phalcon-core/downloads","issues_url":"https://api.github.com/repos/KorsaR-ZN/phalcon-core/issues{/number}","pulls_url":"https://api.github.com/repos/KorsaR-ZN/phalcon-core/pulls{/number}","milestones_url":"https://api.github.com/repos/KorsaR-ZN/phalcon-core/milestones{/number}","notifications_url":"https://api.github.com/repos/KorsaR-ZN/phalcon-core/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/KorsaR-ZN/phalcon-core/labels{/name}","releases_url":"https://api.github.com/repos/KorsaR-ZN/phalcon-core/releases{/id}","deployments_url":"https://api.github.com/repos/KorsaR-ZN/phalcon-core/deployments","created_at":"2014-12-13T02:20:38Z","updated_at":"2015-05-07T18:32:01Z","pushed_at":"2015-10-09T21:30:17Z","git_url":"git://github.com/KorsaR-ZN/phalcon-core.git","ssh_url":"git@github.com:KorsaR-ZN/phalcon-core.git","clone_url":"https://github.com/KorsaR-ZN/phalcon-core.git","svn_url":"https://github.com/KorsaR-ZN/phalcon-core","homepage":"phalconphp.com","size":86756,"stargazers_count":0,"watchers_count":0,"language":"PHP","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"phalcon:2.1.x","ref":"2.1.x","sha":"14e1dc732aa4b25a9347a4c4b4d1018869cc57de","user":{"login":"phalcon","id":1221505,"avatar_url":"https://avatars2.githubusercontent.com/u/1221505?v=3","gravatar_id":"","url":"https://api.github.com/users/phalcon","html_url":"https://github.com/phalcon","followers_url":"https://api.github.com/users/phalcon/followers","following_url":"https://api.github.com/users/phalcon/following{/other_user}","gists_url":"https://api.github.com/users/phalcon/gists{/gist_id}","starred_url":"https://api.github.com/users/phalcon/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/phalcon/subscriptions","organizations_url":"https://api.github.com/users/phalcon/orgs","repos_url":"https://api.github.com/users/phalcon/repos","events_url":"https://api.github.com/users/phalcon/events{/privacy}","received_events_url":"https://api.github.com/users/phalcon/received_events","type":"Organization","site_admin":false},"repo":{"id":2854337,"name":"cphalcon","full_name":"phalcon/cphalcon","owner":{"login":"phalcon","id":1221505,"avatar_url":"https://avatars2.githubusercontent.com/u/1221505?v=3","gravatar_id":"","url":"https://api.github.com/users/phalcon","html_url":"https://github.com/phalcon","followers_url":"https://api.github.com/users/phalcon/followers","following_url":"https://api.github.com/users/phalcon/following{/other_user}","gists_url":"https://api.github.com/users/phalcon/gists{/gist_id}","starred_url":"https://api.github.com/users/phalcon/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/phalcon/subscriptions","organizations_url":"https://api.github.com/users/phalcon/orgs","repos_url":"https://api.github.com/users/phalcon/repos","events_url":"https://api.github.com/users/phalcon/events{/privacy}","received_events_url":"https://api.github.com/users/phalcon/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/phalcon/cphalcon","description":"High performance, full-stack PHP framework delivered as a C extension.","fork":false,"url":"https://api.github.com/repos/phalcon/cphalcon","forks_url":"https://api.github.com/repos/phalcon/cphalcon/forks","keys_url":"https://api.github.com/repos/phalcon/cphalcon/keys{/key_id}","collaborators_url":"https://api.github.com/repos/phalcon/cphalcon/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/phalcon/cphalcon/teams","hooks_url":"https://api.github.com/repos/phalcon/cphalcon/hooks","issue_events_url":"https://api.github.com/repos/phalcon/cphalcon/issues/events{/number}","events_url":"https://api.github.com/repos/phalcon/cphalcon/events","assignees_url":"https://api.github.com/repos/phalcon/cphalcon/assignees{/user}","branches_url":"https://api.github.com/repos/phalcon/cphalcon/branches{/branch}","tags_url":"https://api.github.com/repos/phalcon/cphalcon/tags","blobs_url":"https://api.github.com/repos/phalcon/cphalcon/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/phalcon/cphalcon/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/phalcon/cphalcon/git/refs{/sha}","trees_url":"https://api.github.com/repos/phalcon/cphalcon/git/trees{/sha}","statuses_url":"https://api.github.com/repos/phalcon/cphalcon/statuses/{sha}","languages_url":"https://api.github.com/repos/phalcon/cphalcon/languages","stargazers_url":"https://api.github.com/repos/phalcon/cphalcon/stargazers","contributors_url":"https://api.github.com/repos/phalcon/cphalcon/contributors","subscribers_url":"https://api.github.com/repos/phalcon/cphalcon/subscribers","subscription_url":"https://api.github.com/repos/phalcon/cphalcon/subscription","commits_url":"https://api.github.com/repos/phalcon/cphalcon/commits{/sha}","git_commits_url":"https://api.github.com/repos/phalcon/cphalcon/git/commits{/sha}","comments_url":"https://api.github.com/repos/phalcon/cphalcon/comments{/number}","issue_comment_url":"https://api.github.com/repos/phalcon/cphalcon/issues/comments{/number}","contents_url":"https://api.github.com/repos/phalcon/cphalcon/contents/{+path}","compare_url":"https://api.github.com/repos/phalcon/cphalcon/compare/{base}...{head}","merges_url":"https://api.github.com/repos/phalcon/cphalcon/merges","archive_url":"https://api.github.com/repos/phalcon/cphalcon/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/phalcon/cphalcon/downloads","issues_url":"https://api.github.com/repos/phalcon/cphalcon/issues{/number}","pulls_url":"https://api.github.com/repos/phalcon/cphalcon/pulls{/number}","milestones_url":"https://api.github.com/repos/phalcon/cphalcon/milestones{/number}","notifications_url":"https://api.github.com/repos/phalcon/cphalcon/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/phalcon/cphalcon/labels{/name}","releases_url":"https://api.github.com/repos/phalcon/cphalcon/releases{/id}","deployments_url":"https://api.github.com/repos/phalcon/cphalcon/deployments","created_at":"2011-11-26T05:52:50Z","updated_at":"2017-04-26T05:10:01Z","pushed_at":"2017-04-26T05:58:53Z","git_url":"git://github.com/phalcon/cphalcon.git","ssh_url":"git@github.com:phalcon/cphalcon.git","clone_url":"https://github.com/phalcon/cphalcon.git","svn_url":"https://github.com/phalcon/cphalcon","homepage":"https://phalconphp.com","size":133857,"stargazers_count":7915,"watchers_count":7915,"language":"PHP","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1492,"mirror_url":null,"open_issues_count":698,"forks":1492,"open_issues":698,"watchers":7915,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/phalcon/cphalcon/pulls/10985"},"html":{"href":"https://github.com/phalcon/cphalcon/pull/10985"},"issue":{"href":"https://api.github.com/repos/phalcon/cphalcon/issues/10985"},"comments":{"href":"https://api.github.com/repos/phalcon/cphalcon/issues/10985/comments"},"review_comments":{"href":"https://api.github.com/repos/phalcon/cphalcon/pulls/10985/comments"},"review_comment":{"href":"https://api.github.com/repos/phalcon/cphalcon/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/phalcon/cphalcon/pulls/10985/commits"},"statuses":{"href":"https://api.github.com/repos/phalcon/cphalcon/statuses/be859f0172f5e7af5cda7a252360b5bad8ea123a"}},"merged":false,"mergeable":false,"rebaseable":false,"mergeable_state":"dirty","merged_by":null,"comments":5,"review_comments":0,"maintainer_can_modify":false,"commits":2,"additions":457,"deletions":93,"changed_files":9}}
{"actor":{"display_login":"sjinks"}}