{"id":14971252,"url":"https://github.com/zacksleo/yii-gitlab-error-behavior","last_synced_at":"2026-02-28T07:03:43.521Z","repository":{"id":57089037,"uuid":"86339273","full_name":"zacksleo/yii-gitlab-error-behavior","owner":"zacksleo","description":"gitlab error behavior for yii1","archived":false,"fork":false,"pushed_at":"2017-04-29T16:20:57.000Z","size":9,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-01-04T20:43:34.224Z","etag":null,"topics":["gitlab","yii","yii-extension","yii-gitlab-error-bahavior"],"latest_commit_sha":null,"homepage":null,"language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/zacksleo.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2017-03-27T13:34:08.000Z","updated_at":"2018-01-20T15:44:31.000Z","dependencies_parsed_at":"2022-08-20T15:30:25.095Z","dependency_job_id":null,"html_url":"https://github.com/zacksleo/yii-gitlab-error-behavior","commit_stats":null,"previous_names":[],"tags_count":7,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zacksleo%2Fyii-gitlab-error-behavior","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zacksleo%2Fyii-gitlab-error-behavior/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zacksleo%2Fyii-gitlab-error-behavior/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zacksleo%2Fyii-gitlab-error-behavior/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/zacksleo","download_url":"https://codeload.github.com/zacksleo/yii-gitlab-error-behavior/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":240298400,"owners_count":19779280,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["gitlab","yii","yii-extension","yii-gitlab-error-bahavior"],"created_at":"2024-09-24T13:44:55.635Z","updated_at":"2026-02-28T07:03:38.485Z","avatar_url":"https://github.com/zacksleo.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"# yii-gitlab-error-behavior\ngitlab error behavior for yii1\n\n\n\n[![Latest Stable Version](https://poser.pugx.org/zacksleo/yii-gitlab-error-behavior/version)](https://packagist.org/packages/zacksleo/yii-gitlab-error-behavior)\n[![Total Downloads](https://poser.pugx.org/zacksleo/yii-gitlab-error-behavior/downloads)](https://packagist.org/packages/zacksleo/yii-gitlab-error-behavior)\n[![License](https://poser.pugx.org/zacksleo/yii-gitlab-error-behavior/license)](https://packagist.org/packages/zacksleo/yii-gitlab-error-behavior)\n\n\n## Usage\n\n### Install By Composer\n\n```\n  composer require zacksleo/yii-gitlab-error-behavior --prefer-dist \n  \n```\n\n### set component\n\n```\n    'errorHandler' =\u003e [\n        'errorAction' =\u003e 'site/error',\n    ],\n\n```\n### set behavior in SiteController\n\nset apiRoot, privateToken and projectName\n\n```\n    public function behaviors()\n    {\n        return array(\n            'error' =\u003e array(\n                'class' =\u003e 'webroot.vendor.zacksleo.yii-gitlab-error-behavior.src.ErrorBehavior',\n                'apiRoot' =\u003e 'http://gitlab.com/api/v3/',\n                'privateToken' =\u003e '{privateToken}',\n                'projectName' =\u003e '{demo/project}'\n            )\n        );\n    }   \n    \n    public function onBeforeAction($event)\n    {\n        $this-\u003eraiseEvent('onBeforeAction', $event);\n    }    \n\n\n    public function actionError()\n    {\n        if ($error = Yii::app()-\u003eerrorHandler-\u003eerror) {\n            $this-\u003eonBeforeAction(new CEvent($this));            \n            $this-\u003erenderPartial('error', $error);            \n        }\n    }\n\n```\n\n## Screenshoot\n\n![](http://ww1.sinaimg.cn/large/675eb504gy1fe0mhspoo6j212706vabc.jpg)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzacksleo%2Fyii-gitlab-error-behavior","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fzacksleo%2Fyii-gitlab-error-behavior","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzacksleo%2Fyii-gitlab-error-behavior/lists"}