{"id":15296316,"url":"https://github.com/subzerobo/sabalim-action-wrapper","last_synced_at":"2025-03-25T05:43:39.136Z","repository":{"id":57061063,"uuid":"183382041","full_name":"subzerobo/sabalim-action-wrapper","owner":"subzerobo","description":"Action Wrapper Library for Before/After Specific action handling","archived":false,"fork":false,"pushed_at":"2019-04-25T10:23:10.000Z","size":3,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-01-30T05:26:36.689Z","etag":null,"topics":["php","php-library","php7","slim3"],"latest_commit_sha":null,"homepage":null,"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/subzerobo.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}},"created_at":"2019-04-25T07:38:23.000Z","updated_at":"2019-04-25T10:15:56.000Z","dependencies_parsed_at":"2022-08-24T14:53:42.496Z","dependency_job_id":null,"html_url":"https://github.com/subzerobo/sabalim-action-wrapper","commit_stats":null,"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/subzerobo%2Fsabalim-action-wrapper","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/subzerobo%2Fsabalim-action-wrapper/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/subzerobo%2Fsabalim-action-wrapper/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/subzerobo%2Fsabalim-action-wrapper/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/subzerobo","download_url":"https://codeload.github.com/subzerobo/sabalim-action-wrapper/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245407755,"owners_count":20610232,"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":["php","php-library","php7","slim3"],"created_at":"2024-09-30T18:10:02.797Z","updated_at":"2025-03-25T05:43:39.113Z","avatar_url":"https://github.com/subzerobo.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Sabalim-Action-Wrapper  \n  \nAction Wrapper Library for Before/After Specific action handling, this library provides the abstraction layer for other libraries specially for Sabalim-Elastic-Apm-PHP-Agent.  \n  \n### HandlerInterface  \nInterface provides two functions which whould run before and after any specific action  \n\n    interface HandlerInterface{\n        public function handleBefore($parent, string $actionName, array $actionData = []); \n        public function handleAfter($parent, string $actionName, array $actionData = []);\n    }\n`$parent` is your main object which it's action(s) need to be wrapped for example you can pass the `redis` object\n`$actionName` is the context of the action you are trying to wrap \n`$actionData` is the extra data you whould like to pass to the wrapper\n\n### HandlerAbstract\nHandlerAbstract class implements the HandlerInterface and does claculate the action event duration by default but you can pass the `start` and `end` microtime to override the default implemented code\n\nIt has the built-in DataStore to save the extra parameters passed in `handleBefore` to be used later in `handlerAfter` method.\n\nYour custom handlers may extend this class.\n\n    class myCustomHandler extends HandlerAbstract\n    {\n     \tprivate $your_custom_private;\n     \tpublic $your_custom_public;\n    \n\t    public function handleBefore($request, string $actionName, array $actionData = [])  \n\t    {  \n\t\t      parent::handleBefore($request, $actionName, $actionData);  \n\t\t      // Your code ...\n\t    }\n\t\tpublic function handleAfter($request, string $actionName, array $actionData = [])  \n\t\t{  \n\t\t\t      parent::handleAfter($request, $actionName, $actionData);  \n\t\t\t      // Your code ...\n\t\t}\n    }\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsubzerobo%2Fsabalim-action-wrapper","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsubzerobo%2Fsabalim-action-wrapper","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsubzerobo%2Fsabalim-action-wrapper/lists"}