{"id":19168906,"url":"https://github.com/steveleetn91/php-user-pattern","last_synced_at":"2025-07-08T09:35:43.773Z","repository":{"id":45446676,"uuid":"275227358","full_name":"steveleetn91/php-user-pattern","owner":"steveleetn91","description":"User Pattern Of PHP","archived":false,"fork":false,"pushed_at":"2021-12-14T03:04:53.000Z","size":1521,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-01-03T23:24:34.267Z","etag":null,"topics":["design-patterns","hoanglee","oops","oops-in-php","php","php7","phpcore","phpcore-framework","stevelee","vietnam"],"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/steveleetn91.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2020-06-26T18:59:28.000Z","updated_at":"2022-02-12T13:44:48.000Z","dependencies_parsed_at":"2022-07-15T15:30:47.623Z","dependency_job_id":null,"html_url":"https://github.com/steveleetn91/php-user-pattern","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/steveleetn91%2Fphp-user-pattern","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/steveleetn91%2Fphp-user-pattern/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/steveleetn91%2Fphp-user-pattern/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/steveleetn91%2Fphp-user-pattern/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/steveleetn91","download_url":"https://codeload.github.com/steveleetn91/php-user-pattern/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":240250350,"owners_count":19771775,"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":["design-patterns","hoanglee","oops","oops-in-php","php","php7","phpcore","phpcore-framework","stevelee","vietnam"],"created_at":"2024-11-09T09:44:17.215Z","updated_at":"2025-02-22T23:41:28.784Z","avatar_url":"https://github.com/steveleetn91.png","language":"PHP","readme":"\u003ca href=\"https://travis-ci.org/github/steveleetn91/php-user-pattern\"\u003e\n\u003cimg src=\"https://travis-ci.org/steveleetn91/php-user-pattern.svg?branch=master\"\u003e\n\u003c/a\u003e\n\n# Description\n This module will support create user with : name, age, location, level, todo. This module is Builder Pattern of PHP\n\n            -------- first build -------\n\n            Array ( [name] =\u003e Steve Lee [age] =\u003e 11 [location] =\u003e HCM, Viet Nam [level] =\u003e Technical Leader [todo] =\u003e Array ( [post] =\u003e Array ( [update] =\u003e 1 [delete] =\u003e 1 [create] =\u003e 1 [view_all] =\u003e 1 ) [page] =\u003e Array ( [update] =\u003e 1 [delete] =\u003e 1 [create] =\u003e 1 [view_all] =\u003e 1 ) [setting] =\u003e Array ( [update] =\u003e 1 [create] =\u003e 1 ) ) )\n\n            -------- next build -------\n\n            Array ( [name] =\u003e Steve Job [age] =\u003e 11 [location] =\u003e Silicon valley, US [level] =\u003e Technical Leader [todo] =\u003e Array ( [post] =\u003e Array ( [update] =\u003e 1 [delete] =\u003e [create] =\u003e 1 [view_all] =\u003e ) [page] =\u003e Array ( [update] =\u003e 1 [delete] =\u003e [create] =\u003e 1 [view_all] =\u003e ) [setting] =\u003e Array ( [update] =\u003e [create] =\u003e ) ) )\n\n            -------- next build -------\n\n            Array ( [name] =\u003e Bill gates [age] =\u003e 11 [location] =\u003e Silicon valley, US [level] =\u003e Technical Leader [todo] =\u003e Array ( [post] =\u003e Array ( [update] =\u003e 1 [delete] =\u003e [create] =\u003e 1 [view_all] =\u003e ) [page] =\u003e Array ( [update] =\u003e 1 [delete] =\u003e [create] =\u003e 1 [view_all] =\u003e ) [setting] =\u003e Array ( [update] =\u003e [create] =\u003e ) ) )\n\n# install composer \n\u003ccode\u003ephp composer.phar install\u003c/code\u003e\n\n# Unit Test \n\n\u003ccode\u003e./vendor/bin/phpunit test/UserTest.php\u003c/code\u003e\n\n# How to use ? \n\n        try {\n            require_once dirname(__FILE__) . '/UserBuilder.php';\n            $admin = new UserBuilder;\n            $admin-\u003esetName('Steve Lee')\n                -\u003esetAge(11)\n                -\u003esetLocation('HCM, Viet Nam')\n                -\u003esetLevel('Technical Leader')\n                -\u003esetTodo('admin');\n            print_r('\u003cbr/\u003e-------- first build ------- \u003cbr/\u003e');\n            print_r($admin-\u003ebuild());\n            print_r('\u003cbr/\u003e-------- next build ------- \u003cbr/\u003e');\n            $admin-\u003esetName('Steve Jobs')\n                -\u003esetLocation('Silicon valley, US')\n                -\u003esetTodo('member');\n            print_r($admin-\u003ebuild());\n            print_r('\u003cbr/\u003e-------- next build ------- \u003cbr/\u003e');\n            $admin-\u003esetName('Bill Gates')\n                -\u003esetTodo('member');\n            print_r($admin-\u003ebuild());\n        } catch (\\Exception $e) {\n            echo \"Debug\u003cbr/\u003e\";\n            print_r($e);\n        }\n\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsteveleetn91%2Fphp-user-pattern","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsteveleetn91%2Fphp-user-pattern","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsteveleetn91%2Fphp-user-pattern/lists"}