{"id":20103136,"url":"https://github.com/dotkernel/dot-controller-plugin-flashmessenger","last_synced_at":"2025-05-06T08:31:09.553Z","repository":{"id":11677266,"uuid":"70260451","full_name":"dotkernel/dot-controller-plugin-flashmessenger","owner":"dotkernel","description":"DotKernel flash messenger controller plugin component","archived":false,"fork":false,"pushed_at":"2024-03-25T17:12:10.000Z","size":21,"stargazers_count":2,"open_issues_count":0,"forks_count":3,"subscribers_count":1,"default_branch":"2.9-PHP-8.1","last_synced_at":"2025-04-22T09:19:53.602Z","etag":null,"topics":[],"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/dotkernel.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE.md","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":"2016-10-07T15:43:41.000Z","updated_at":"2023-08-17T12:57:21.000Z","dependencies_parsed_at":"2024-03-25T17:19:20.085Z","dependency_job_id":null,"html_url":"https://github.com/dotkernel/dot-controller-plugin-flashmessenger","commit_stats":{"total_commits":17,"total_committers":5,"mean_commits":3.4,"dds":"0.23529411764705888","last_synced_commit":"f979101b4c6f3cc59d6c3dce778f77626cc72564"},"previous_names":[],"tags_count":11,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dotkernel%2Fdot-controller-plugin-flashmessenger","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dotkernel%2Fdot-controller-plugin-flashmessenger/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dotkernel%2Fdot-controller-plugin-flashmessenger/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dotkernel%2Fdot-controller-plugin-flashmessenger/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/dotkernel","download_url":"https://codeload.github.com/dotkernel/dot-controller-plugin-flashmessenger/tar.gz/refs/heads/2.9-PHP-8.1","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":252648550,"owners_count":21782405,"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":[],"created_at":"2024-11-13T17:34:24.568Z","updated_at":"2025-05-06T08:31:09.261Z","avatar_url":"https://github.com/dotkernel.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003e [!CAUTION]\n\u003e ## Security-Only Maintenance Mode\n\u003e \n\u003e This package is considered feature-complete, and is now in **security-only** maintenance mode.\n\u003e \n# dot-controller-plugin-flashmessenger\n\nFlashmessenger controller plugin for easy access to the flash messenger from any controller.\n\n![OSS Lifecycle](https://img.shields.io/osslifecycle/dotkernel/dot-controller-plugin-flashmessenger)\n[![GitHub license](https://img.shields.io/github/license/dotkernel/dot-controller-plugin-flashmessenger)](https://github.com/dotkernel/dot-controller-plugin-flashmessenger/blob/2.0.1/LICENSE.md)\n![PHP from Packagist (specify version)](https://img.shields.io/packagist/php-v/dotkernel/dot-controller-plugin-flashmessenger/2.9.2)\n\n\n# Installation\n\nRun the following command in your project root directory\n```bash\n$ composer require dotkernel/dot-controller-plugin-flashmessenger\n```\n\nThis will also install packages `dotkernel/dot-controller` and `dotkernel/dot-flashmessenger` as dependencies.\nNext, make sure you merge the `ConfigProvider` to your application's configuration in order to register the default dependencies.\n\n## Usage\n\nIn any controller, you can access the plugin by calling\n```php\n$this-\u003emessenger()-\u003e...\n```\n\nThe methods defined by this plugin are\n```php\n$this-\u003emessenger()-\u003eaddMessage($namespace, $value);\n```\nAdds a session message to at the requested namespace\n\n```php\n$this-\u003emessenger()-\u003eaddData($key, $data);\n```\nAlmost the same as the addMessage method, but named differently in order to reserve this function for adding general session data.\n\nThere are also some shortcuts to the addMessage method which are using predefined namespaces\n```php\n$this-\u003emessenger()-\u003eaddError($error);\n\n$this-\u003emessenger()-\u003eaddWarning($message);\n\n$this-\u003emessenger()-\u003eaddInfo($message);\n\n$this-\u003emessenger()-\u003eaddSuccess($message);\n```\n\nAlso, the getter methods\n```php\n$this-\u003emessenger()-\u003egetMessages($namespace = null);\n```\nGets all messages under a namespace, or if namespace is not specified it will return all namespaces with all messages\n\n```php\n$this-\u003emessenger()-\u003egetData($key);\n```\nGets the data stored at the specified key\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdotkernel%2Fdot-controller-plugin-flashmessenger","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdotkernel%2Fdot-controller-plugin-flashmessenger","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdotkernel%2Fdot-controller-plugin-flashmessenger/lists"}