{"id":18551994,"url":"https://github.com/baraja-core/country","last_synced_at":"2026-01-30T00:49:29.806Z","repository":{"id":46767850,"uuid":"343840399","full_name":"baraja-core/country","owner":"baraja-core","description":"Country management package with Doctrine entities and flag (🏳️‍🌈) support.","archived":false,"fork":false,"pushed_at":"2024-07-10T04:49:47.000Z","size":266,"stargazers_count":1,"open_issues_count":1,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-24T13:04:48.799Z","etag":null,"topics":["country","country-emoji","country-flag","country-management","emoji-flag","entity","flag","internationalization","locale","localization","state"],"latest_commit_sha":null,"homepage":"https://php.baraja.cz","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/baraja-core.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":".github/funding.yml","license":"LICENSE","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},"funding":{"github":"janbarasek","custom":["https://brj.app","https://baraja.cz","https://php.baraja.cz"]}},"created_at":"2021-03-02T16:32:13.000Z","updated_at":"2024-06-09T20:36:23.000Z","dependencies_parsed_at":"2024-06-09T21:45:12.599Z","dependency_job_id":"7e26dc22-66b4-43b4-988c-e4296aabbe71","html_url":"https://github.com/baraja-core/country","commit_stats":{"total_commits":28,"total_committers":2,"mean_commits":14.0,"dds":0.0357142857142857,"last_synced_commit":"6555ce4407376c52775d90fd73c0b070b27281cb"},"previous_names":[],"tags_count":8,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/baraja-core%2Fcountry","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/baraja-core%2Fcountry/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/baraja-core%2Fcountry/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/baraja-core%2Fcountry/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/baraja-core","download_url":"https://codeload.github.com/baraja-core/country/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248123678,"owners_count":21051511,"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":["country","country-emoji","country-flag","country-management","emoji-flag","entity","flag","internationalization","locale","localization","state"],"created_at":"2024-11-06T21:11:28.214Z","updated_at":"2026-01-30T00:49:29.738Z","avatar_url":"https://github.com/baraja-core.png","language":"PHP","funding_links":["https://github.com/sponsors/janbarasek","https://brj.app","https://baraja.cz","https://php.baraja.cz"],"categories":[],"sub_categories":[],"readme":"\u003cdiv align='center'\u003e\n  \u003cpicture\u003e\n    \u003csource media='(prefers-color-scheme: dark)' srcset='https://cdn.brj.app/images/brj-logo/logo-regular.png'\u003e\n    \u003cimg src='https://cdn.brj.app/images/brj-logo/logo-dark.png' alt='BRJ logo'\u003e\n  \u003c/picture\u003e\n  \u003cbr\u003e\n  \u003ca href=\"https://brj.app\"\u003eBRJ organisation\u003c/a\u003e\n\u003c/div\u003e\n\u003chr\u003e\n\nCountry\n=======\n\nCountry management package.\n\nIdea\n----\n\nThis package provides an interface for working with countries. All countries always return as an entity that meets the Country interface. The specific implementation of the entity is decided by the package itself according to the available environment.\n\nPossible implementations:\n\n- DoctrineCountry\n- FileCountry\n\nThe default country data is available in the json data file, according to which the data is subsequently updated.\n\nBasic usage\n-----------\n\nThe main control logic is in the `CountryManager` service, which provides communication and servicing of database entities.\n\nThe country information is stored in Doctrine entities, which are automatically generated on the first call based on a data file downloaded via the API.\n\nWe use the [country.io](http://country.io/data/) service to retrieve the data.\n\n![Country table](doc/table.png)\n\nUsage:\n\n```php\n$manager = new \\Baraja\\Country\\CountryManager;\n$manager-\u003egetByCode('CZ');\n```\n\nReturns:\n\n![Country entity](doc/entity.png)\n\n🏳️‍🌈 Flag support\n----------------\n\nThe package fully supports the ability to get a country's flag as an emoji. To get it, simply call the method above the entity:\n\n```php\n$manager = new \\Baraja\\Country\\CountryManager;\n$country = $manager-\u003egetByCode('CZ');\n\necho $country-\u003egetFlag(); // return 🇨🇿\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbaraja-core%2Fcountry","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbaraja-core%2Fcountry","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbaraja-core%2Fcountry/lists"}