{"id":40655000,"url":"https://github.com/kcloze/ycf","last_synced_at":"2026-01-21T08:51:58.144Z","repository":{"id":57005099,"uuid":"58054354","full_name":"kcloze/ycf","owner":"kcloze","description":"基于swoole的微型框架，专为api业务场景设计","archived":false,"fork":false,"pushed_at":"2016-05-27T09:13:03.000Z","size":33,"stargazers_count":3,"open_issues_count":0,"forks_count":2,"subscribers_count":4,"default_branch":"master","last_synced_at":"2024-04-22T03:47:24.870Z","etag":null,"topics":["api","cli","swoole"],"latest_commit_sha":null,"homepage":"","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/kcloze.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}},"created_at":"2016-05-04T13:29:12.000Z","updated_at":"2017-05-01T03:47:48.000Z","dependencies_parsed_at":"2022-08-21T12:40:38.927Z","dependency_job_id":null,"html_url":"https://github.com/kcloze/ycf","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/kcloze/ycf","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kcloze%2Fycf","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kcloze%2Fycf/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kcloze%2Fycf/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kcloze%2Fycf/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/kcloze","download_url":"https://codeload.github.com/kcloze/ycf/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kcloze%2Fycf/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28630933,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-21T04:47:28.174Z","status":"ssl_error","status_checked_at":"2026-01-21T04:47:22.943Z","response_time":86,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: 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":["api","cli","swoole"],"created_at":"2026-01-21T08:51:55.060Z","updated_at":"2026-01-21T08:51:58.138Z","avatar_url":"https://github.com/kcloze.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"## ycf framework\n\n\n* a very simple,micro PHP framework \n* it can be run in Cli,PHP-FPM,Swoole\n* composer install and name space auto load\n* a solution for micro-services and blazing fast APIs\n\n\n## Requirements\n\n* PHP 5.3+\n\n\n## Installation\n\n1. git clone https://github.com/kcloze/ycf.git your-app\n2. cd your-app and run: composer install\n2. chmod -R 777 src/runtime/\n3. edit src/config/settings.ini.php for mysql config or redis,add test table(https://github.com/kcloze/ycf/blob/master/pdo_test.sql)\n\n## How to run\n\n###php-fpm  \nrun in php-fpm: Open your browser and enter http://youhost/index.php?ycf=hello\u0026act=hello\n\nif set nginx as follow,url can be simple: http://youhost/hello/hello\n\n```\n        location / {\n                if (!-e $request_filename){\n                         rewrite ^/(.*) /index.php last;\n                 }\n        }\n\n```\n\n###cli\n####run in cli: \n* php index.php ycf=hello act=hello\n\n###swoole\nrun with swoole:  \n * php env in you path \n * chmod u+x server.sh\n * ./server.sh\n\n\n## Documentation\n * in src/service/ ,you can add your business code here\n * Naming Conventions: \n * ---service class name :YcfYourname.php\n * ---method name : public static function actionYourname()\n * [DB Class Use](doc/db.md)\n * if you need redis,shoud install phpredis extention(https://github.com/phpredis/phpredis)\n\n##How to use Task\n```\npublic function actionTask()\n    {\n        // send a task to task worker.\n        $param = array(\n            'action' =\u003e 'test',\n            'time'   =\u003e time(),\n        );\n        //var_dump(HttpServer::getInstance()-\u003ehttp);\n        //$this-\u003ehttp-\u003etask(json_encode($param));\n        for ($i = 0; $i \u003c 1; $i++) {\n            $taskId = YcfCore::$_http_server-\u003etask(json_encode($param));\n        }\n        echo $taskId . \" hello ycf\" . time();\n\n    }\n```\n\n## Benchmarks\n[benchmarks](doc/benchmarks.md)\n\n\n## Community\nmail: pei.greet@gmail.com\nqq群: 141059677\n\n\n##License\nThe ycf framework is open-sourced software licensed under the MIT license\n\n\n\n\n\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkcloze%2Fycf","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fkcloze%2Fycf","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkcloze%2Fycf/lists"}