public function hydrate(array $data, HydratorRegistry $hydratorRegistry)
 {
     $template = new Template();
     $template->name = $hydratorRegistry->extractValue($data, 'name');
     $template->source = $hydratorRegistry->extractValue($data, 'source');
     return $template;
 }
 public function hydrate(array $data, HydratorRegistry $hydratorRegistry)
 {
     $simplePublicKey = new SimplePublicKey();
     $simplePublicKey->id = $hydratorRegistry->extractValue($data, 'id');
     $simplePublicKey->key = $hydratorRegistry->extractValue($data, 'key');
     return $simplePublicKey;
 }
예제 #3
0
 public function hydrate(array $data, HydratorRegistry $hydratorRegistry)
 {
     $config = new Config();
     $config->contentType = $hydratorRegistry->extractValue($data, 'content_type');
     $config->url = $hydratorRegistry->extractValue($data, 'url');
     return $config;
 }
 public function hydrate(array $data, HydratorRegistry $hydratorRegistry)
 {
     $commitInfo = new CommitParent();
     $commitInfo->url = $hydratorRegistry->extractValue($data, 'url');
     $commitInfo->sha = $hydratorRegistry->extractValue($data, 'sha');
     return $commitInfo;
 }
 public function hydrate(array $data, HydratorRegistry $hydratorRegistry)
 {
     $accessResponse = new AccessResponse();
     $accessResponse->accessToken = $hydratorRegistry->extractValue($data, 'access_token');
     $accessResponse->scope = $hydratorRegistry->extractValue($data, 'scope');
     $accessResponse->tokenType = $hydratorRegistry->extractValue($data, 'token_type');
     return $accessResponse;
 }
 public function hydrate(array $data, HydratorRegistry $hydratorRegistry)
 {
     $commitInfo = new UserEmail();
     $commitInfo->email = $hydratorRegistry->extractValue($data, 'email');
     $commitInfo->primary = $hydratorRegistry->extractValue($data, 'primary');
     $commitInfo->verified = $hydratorRegistry->extractValue($data, 'verified');
     return $commitInfo;
 }
 public function hydrate(array $data, HydratorRegistry $hydratorRegistry)
 {
     $repoStatsCodeInfo = new RepoStatsCodeInfo();
     $repoStatsCodeInfo->startOfWeek = $hydratorRegistry->extractValue($data, 0);
     $repoStatsCodeInfo->additions = $hydratorRegistry->extractValue($data, 1);
     $repoStatsCodeInfo->deletions = $hydratorRegistry->extractValue($data, 1);
     return $repoStatsCodeInfo;
 }
 public function hydrate(array $data, HydratorRegistry $hydratorRegistry)
 {
     $tagObject = new TagObject();
     $tagObject->url = $hydratorRegistry->extractValue($data, 'url');
     $tagObject->sha = $hydratorRegistry->extractValue($data, 'sha');
     $tagObject->type = $hydratorRegistry->extractValue($data, 'type');
     return $tagObject;
 }
예제 #9
0
 public function hydrate(array $data, HydratorRegistry $hydratorRegistry)
 {
     $app = new App();
     $app->clientId = $hydratorRegistry->extractValue($data, 'client_id');
     $app->name = $hydratorRegistry->extractValue($data, 'name');
     $app->url = $hydratorRegistry->extractValue($data, 'url');
     return $app;
 }
 public function hydrate(array $data, HydratorRegistry $hydratorRegistry)
 {
     $commitInfo = new RefObject();
     $commitInfo->sha = $hydratorRegistry->extractValue($data, 'sha');
     $commitInfo->type = $hydratorRegistry->extractValue($data, 'type');
     $commitInfo->url = $hydratorRegistry->extractValue($data, 'url');
     return $commitInfo;
 }
 public function hydrate(array $data, HydratorRegistry $hydratorRegistry)
 {
     $punchCardInfo = new RepoStatsPunchCardInfo();
     $punchCardInfo->day = $hydratorRegistry->extractValue($data, 0);
     $punchCardInfo->hour = $hydratorRegistry->extractValue($data, 1);
     $punchCardInfo->numberCommits = $hydratorRegistry->extractValue($data, 2);
     return $punchCardInfo;
 }
 public function hydrate(array $data, HydratorRegistry $hydratorRegistry)
 {
     $repoStatsCommitActivity = new RepoStatsCommitActivityChild();
     $repoStatsCommitActivity->total = $hydratorRegistry->extractValue($data, 'total');
     $repoStatsCommitActivity->week = $hydratorRegistry->extractValue($data, 'week');
     //TODO - check is array
     $repoStatsCommitActivity->days = $hydratorRegistry->extractValue($data, 'days');
     return $repoStatsCommitActivity;
 }
예제 #13
0
 public function hydrate(array $data, HydratorRegistry $hydratorRegistry)
 {
     $ref = new Ref();
     $refObjectData = $hydratorRegistry->extractValue($data, 'object');
     $ref->refObject = $hydratorRegistry->instantiateClass('GithubService\\Model\\RefObject', $refObjectData);
     $ref->ref = $hydratorRegistry->extractValue($data, 'ref');
     $ref->url = $hydratorRegistry->extractValue($data, 'url');
     return $ref;
 }
예제 #14
0
 public function hydrate(array $data, HydratorRegistry $hydratorRegistry)
 {
     $blob = new Pages();
     $blob->cname = $hydratorRegistry->extractValue($data, 'cname');
     $blob->custom404 = $hydratorRegistry->extractValue($data, 'custom_404');
     $blob->status = $hydratorRegistry->extractValue($data, 'status');
     $blob->url = $hydratorRegistry->extractValue($data, 'url');
     return $blob;
 }
예제 #15
0
 public function hydrate(array $data, HydratorRegistry $hydratorRegistry)
 {
     $tag = new Tag();
     $commit = $hydratorRegistry->extractValue($data, 'commit');
     $tag->commit = $hydratorRegistry->instantiateClass('GithubService\\Model\\BlobAfterCreate', $commit);
     $tag->name = $hydratorRegistry->extractValue($data, 'name');
     $tag->tarballUrl = $hydratorRegistry->extractValue($data, 'tarball_url');
     $tag->zipballUrl = $hydratorRegistry->extractValue($data, 'zipball_url');
     return $tag;
 }
예제 #16
0
 public function hydrate(array $data, HydratorRegistry $hydratorRegistry)
 {
     $blob = new Blob();
     $blob->content = $hydratorRegistry->extractValue($data, 'content');
     $blob->encoding = $hydratorRegistry->extractValue($data, 'encoding');
     $blob->sha = $hydratorRegistry->extractValue($data, 'sha');
     $blob->size = $hydratorRegistry->extractValue($data, 'size');
     $blob->url = $hydratorRegistry->extractValue($data, 'url');
     return $blob;
 }
예제 #17
0
 public function hydrate(array $data, HydratorRegistry $hydratorRegistry)
 {
     $ref = new GistFork();
     $ref->createdAt = $hydratorRegistry->extractValue($data, 'created_at');
     $ref->id = $hydratorRegistry->extractValue($data, 'id');
     $ref->updatedAt = $hydratorRegistry->extractValue($data, 'updated_at');
     $ref->url = $hydratorRegistry->extractValue($data, 'url');
     $user = $hydratorRegistry->extractValue($data, 'user');
     $ref->user = $hydratorRegistry->instantiateClass('GithubService\\Model\\User', $user);
     return $ref;
 }
 public function hydrate(array $data, HydratorRegistry $hydratorRegistry)
 {
     $repoSubscription = new SearchRepos();
     $repoSubscription->totalCount = $hydratorRegistry->extractValue($data, 'total_count');
     $repoSubscription->incompleteResults = $hydratorRegistry->extractValue($data, 'incomplete_results');
     $repositories = $hydratorRegistry->extractValue($data, 'items');
     foreach ($repositories as $repository) {
         $repoSubscription->repoList[] = $hydratorRegistry->instantiateClass('GithubService\\Model\\SearchRepoItem', $repository);
     }
     return $repoSubscription;
 }
예제 #19
0
 public function hydrate(array $data, HydratorRegistry $hydratorRegistry)
 {
     $meta = new Meta();
     $meta->githubServicesSha = $hydratorRegistry->extractValue($data, 'github_services_sha');
     $meta->verifiablePasswordAuthentication = $hydratorRegistry->extractValue($data, 'verifiable_password_authentication');
     $git = $hydratorRegistry->extractValue($data, 'git');
     //TODO - check valid array
     $meta->git = $git;
     $hooks = $hydratorRegistry->extractValue($data, 'hooks');
     //TODO - check valid array
     $meta->hooks = $hooks;
     return $meta;
 }
예제 #20
0
 public function hydrate(array $data, HydratorRegistry $hydratorRegistry)
 {
     $fileList = new FileList();
     foreach ($data as $key => $value) {
         $name = $key;
         $language = $hydratorRegistry->extractValue($value, 'language');
         $rawURL = $hydratorRegistry->extractValue($value, 'raw_url');
         $size = $hydratorRegistry->extractValue($value, 'size');
         $truncated = $hydratorRegistry->extractValue($value, 'truncated');
         $type = $hydratorRegistry->extractValue($value, 'type');
         $fileList->files[] = new File($name, $language, $rawURL, $size, $truncated, $type);
     }
     return $fileList;
 }
 public function hydrate(array $data, HydratorRegistry $hydratorRegistry)
 {
     $repoSearchItem = new SymlinkContent();
     $repoSearchItem->downloadUrl = $hydratorRegistry->extractValue($data, 'download_url');
     $repoSearchItem->gitUrl = $hydratorRegistry->extractValue($data, 'git_url');
     $repoSearchItem->htmlUrl = $hydratorRegistry->extractValue($data, 'html_url');
     $repoSearchItem->name = $hydratorRegistry->extractValue($data, 'name');
     $repoSearchItem->path = $hydratorRegistry->extractValue($data, 'path');
     $repoSearchItem->sha = $hydratorRegistry->extractValue($data, 'sha');
     $repoSearchItem->size = $hydratorRegistry->extractValue($data, 'size');
     $repoSearchItem->target = $hydratorRegistry->extractValue($data, 'target');
     $repoSearchItem->type = $hydratorRegistry->extractValue($data, 'type');
     $repoSearchItem->url = $hydratorRegistry->extractValue($data, 'url');
     return $repoSearchItem;
 }
 public function hydrate(array $data, HydratorRegistry $hydratorRegistry)
 {
     $submoduleContent = new SubmoduleContent();
     $submoduleContent->downloadUrl = $hydratorRegistry->extractValue($data, 'download_url');
     $submoduleContent->gitUrl = $hydratorRegistry->extractValue($data, 'git_url');
     $submoduleContent->htmlUrl = $hydratorRegistry->extractValue($data, 'html_url');
     $submoduleContent->name = $hydratorRegistry->extractValue($data, 'name');
     $submoduleContent->path = $hydratorRegistry->extractValue($data, 'path');
     $submoduleContent->sha = $hydratorRegistry->extractValue($data, 'sha');
     $submoduleContent->size = $hydratorRegistry->extractValue($data, 'size');
     $submoduleContent->submoduleGitUrl = $hydratorRegistry->extractValue($data, 'submodule_git_url');
     $submoduleContent->type = $hydratorRegistry->extractValue($data, 'type');
     $submoduleContent->url = $hydratorRegistry->extractValue($data, 'url');
     return $submoduleContent;
 }
 public function hydrate(array $data, HydratorRegistry $hydratorRegistry)
 {
     $commitInfo = new CommitInfo();
     $commitInfo->url = $hydratorRegistry->extractValue($data, 'url');
     $commitInfo->authorName = $hydratorRegistry->extractValueByPath($data, ['author', 'name']);
     $commitInfo->authorEmail = $hydratorRegistry->extractValueByPath($data, ['author', 'email']);
     $commitInfo->authorDate = $hydratorRegistry->extractValueByPath($data, ['author', 'date']);
     $commitInfo->committerName = $hydratorRegistry->extractValueByPath($data, ['committer', 'name']);
     $commitInfo->committerEmail = $hydratorRegistry->extractValueByPath($data, ['committer', 'email']);
     $commitInfo->committerDate = $hydratorRegistry->extractValueByPath($data, ['committer', 'date']);
     $commitInfo->message = $hydratorRegistry->extractValue($data, 'message');
     $commitInfo->treeURL = $hydratorRegistry->extractValueByPath($data, ['tree', 'url']);
     $commitInfo->treeSHA = $hydratorRegistry->extractValueByPath($data, ['tree', 'sha']);
     $commitInfo->commentCount = $hydratorRegistry->extractValue($data, 'comment_count', true);
     return $commitInfo;
 }
 public function hydrate(array $data, HydratorRegistry $hydratorRegistry)
 {
     $blob = new BranchCommit();
     $blob->name = $hydratorRegistry->extractValue($data, 'name');
     $blob->url = $hydratorRegistry->extractValueByPath($data, ['commit', 'url']);
     $blob->sha = $hydratorRegistry->extractValueByPath($data, ['commit', 'sha']);
     return $blob;
 }
 public function hydrate(array $data, HydratorRegistry $hydratorRegistry)
 {
     $branches = new RepoSearchResults();
     $repositories = $hydratorRegistry->extractValue($data, 'repositories');
     $object = $hydratorRegistry->instantiateClass('GithubService\\Model\\Repositories', $repositories);
     $branches->repositories = $object;
     return $branches;
 }
 public function hydrate(array $data, HydratorRegistry $hydratorRegistry)
 {
     $emailSearchResults = new EmailSearchResults();
     foreach ($data as $key => $value) {
         $user = $hydratorRegistry->extractValue($data, 'user');
         $emailSearchResults->user = $hydratorRegistry->instantiateClass('GithubService\\Model\\UserInSearchResult', $user);
     }
     return $emailSearchResults;
 }
예제 #27
0
 public function hydrate(array $data, HydratorRegistry $hydratorRegistry)
 {
     $status = new Status();
     $status->context = $hydratorRegistry->extractValue($data, 'context');
     $status->createdAt = $hydratorRegistry->extractValue($data, 'created_at');
     $status->description = $hydratorRegistry->extractValue($data, 'description');
     $status->id = $hydratorRegistry->extractValue($data, 'id');
     $status->state = $hydratorRegistry->extractValue($data, 'state');
     $status->targetUrl = $hydratorRegistry->extractValue($data, 'target_url');
     $status->updatedAt = $hydratorRegistry->extractValue($data, 'updated_at');
     $status->url = $hydratorRegistry->extractValue($data, 'url');
     $creator = $hydratorRegistry->extractValue($data, 'creator', true);
     if ($creator !== null) {
         $status->creator = $hydratorRegistry->instantiateClass('GithubService\\Model\\User', $creator);
     }
     return $status;
 }
 public function hydrate(array $data, HydratorRegistry $hydratorRegistry)
 {
     $payload = new PagesBuild();
     $payload->commit = $hydratorRegistry->extractValue($data, 'commit');
     $payload->createdAt = $hydratorRegistry->extractValue($data, 'created_at');
     $payload->duration = $hydratorRegistry->extractValue($data, 'duration');
     $payload->status = $hydratorRegistry->extractValue($data, 'status');
     $payload->updatedAt = $hydratorRegistry->extractValue($data, 'updated_at');
     $payload->url = $hydratorRegistry->extractValue($data, 'url');
     $error = $hydratorRegistry->extractValue($data, 'error');
     $payload->error = $hydratorRegistry->instantiateClass('GithubService\\Model\\IndexingSuccess', $error);
     $pusher = $hydratorRegistry->extractValue($data, 'pusher');
     $payload->pusher = $hydratorRegistry->instantiateClass('GithubService\\Model\\User', $pusher);
     return $payload;
 }
 public function hydrate(array $data, HydratorRegistry $hydratorRegistry)
 {
     $issueComment = new IssueComment();
     $issueComment->body = $hydratorRegistry->extractValue($data, 'body');
     $issueComment->createdAt = $hydratorRegistry->extractValue($data, 'created_at');
     $issueComment->htmlUrl = $hydratorRegistry->extractValue($data, 'html_url');
     $issueComment->id = $hydratorRegistry->extractValue($data, 'id');
     $issueComment->updatedAt = $hydratorRegistry->extractValue($data, 'updated_at');
     $issueComment->url = $hydratorRegistry->extractValue($data, 'url');
     $user = $hydratorRegistry->extractValue($data, 'user');
     $issueComment->user = $hydratorRegistry->instantiateClass('GithubService\\Model\\User', $user);
     return $issueComment;
 }
 public function hydrate(array $data, HydratorRegistry $hydratorRegistry)
 {
     $subscription = new Subscription();
     $subscription->createdAt = $hydratorRegistry->extractValue($data, 'created_at');
     $subscription->ignored = $hydratorRegistry->extractValue($data, 'ignored');
     $subscription->reason = $hydratorRegistry->extractValue($data, 'reason');
     $subscription->subscribed = $hydratorRegistry->extractValue($data, 'subscribed');
     $subscription->threadUrl = $hydratorRegistry->extractValue($data, 'thread_url');
     $subscription->url = $hydratorRegistry->extractValue($data, 'url');
     return $subscription;
 }