{"id":20011216,"url":"https://github.com/qqphp/zentaopms-php-sdk","last_synced_at":"2026-05-13T09:32:45.792Z","repository":{"id":166676849,"uuid":"224561288","full_name":"qqphp/zentaopms-php-sdk","owner":"qqphp","description":"禅道项目管理软件是国产的开源项目管理软件,专注研发项目管理,内置需求管理、任务管理、bug管理、缺陷管理、用例管理、计划发布等功能,实现了软件的完整生命周期管理。","archived":false,"fork":false,"pushed_at":"2020-04-19T15:54:04.000Z","size":10,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"master","last_synced_at":"2025-03-02T02:16:06.750Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/qqphp.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2019-11-28T03:18:30.000Z","updated_at":"2020-04-19T15:54:06.000Z","dependencies_parsed_at":"2023-06-01T15:15:44.323Z","dependency_job_id":null,"html_url":"https://github.com/qqphp/zentaopms-php-sdk","commit_stats":null,"previous_names":["qqphp/zentaopms-php-sdk"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/qqphp/zentaopms-php-sdk","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/qqphp%2Fzentaopms-php-sdk","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/qqphp%2Fzentaopms-php-sdk/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/qqphp%2Fzentaopms-php-sdk/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/qqphp%2Fzentaopms-php-sdk/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/qqphp","download_url":"https://codeload.github.com/qqphp/zentaopms-php-sdk/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/qqphp%2Fzentaopms-php-sdk/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32976362,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-13T06:31:55.726Z","status":"ssl_error","status_checked_at":"2026-05-13T06:31:51.336Z","response_time":115,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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":[],"created_at":"2024-11-13T07:24:49.134Z","updated_at":"2026-05-13T09:32:45.770Z","avatar_url":"https://github.com/qqphp.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"### 使用说明与示例\n\u003e 本篇介绍如何在 PHP 项目中调用禅道 SDK ,以下以 zentaoPHP、Tinkphp5、Laravel6 框架作为演示示例。\n\n#### 简介\n - **禅道SDK-文档地址：** `https://www.zentao.net/book/api/setting-369.html`\n - 使用 SDK 之前，需要在引用的禅道 SDK 文件中填写一些必要配置信息。以下有三个使用参考示例，实际使用需根据实际项目情况进行调用。\n\n#### 配置禅道SDK信息\n```\n//禅道部署域名\nconst ztUrl       = 'http://www.zentao.com';\n//禅道登录账户\nconst ztAccount   = 'admin';\n//禅道登录密码\nconst ztPassword  = '123456';\n//禅道参数请求方式[ GET | PATH_INFO ]\nconst requestType = 'PATH_INFO';\n```\n\n#### 1.zentaoPHP 框架中引用 SDK 文件\n - 以下是 zentaoPHP 框架中调用禅道 SDK 文件获取部门列表的示例。SDK 文件可根据实际项目开发采用多种不同方式调用，不限定于示例中的一种。\n\n```\npublic function deptBrowse()\n{\n    include_once('../../tools/zentao/zentao.php');\n    $zentao = new zentao();\n    $params = array(\n        'deptID' =\u003e 1\n    );\n    $result = $zentao-\u003edeptBrowse($params);\n    echo $result;\n}\n```\n\n#### 2.ThinkPHP 框架中引用 SDK 文件\n - 以下是 ThinkPHP5 框架中调用禅道 SDK 文件获取部门列表的示例。SDK 文件可根据实际项目开发采用多种不同方式调用，不限定于示例中的一种。\n\n ```\npublic function deptBrowse()\n{\n    include_once('../vendor/zentao/zentao.php');\n    $zentao = new \\zentao();\n    $params = array(\n        'deptID' =\u003e 1\n    );\n    $result = $zentao-\u003edeptBrowse($params);\n    return $result;\n}\n ```\n\n#### 3. Laravel 框架中引用 SDK 文件\n - 以下是 Laravel6 框架中调用禅道 SDK 文件获取部门列表的示例。在 Laravel 中引用 禅道 SDK 文件后，还需引用 SDK 的命名空间才能使用。SDK 文件可根据实际项目开发采用多种不同方式调用，不限定于示例中的一种。\n\n ```\nuse zentao\\zentao\\zentao;\n\nclass IndexController\n{\n    public function deptBrowse()\n    {\n        require_once('../vendor/zentao/zentao.php');\n        $zt     = new zentao();\n        $params = array(\n            'deptID' =\u003e 1\n        );\n        $result = $zt-\u003edeptBrowse($params);\n        return $result;\n    }\n}\n ```\n\n#### 返回结果示例\n\n```\n{\n    \"status\": 1,\n    \"msg\": \"success\",\n    \"result\": {\n        \"title\": \"维护部门-LeiYong-禅道项目管理\",\n        \"deptID\": \"1\",\n        \"parentDepts\": [\n            {\n                \"id\": \"1\",\n                \"name\": \"经理\",\n                \"parent\": \"0\",\n                \"path\": \",1,\",\n                \"grade\": \"1\",\n                \"order\": \"0\",\n                \"position\": \"\",\n                \"function\": \"\",\n                \"manager\": \"\"\n            }\n        ],\n        \"sons\": [\n            {\n                \"id\": \"11\",\n                \"name\": \"产品经理\",\n                \"parent\": \"1\",\n                \"path\": \",1,11,\",\n                \"grade\": \"2\",\n                \"order\": \"10\",\n                \"position\": \"\",\n                \"function\": \"\",\n                \"manager\": \"\"\n            },\n            {\n                \"id\": \"12\",\n                \"name\": \"项目经理\",\n                \"parent\": \"1\",\n                \"path\": \",1,12,\",\n                \"grade\": \"2\",\n                \"order\": \"20\",\n                \"position\": \"\",\n                \"function\": \"\",\n                \"manager\": \"\"\n            }\n        ],\n        \"tree\": [\n            {\n                \"id\": \"1\",\n                \"name\": \"经理\",\n                \"parent\": \"0\",\n                \"path\": \",1,\",\n                \"grade\": \"1\",\n                \"order\": \"0\",\n                \"position\": \"\",\n                \"function\": \"\",\n                \"manager\": \"\",\n                \"managerName\": \"\",\n                \"children\": [\n                    {\n                        \"id\": \"11\",\n                        \"name\": \"产品经理\",\n                        \"parent\": \"1\",\n                        \"path\": \",1,11,\",\n                        \"grade\": \"2\",\n                        \"order\": \"10\",\n                        \"position\": \"\",\n                        \"function\": \"\",\n                        \"manager\": \"\",\n                        \"managerName\": \"\"\n                    },\n                    {\n                        \"id\": \"12\",\n                        \"name\": \"项目经理\",\n                        \"parent\": \"1\",\n                        \"path\": \",1,12,\",\n                        \"grade\": \"2\",\n                        \"order\": \"20\",\n                        \"position\": \"\",\n                        \"function\": \"\",\n                        \"manager\": \"\",\n                        \"managerName\": \"\"\n                    }\n                ],\n                \"actions\": {\n                    \"delete\": false\n                }\n            },\n            {\n                \"id\": \"2\",\n                \"name\": \"开发\",\n                \"parent\": \"0\",\n                \"path\": \",2,\",\n                \"grade\": \"1\",\n                \"order\": \"1\",\n                \"position\": \"\",\n                \"function\": \"\",\n                \"manager\": \"\",\n                \"managerName\": \"\"\n            },\n            {\n                \"id\": \"3\",\n                \"name\": \"测试\",\n                \"parent\": \"0\",\n                \"path\": \",3,\",\n                \"grade\": \"1\",\n                \"order\": \"2\",\n                \"position\": \"\",\n                \"function\": \"\",\n                \"manager\": \"\",\n                \"managerName\": \"\"\n            },\n            {\n                \"id\": \"4\",\n                \"name\": \"市场\",\n                \"parent\": \"0\",\n                \"path\": \",4,\",\n                \"grade\": \"1\",\n                \"order\": \"3\",\n                \"position\": \"\",\n                \"function\": \"\",\n                \"manager\": \"\",\n                \"managerName\": \"\"\n            },\n            {\n                \"id\": \"8\",\n                \"name\": \"客户\",\n                \"parent\": \"0\",\n                \"path\": \",8,\",\n                \"grade\": \"1\",\n                \"order\": \"13\",\n                \"position\": \"\",\n                \"function\": \"\",\n                \"manager\": \"\",\n                \"managerName\": \"\"\n            }\n        ]\n    }\n}\n```","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fqqphp%2Fzentaopms-php-sdk","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fqqphp%2Fzentaopms-php-sdk","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fqqphp%2Fzentaopms-php-sdk/lists"}