{"action":"created","comment":{"url":"https://api.github.com/repos/codex-team/codex/pulls/comments/55191811","id":55191811,"diff_hunk":"@@ -0,0 +1,123 @@\n+<?php defined('SYSPATH') or die('No direct script access.');\n+/**\n+ * Created by PhpStorm.\n+ * User: Murod's Macbook Pro\n+ * Date: 27.02.2016\n+ * Time: 22:43\n+ */\n+\n+interface Factory_Alias {\n+    function hash($uri);\n+}\n+\n+class Sha256 implements Factory_Alias {\n+    function hash($uri)\n+    {\n+        return hash('sha256', $uri);\n+    }\n+}\n+\n+class HashSum implements Factory_Alias {\n+    function hash($uri)\n+    {\n+        // Если с Sha256 не получится, попробую старый алгоритм. С sha256 работает довольно медленно\n+        echo 'My Method';\n+    }\n+}\n+\n+class Model_Alias\n+{\n+    public $uri;\n+    public $hash;\n+    public $type;\n+    public $id;\n+    public $dt_create;\n+\n+    /**\n+     * Пустой конструктор для модели алиасов, если нужно получить статью из хранилища, нужно пользоваться статическими\n+     * методами\n+     */\n+    public function __construct()\n+    {\n+    }\n+\n+    public static function set($alias)\n+    {\n+        $this->uri          =   $alias['uri'];\n+        $this->hash         =   $alias['hash'];\n+        $this->type         =   $alias['type'];\n+        $this->id           =   $alias['id'];\n+        $this->dt_create    =   $alias['dt_creat'];\n+    }\n+\n+    public function insert()\n+    {\n+        $idAndRowAffected = Dao_Alias::insert()\n+                        ->set('uri', $this->uri)\n+                        ->set('hash', $this->hash)\n+                        ->set('type', $this->type)\n+                        ->set('id', $this->id)\n+                        ->set('dt_create', $this->dt_create)\n+                        ->clearcache()\n+                        ->execute();\n+    }\n+\n+    private function getAlias($hash = null)\n+    {\n+        $alias  =   Dao_Alias::select()\n+                            ->where('hash', '=', $hash);\n+\n+        $alias = $alias->execute();\n+\n+        $model = new Model_Alias();","path":"application/classes/Model/Alias.php","position":72,"original_position":72,"commit_id":"84bb830f043fe89fad94f23b7893a651e81db4bd","original_commit_id":"84bb830f043fe89fad94f23b7893a651e81db4bd","user":{"login":"khaydarov","id":6507765,"avatar_url":"https://avatars.githubusercontent.com/u/6507765?v=3","gravatar_id":"","url":"https://api.github.com/users/khaydarov","html_url":"https://github.com/khaydarov","followers_url":"https://api.github.com/users/khaydarov/followers","following_url":"https://api.github.com/users/khaydarov/following{/other_user}","gists_url":"https://api.github.com/users/khaydarov/gists{/gist_id}","starred_url":"https://api.github.com/users/khaydarov/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/khaydarov/subscriptions","organizations_url":"https://api.github.com/users/khaydarov/orgs","repos_url":"https://api.github.com/users/khaydarov/repos","events_url":"https://api.github.com/users/khaydarov/events{/privacy}","received_events_url":"https://api.github.com/users/khaydarov/received_events","type":"User","site_admin":false},"body":"окау","created_at":"2016-03-07T11:35:16Z","updated_at":"2016-03-07T11:35:16Z","html_url":"https://github.com/codex-team/codex/pull/144#discussion_r55191811","pull_request_url":"https://api.github.com/repos/codex-team/codex/pulls/144","_links":{"self":{"href":"https://api.github.com/repos/codex-team/codex/pulls/comments/55191811"},"html":{"href":"https://github.com/codex-team/codex/pull/144#discussion_r55191811"},"pull_request":{"href":"https://api.github.com/repos/codex-team/codex/pulls/144"}}},"pull_request":{"url":"https://api.github.com/repos/codex-team/codex/pulls/144","id":60905778,"html_url":"https://github.com/codex-team/codex/pull/144","diff_url":"https://github.com/codex-team/codex/pull/144.diff","patch_url":"https://github.com/codex-team/codex/pull/144.patch","issue_url":"https://api.github.com/repos/codex-team/codex/issues/144","number":144,"state":"open","locked":false,"title":"Uri","user":{"login":"khaydarov","id":6507765,"avatar_url":"https://avatars.githubusercontent.com/u/6507765?v=3","gravatar_id":"","url":"https://api.github.com/users/khaydarov","html_url":"https://github.com/khaydarov","followers_url":"https://api.github.com/users/khaydarov/followers","following_url":"https://api.github.com/users/khaydarov/following{/other_user}","gists_url":"https://api.github.com/users/khaydarov/gists{/gist_id}","starred_url":"https://api.github.com/users/khaydarov/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/khaydarov/subscriptions","organizations_url":"https://api.github.com/users/khaydarov/orgs","repos_url":"https://api.github.com/users/khaydarov/repos","events_url":"https://api.github.com/users/khaydarov/events{/privacy}","received_events_url":"https://api.github.com/users/khaydarov/received_events","type":"User","site_admin":false},"body":"- [ ] @n0str \r\n- [ ] @neSpecc \r\n- [ ] @demyashev \r\n- [ ] @eliseealex \r\n\r\ncloses #142 ","created_at":"2016-02-26T21:20:42Z","updated_at":"2016-03-07T11:35:16Z","closed_at":null,"merged_at":null,"merge_commit_sha":"2acacfacd2576e31c37a0400cc49acb93cb4c948","assignee":{"login":"khaydarov","id":6507765,"avatar_url":"https://avatars.githubusercontent.com/u/6507765?v=3","gravatar_id":"","url":"https://api.github.com/users/khaydarov","html_url":"https://github.com/khaydarov","followers_url":"https://api.github.com/users/khaydarov/followers","following_url":"https://api.github.com/users/khaydarov/following{/other_user}","gists_url":"https://api.github.com/users/khaydarov/gists{/gist_id}","starred_url":"https://api.github.com/users/khaydarov/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/khaydarov/subscriptions","organizations_url":"https://api.github.com/users/khaydarov/orgs","repos_url":"https://api.github.com/users/khaydarov/repos","events_url":"https://api.github.com/users/khaydarov/events{/privacy}","received_events_url":"https://api.github.com/users/khaydarov/received_events","type":"User","site_admin":false},"milestone":{"url":"https://api.github.com/repos/codex-team/codex/milestones/6","html_url":"https://github.com/codex-team/codex/milestones/1.0.3","labels_url":"https://api.github.com/repos/codex-team/codex/milestones/6/labels","id":1610060,"number":6,"title":"1.0.3","description":"","creator":{"login":"n0str","id":988885,"avatar_url":"https://avatars.githubusercontent.com/u/988885?v=3","gravatar_id":"","url":"https://api.github.com/users/n0str","html_url":"https://github.com/n0str","followers_url":"https://api.github.com/users/n0str/followers","following_url":"https://api.github.com/users/n0str/following{/other_user}","gists_url":"https://api.github.com/users/n0str/gists{/gist_id}","starred_url":"https://api.github.com/users/n0str/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/n0str/subscriptions","organizations_url":"https://api.github.com/users/n0str/orgs","repos_url":"https://api.github.com/users/n0str/repos","events_url":"https://api.github.com/users/n0str/events{/privacy}","received_events_url":"https://api.github.com/users/n0str/received_events","type":"User","site_admin":false},"open_issues":6,"closed_issues":1,"state":"open","created_at":"2016-02-28T09:43:01Z","updated_at":"2016-03-06T23:01:46Z","due_on":"2016-03-10T21:00:00Z","closed_at":null},"commits_url":"https://api.github.com/repos/codex-team/codex/pulls/144/commits","review_comments_url":"https://api.github.com/repos/codex-team/codex/pulls/144/comments","review_comment_url":"https://api.github.com/repos/codex-team/codex/pulls/comments{/number}","comments_url":"https://api.github.com/repos/codex-team/codex/issues/144/comments","statuses_url":"https://api.github.com/repos/codex-team/codex/statuses/84bb830f043fe89fad94f23b7893a651e81db4bd","head":{"label":"codex-team:URI","ref":"URI","sha":"84bb830f043fe89fad94f23b7893a651e81db4bd","user":{"login":"codex-team","id":16060815,"avatar_url":"https://avatars.githubusercontent.com/u/16060815?v=3","gravatar_id":"","url":"https://api.github.com/users/codex-team","html_url":"https://github.com/codex-team","followers_url":"https://api.github.com/users/codex-team/followers","following_url":"https://api.github.com/users/codex-team/following{/other_user}","gists_url":"https://api.github.com/users/codex-team/gists{/gist_id}","starred_url":"https://api.github.com/users/codex-team/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/codex-team/subscriptions","organizations_url":"https://api.github.com/users/codex-team/orgs","repos_url":"https://api.github.com/users/codex-team/repos","events_url":"https://api.github.com/users/codex-team/events{/privacy}","received_events_url":"https://api.github.com/users/codex-team/received_events","type":"Organization","site_admin":false},"repo":{"id":44992775,"name":"codex","full_name":"codex-team/codex","owner":{"login":"codex-team","id":16060815,"avatar_url":"https://avatars.githubusercontent.com/u/16060815?v=3","gravatar_id":"","url":"https://api.github.com/users/codex-team","html_url":"https://github.com/codex-team","followers_url":"https://api.github.com/users/codex-team/followers","following_url":"https://api.github.com/users/codex-team/following{/other_user}","gists_url":"https://api.github.com/users/codex-team/gists{/gist_id}","starred_url":"https://api.github.com/users/codex-team/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/codex-team/subscriptions","organizations_url":"https://api.github.com/users/codex-team/orgs","repos_url":"https://api.github.com/users/codex-team/repos","events_url":"https://api.github.com/users/codex-team/events{/privacy}","received_events_url":"https://api.github.com/users/codex-team/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/codex-team/codex","description":"Codex Team development","fork":false,"url":"https://api.github.com/repos/codex-team/codex","forks_url":"https://api.github.com/repos/codex-team/codex/forks","keys_url":"https://api.github.com/repos/codex-team/codex/keys{/key_id}","collaborators_url":"https://api.github.com/repos/codex-team/codex/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/codex-team/codex/teams","hooks_url":"https://api.github.com/repos/codex-team/codex/hooks","issue_events_url":"https://api.github.com/repos/codex-team/codex/issues/events{/number}","events_url":"https://api.github.com/repos/codex-team/codex/events","assignees_url":"https://api.github.com/repos/codex-team/codex/assignees{/user}","branches_url":"https://api.github.com/repos/codex-team/codex/branches{/branch}","tags_url":"https://api.github.com/repos/codex-team/codex/tags","blobs_url":"https://api.github.com/repos/codex-team/codex/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/codex-team/codex/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/codex-team/codex/git/refs{/sha}","trees_url":"https://api.github.com/repos/codex-team/codex/git/trees{/sha}","statuses_url":"https://api.github.com/repos/codex-team/codex/statuses/{sha}","languages_url":"https://api.github.com/repos/codex-team/codex/languages","stargazers_url":"https://api.github.com/repos/codex-team/codex/stargazers","contributors_url":"https://api.github.com/repos/codex-team/codex/contributors","subscribers_url":"https://api.github.com/repos/codex-team/codex/subscribers","subscription_url":"https://api.github.com/repos/codex-team/codex/subscription","commits_url":"https://api.github.com/repos/codex-team/codex/commits{/sha}","git_commits_url":"https://api.github.com/repos/codex-team/codex/git/commits{/sha}","comments_url":"https://api.github.com/repos/codex-team/codex/comments{/number}","issue_comment_url":"https://api.github.com/repos/codex-team/codex/issues/comments{/number}","contents_url":"https://api.github.com/repos/codex-team/codex/contents/{+path}","compare_url":"https://api.github.com/repos/codex-team/codex/compare/{base}...{head}","merges_url":"https://api.github.com/repos/codex-team/codex/merges","archive_url":"https://api.github.com/repos/codex-team/codex/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/codex-team/codex/downloads","issues_url":"https://api.github.com/repos/codex-team/codex/issues{/number}","pulls_url":"https://api.github.com/repos/codex-team/codex/pulls{/number}","milestones_url":"https://api.github.com/repos/codex-team/codex/milestones{/number}","notifications_url":"https://api.github.com/repos/codex-team/codex/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/codex-team/codex/labels{/name}","releases_url":"https://api.github.com/repos/codex-team/codex/releases{/id}","deployments_url":"https://api.github.com/repos/codex-team/codex/deployments","created_at":"2015-10-26T19:41:35Z","updated_at":"2016-01-25T14:39:23Z","pushed_at":"2016-03-05T21:18:05Z","git_url":"git://github.com/codex-team/codex.git","ssh_url":"git@github.com:codex-team/codex.git","clone_url":"https://github.com/codex-team/codex.git","svn_url":"https://github.com/codex-team/codex","homepage":"http://alpha.difual.com","size":30704,"stargazers_count":2,"watchers_count":2,"language":"PHP","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":5,"mirror_url":null,"open_issues_count":22,"forks":5,"open_issues":22,"watchers":2,"default_branch":"master"}},"base":{"label":"codex-team:master","ref":"master","sha":"8ffbf77e91c951a2111e1e8e8d7f0e13018ab450","user":{"login":"codex-team","id":16060815,"avatar_url":"https://avatars.githubusercontent.com/u/16060815?v=3","gravatar_id":"","url":"https://api.github.com/users/codex-team","html_url":"https://github.com/codex-team","followers_url":"https://api.github.com/users/codex-team/followers","following_url":"https://api.github.com/users/codex-team/following{/other_user}","gists_url":"https://api.github.com/users/codex-team/gists{/gist_id}","starred_url":"https://api.github.com/users/codex-team/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/codex-team/subscriptions","organizations_url":"https://api.github.com/users/codex-team/orgs","repos_url":"https://api.github.com/users/codex-team/repos","events_url":"https://api.github.com/users/codex-team/events{/privacy}","received_events_url":"https://api.github.com/users/codex-team/received_events","type":"Organization","site_admin":false},"repo":{"id":44992775,"name":"codex","full_name":"codex-team/codex","owner":{"login":"codex-team","id":16060815,"avatar_url":"https://avatars.githubusercontent.com/u/16060815?v=3","gravatar_id":"","url":"https://api.github.com/users/codex-team","html_url":"https://github.com/codex-team","followers_url":"https://api.github.com/users/codex-team/followers","following_url":"https://api.github.com/users/codex-team/following{/other_user}","gists_url":"https://api.github.com/users/codex-team/gists{/gist_id}","starred_url":"https://api.github.com/users/codex-team/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/codex-team/subscriptions","organizations_url":"https://api.github.com/users/codex-team/orgs","repos_url":"https://api.github.com/users/codex-team/repos","events_url":"https://api.github.com/users/codex-team/events{/privacy}","received_events_url":"https://api.github.com/users/codex-team/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/codex-team/codex","description":"Codex Team development","fork":false,"url":"https://api.github.com/repos/codex-team/codex","forks_url":"https://api.github.com/repos/codex-team/codex/forks","keys_url":"https://api.github.com/repos/codex-team/codex/keys{/key_id}","collaborators_url":"https://api.github.com/repos/codex-team/codex/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/codex-team/codex/teams","hooks_url":"https://api.github.com/repos/codex-team/codex/hooks","issue_events_url":"https://api.github.com/repos/codex-team/codex/issues/events{/number}","events_url":"https://api.github.com/repos/codex-team/codex/events","assignees_url":"https://api.github.com/repos/codex-team/codex/assignees{/user}","branches_url":"https://api.github.com/repos/codex-team/codex/branches{/branch}","tags_url":"https://api.github.com/repos/codex-team/codex/tags","blobs_url":"https://api.github.com/repos/codex-team/codex/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/codex-team/codex/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/codex-team/codex/git/refs{/sha}","trees_url":"https://api.github.com/repos/codex-team/codex/git/trees{/sha}","statuses_url":"https://api.github.com/repos/codex-team/codex/statuses/{sha}","languages_url":"https://api.github.com/repos/codex-team/codex/languages","stargazers_url":"https://api.github.com/repos/codex-team/codex/stargazers","contributors_url":"https://api.github.com/repos/codex-team/codex/contributors","subscribers_url":"https://api.github.com/repos/codex-team/codex/subscribers","subscription_url":"https://api.github.com/repos/codex-team/codex/subscription","commits_url":"https://api.github.com/repos/codex-team/codex/commits{/sha}","git_commits_url":"https://api.github.com/repos/codex-team/codex/git/commits{/sha}","comments_url":"https://api.github.com/repos/codex-team/codex/comments{/number}","issue_comment_url":"https://api.github.com/repos/codex-team/codex/issues/comments{/number}","contents_url":"https://api.github.com/repos/codex-team/codex/contents/{+path}","compare_url":"https://api.github.com/repos/codex-team/codex/compare/{base}...{head}","merges_url":"https://api.github.com/repos/codex-team/codex/merges","archive_url":"https://api.github.com/repos/codex-team/codex/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/codex-team/codex/downloads","issues_url":"https://api.github.com/repos/codex-team/codex/issues{/number}","pulls_url":"https://api.github.com/repos/codex-team/codex/pulls{/number}","milestones_url":"https://api.github.com/repos/codex-team/codex/milestones{/number}","notifications_url":"https://api.github.com/repos/codex-team/codex/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/codex-team/codex/labels{/name}","releases_url":"https://api.github.com/repos/codex-team/codex/releases{/id}","deployments_url":"https://api.github.com/repos/codex-team/codex/deployments","created_at":"2015-10-26T19:41:35Z","updated_at":"2016-01-25T14:39:23Z","pushed_at":"2016-03-05T21:18:05Z","git_url":"git://github.com/codex-team/codex.git","ssh_url":"git@github.com:codex-team/codex.git","clone_url":"https://github.com/codex-team/codex.git","svn_url":"https://github.com/codex-team/codex","homepage":"http://alpha.difual.com","size":30704,"stargazers_count":2,"watchers_count":2,"language":"PHP","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":5,"mirror_url":null,"open_issues_count":22,"forks":5,"open_issues":22,"watchers":2,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/codex-team/codex/pulls/144"},"html":{"href":"https://github.com/codex-team/codex/pull/144"},"issue":{"href":"https://api.github.com/repos/codex-team/codex/issues/144"},"comments":{"href":"https://api.github.com/repos/codex-team/codex/issues/144/comments"},"review_comments":{"href":"https://api.github.com/repos/codex-team/codex/pulls/144/comments"},"review_comment":{"href":"https://api.github.com/repos/codex-team/codex/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/codex-team/codex/pulls/144/commits"},"statuses":{"href":"https://api.github.com/repos/codex-team/codex/statuses/84bb830f043fe89fad94f23b7893a651e81db4bd"}}}}