{"id":21421956,"url":"https://github.com/pgyf/php-utils","last_synced_at":"2025-03-16T20:20:26.413Z","repository":{"id":57041039,"uuid":"287191446","full_name":"pgyf/php-utils","owner":"pgyf","description":"php积累的一些公用类方法","archived":false,"fork":false,"pushed_at":"2021-04-08T02:21:09.000Z","size":31,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-01-23T06:45:11.814Z","etag":null,"topics":["common","php","php-utils","utils"],"latest_commit_sha":null,"homepage":"","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/pgyf.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":"2020-08-13T05:40:51.000Z","updated_at":"2021-04-08T02:21:11.000Z","dependencies_parsed_at":"2022-08-23T23:30:49.969Z","dependency_job_id":null,"html_url":"https://github.com/pgyf/php-utils","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pgyf%2Fphp-utils","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pgyf%2Fphp-utils/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pgyf%2Fphp-utils/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pgyf%2Fphp-utils/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/pgyf","download_url":"https://codeload.github.com/pgyf/php-utils/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243925990,"owners_count":20369914,"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":["common","php","php-utils","utils"],"created_at":"2024-11-22T20:41:00.002Z","updated_at":"2025-03-16T20:20:26.393Z","avatar_url":"https://github.com/pgyf.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"# php-utils\nphp积累的一些公用类方法\n\n# 环境支持\n\nphp版本 \u003e= PHP 7.1\n\n安装\n------------\n\n```\ncomposer require phpyii/php-utils\n\n//开发版本\ncomposer require phpyii/php-utils:dev-master\n\n```\n\n# 枚举类使用方法\n\n   ```php\n    class  statusEnum extends \\phpyii\\utils\\Enum{\n         const VIEW = 'view';\n         const EDIT = 'edit';\n\n         protected static function labels(): array {\n             return [\n                 self::VIEW =\u003e '视图',\n             ];\n         }\n\n    }\n\n    \n    \n    //枚举值\n    $viewAction = statusEnum::VIEW();\n    $viewAction-\u003egetValue();\n    //或者\n    statusEnum::VIEW;\n\n    //获取枚举label\n    statusEnum::getLabelByValue(statusEnum::VIEW);\n\n    //获取枚举 值=\u003elabel数组\n    statusEnum::toArray();\n\n   ```\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpgyf%2Fphp-utils","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpgyf%2Fphp-utils","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpgyf%2Fphp-utils/lists"}