{"id":20159628,"url":"https://github.com/co0lc0der/flash-component","last_synced_at":"2025-07-08T03:40:03.453Z","repository":{"id":134638322,"uuid":"354761743","full_name":"co0lc0der/Flash-component","owner":"co0lc0der","description":"Flash messages php component","archived":false,"fork":false,"pushed_at":"2021-04-05T19:17:08.000Z","size":2,"stargazers_count":3,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-01-13T13:48:58.833Z","etag":null,"topics":["flash-messages","php","php-oop"],"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/co0lc0der.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":"2021-04-05T08:02:29.000Z","updated_at":"2024-05-03T22:42:34.000Z","dependencies_parsed_at":null,"dependency_job_id":"3b88a334-5fcb-4687-b70d-572194276001","html_url":"https://github.com/co0lc0der/Flash-component","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/co0lc0der%2FFlash-component","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/co0lc0der%2FFlash-component/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/co0lc0der%2FFlash-component/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/co0lc0der%2FFlash-component/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/co0lc0der","download_url":"https://codeload.github.com/co0lc0der/Flash-component/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":241597473,"owners_count":19988255,"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":["flash-messages","php","php-oop"],"created_at":"2024-11-14T00:09:20.842Z","updated_at":"2025-03-03T02:24:50.675Z","avatar_url":"https://github.com/co0lc0der.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Flash messages php component\n\nThis is an easy-to-use php component for working with flash messages in your project. It uses `$_SESSION` to store messages. Because of it you have to use `session_start()` at the begining of your script. See `index.php` for example.\n### Public methods:\n- `exists()` - check existing a message by its type\n- `setFlash()` - set a flash message\n- `getFlash()` - return the added message\n## How to use\n### 1. Include the Flash class.\n```php\ninclude __DIR__ . '/Flash/Flash.php';\n```\n### 2. Add a flash message by method `setFlash()`. Type 'danger' is by default.\n```php\nFlash::setFlash('Error message.');\nFlash::setFlash('Some information.', 'info');\nFlash::setFlash('Job is done!', 'success');\nFlash::setFlash('Additional error message.', 'danger', false);\n```\n### 3. To print the added message use `getFlash()` method.\n```php\necho Flash::getFlash('info');\necho Flash::getFlash('danger');\necho Flash::getFlash('success');\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fco0lc0der%2Fflash-component","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fco0lc0der%2Fflash-component","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fco0lc0der%2Fflash-component/lists"}