{"id":22542471,"url":"https://github.com/brightmachine/object-proxy","last_synced_at":"2025-08-25T21:03:57.634Z","repository":{"id":16326123,"uuid":"19075651","full_name":"brightmachine/object-proxy","owner":"brightmachine","description":"A trait to simplify the creation of proxies or simple facades.","archived":false,"fork":false,"pushed_at":"2014-10-30T23:28:57.000Z","size":192,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-06-02T05:48:33.530Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"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/brightmachine.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":"2014-04-23T15:48:29.000Z","updated_at":"2014-10-30T23:22:31.000Z","dependencies_parsed_at":"2022-09-01T17:02:45.199Z","dependency_job_id":null,"html_url":"https://github.com/brightmachine/object-proxy","commit_stats":null,"previous_names":["brightmachine/rapper"],"tags_count":2,"template":false,"template_full_name":null,"purl":"pkg:github/brightmachine/object-proxy","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/brightmachine%2Fobject-proxy","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/brightmachine%2Fobject-proxy/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/brightmachine%2Fobject-proxy/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/brightmachine%2Fobject-proxy/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/brightmachine","download_url":"https://codeload.github.com/brightmachine/object-proxy/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/brightmachine%2Fobject-proxy/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":272131793,"owners_count":24878986,"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","status":"online","status_checked_at":"2025-08-25T02:00:12.092Z","response_time":1107,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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-12-07T13:10:32.053Z","updated_at":"2025-08-25T21:03:57.609Z","avatar_url":"https://github.com/brightmachine.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Rapper\n\n## What is Rapper?\n\nThis trait can help with writing facades where you want some methods to forward on to a target object\nor to create a proxy class, for example if you don't want to reference vendor code from within your domain.\n\n## Requirements\n\n- PHP 5.4+\n\n## Installation\n\nInstall composer in your project:\n\n```\ncurl -s http://getcomposer.org/installer | php\n```\n\nCreate a `composer.json` file in your project root:\n\n```json\n{\n    \"require\": {\n        \"brightmachine/rapper\": \"*\"\n    }\n}\n```\n\nInstall via composer:\n\n```\nphp composer.phar install\n```\n\n## License\n\nRapper is open-sourced software licensed under the MIT License - see the LICENSE file for details\n\n## Documentation\n\nCurrently this trait allows you to do the following:\n\n1. set the target object for proxying to\n2. define a map of different function names to use\n\nExample:\n\n```php\n\u003c?php namespace Example;\n\nuse Monolog\\Logger;\nuse BrightMachine\\ObjectWrapper;\n\n/**\n * Class Logger\n *\n * Proxy requests to Monolog/Logger\n *\n * @method mixed logMessage($msg) add a debug message\n * @package Example\\Logger\n */\nclass Logger\n{\n    use ObjectWrapper;\n\n    public function __construct ()\n    {\n        $target = new Logger('dev', $this-\u003eapp['events']);\n        $this-\u003esetTargetObject($target)\n             -\u003esetProxyFunctionMap([\n                 'logMessage' =\u003e 'addDebug'\n             ]);\n    }\n}\n```\n\n## Contributing\n\nCheckout master source code from github:\n\n```\nhub clone brightmachine/rapper\n```\n\nInstall development components via composer:\n\n```\n# If you don't have composer.phar\n./scripts/bundle-devtools.sh .\n\n# If you have composer.phar\ncomposer.phar install --dev\n```\n\n### Coding Standard\n\nWe follows coding standard [PSR-2][].\n\nCheck if your codes follows PSR-2 by phpcs:\n\n```\n./vendor/bin/phpcs --standard=PSR2 src/\n```\n\n## Acknowledgement\n\nGit repo skeleton by \"[Goodby Setup](http://bit.ly/byesetup)\".\n\n[PSR-2]: https://github.com/php-fig/fig-standards/blob/master/accepted/PSR-2-coding-style-guide.md","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbrightmachine%2Fobject-proxy","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbrightmachine%2Fobject-proxy","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbrightmachine%2Fobject-proxy/lists"}