{"id":18551986,"url":"https://github.com/baraja-core/service-method-invoker","last_synced_at":"2025-10-26T09:06:42.734Z","repository":{"id":48560363,"uuid":"258158767","full_name":"baraja-core/service-method-invoker","owner":"baraja-core","description":"Invoke method by service, name and arguments.","archived":false,"fork":false,"pushed_at":"2022-09-07T11:24:30.000Z","size":177,"stargazers_count":2,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-03-26T09:17:54.626Z","etag":null,"topics":["invoke","invoker","method","php"],"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":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2020-04-23T09:44:40.000Z","updated_at":"2021-12-12T19:59:00.000Z","dependencies_parsed_at":"2022-09-02T10:50:56.033Z","dependency_job_id":null,"html_url":"https://github.com/baraja-core/service-method-invoker","commit_stats":null,"previous_names":[],"tags_count":31,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/baraja-core%2Fservice-method-invoker","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/baraja-core%2Fservice-method-invoker/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/baraja-core%2Fservice-method-invoker/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/baraja-core%2Fservice-method-invoker/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/baraja-core","download_url":"https://codeload.github.com/baraja-core/service-method-invoker/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248123674,"owners_count":21051510,"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":["invoke","invoker","method","php"],"created_at":"2024-11-06T21:11:25.180Z","updated_at":"2025-10-26T09:06:42.664Z","avatar_url":"https://github.com/baraja-core.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"PHP method safe invoke\n======================\n\n![Integrity check](https://github.com/baraja-core/service-method-invoker/workflows/Integrity%20check/badge.svg)\n\nImagine you have instance of your custom service and you want invoke some action method with sets of parameters.\n\nThis package is simply way how to invoke all your methods.\n\n📦 Installation \u0026 Basic Usage\n-----------------------------\n\nThis package can be installed using [Package Manager](https://github.com/baraja-core/package-manager) which is also part of the Baraja [Sandbox](https://github.com/baraja-core/sandbox). If you are not using it, you will have to install the package manually using this guide.\n\n*No package configuration is required. Simply create an instance and the class is ready to use immediately.*\n\nTo manually install the package call Composer and execute the following command:\n\n```shell\n$ composer require baraja-core/service-method-invoker\n```\n\n🗺️ Simple example\n-----------------\n\nThink of a simple service as an API endpoint with a public method for hydrating your data:\n\n```php\n$invoker = new \\Baraja\\ServiceMethodInvoker;\n$apiEndpoint = new \\Baraja\\MyApiEndpoint;\n\n$data = $invoker-\u003einvoke($apiEndpoint, 'actionDetail', ['id' =\u003e 42]);\n\nvar_dump($data); // return \"My id is: 42\"\n```\n\nAnd your endpoint can be:\n\n```php\nclass MyApiEndpoint\n{\n    public function actionDetail(int $id): string\n    {\n        return 'My id is: ' . $id;\n    }\n}\n```\n\n📄 License\n-----------\n\n`baraja-core/service-method-invoker` is licensed under the MIT license. See the [LICENSE](https://github.com/baraja-core/service-method-invoker/blob/master/LICENSE) file for more details.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbaraja-core%2Fservice-method-invoker","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbaraja-core%2Fservice-method-invoker","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbaraja-core%2Fservice-method-invoker/lists"}