{"id":17774541,"url":"https://github.com/nathankot/rbhpi","last_synced_at":"2025-06-11T01:36:27.739Z","repository":{"id":6219779,"uuid":"7451120","full_name":"nathankot/rbhpi","owner":"nathankot","description":"RBHPi Framework","archived":false,"fork":false,"pushed_at":"2013-02-08T10:19:32.000Z","size":448,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-02-07T09:45:33.045Z","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":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/nathankot.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":"2013-01-05T03:28:11.000Z","updated_at":"2013-02-08T10:19:32.000Z","dependencies_parsed_at":"2022-09-11T13:30:24.322Z","dependency_job_id":null,"html_url":"https://github.com/nathankot/rbhpi","commit_stats":null,"previous_names":[],"tags_count":4,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nathankot%2Frbhpi","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nathankot%2Frbhpi/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nathankot%2Frbhpi/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nathankot%2Frbhpi/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/nathankot","download_url":"https://codeload.github.com/nathankot/rbhpi/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246662438,"owners_count":20813747,"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-10-26T21:51:14.374Z","updated_at":"2025-04-01T15:32:05.337Z","avatar_url":"https://github.com/nathankot.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"# The RBHPi Framework.\n\n[![Build Status](https://travis-ci.org/nathankot/rbhpi.png?branch=master)](https://travis-ci.org/nathankot/rbhpi)\n[![Build Status](https://travis-ci.org/nathankot/rbhpi.png)](https://travis-ci.org/nathankot/rbhpi)\n\n_Currently under active development. API **will** change without notice._\n\nThis is my personal PHP5.4+ framework. Humble and down to earth. It is loosely based around a HMVMC architectural pattern (Hierarchical Model—View-Model—Controller).\n\nThis framework is actually a _stripped-down and cleaned up_ version of my RBHP framework which I have been using in production since forever. It is designed to be released to the public so that I can feel like I've contributed to the Open Source community. Although, given the excess amount of PHP Frameworks available out there, I highly doubt that the popularity of this framework will pick up any time soon. I also wouldn't be able to tell you how different or how this framework would stand out from the others, as I have never truly used a different framework in production.\n\nAnyhow, this encompasses my personal way of doing things. See if you like it ;) [Click here to dig around the Core](https://github.com/nathankot/rbhpi-core).\n\n## Qualities of the Framework:\n\n- Keep it simple.\n- Make as much use of PHP's core functionality as possible.\n- Compliance with FIG Standards.\n- Disregard 'speed' and 'micro-optimizations' in favor of readability and elegance.\n- Leave room for future adaptability and extensibility.\n\n## Some cool things this framework can do:\n\n### HMVC Request Injection\n\nYou can take a `Core\\Prototype\\Request` object, and inject it into another RBHPi server by doing something like this:\n\n```php\n$request = new \\Core\\Prototype\\Request([\n\t\t'path' =\u003e '/route/to/your/request'\n\t,\t'payload' =\u003e $data\n\t,\t'host' =\u003e 'anotherserver.rbhpi.com'\n\t,\t'method' =\u003e 'get'\n\t, 'format' =\u003e 'json'\n]);\n$response = $request-\u003einject();\n```\n\nAnd you'll get a `$response` from the other server.\n\n### Model Priorty\n\nYou can set the `$priority` property of a model, and if you use the MongoDB adapter and PECL Mongo 1.3+, it will adjust the `writeConcern` and `readPreference` for the encapsulated collection accordingly.\n\n```php\nnamespace App\\Model;\n\nclass Test extends \\Core\\Blueprint\\Model\n{\n\t$priority = 2;\n\t$schema = [];\n}\n```\n\nThis is how a MongoDB adapter would react to the following priority levels:\n\n- **Minimum** (1): writeConcern `0` (Fire and forget). Read Preference `Nearest`.\n- **Normal** (2): writeConcern `1` (Wait for primary to write). Read Preference `Primary Preferred`.\n- **Maximum** (3): writeConcern `majority` (Majority of servers must acknowledge). Read Preference `Primary`.\n\n### Deployment Via Git\n\nThe framework has a cli tool that can help you deploy via git like this:\n\n```bash\n$ _cli/bin/rbhp deploy\n```\n\nThe deployment will run you through configuration first. I'll write a more comprehensive guide perhaps some time in the future.\n\n## Some other features that might be worthwhile to mention:\n\n- Test Driven Development\n- Documented with DocBlocks\n- ViewModels — hence I use Mustache as the default templating engine.\n\n## Installation\n\nIt uses composer, so you will have to do this first:\n\n```bash\n$ php composer.phar install\n```\n\nAnd then run some tests (Although at this stage, they won't pass unless you have MongoDB installed and password-less):\n\n```bash\n$ _cli/bin/rbhp test core\n```\n\n# License\n\n_All files within this repository are licensed as follows:_\n\n\u003e\tCopyright 2012 Nathan Kot\n\u003e\n\u003e\tLicensed under the Apache License, Version 2.0 (the \"License\");\n\u003e\tyou may not use this file except in compliance with the License.\n\u003e\tYou may obtain a copy of the License at\n\u003e\n\u003e\thttp://www.apache.org/licenses/LICENSE-2.0\n\u003e\n\u003e\tUnless required by applicable law or agreed to in writing, software\n\u003e\tdistributed under the License is distributed on an \"AS IS\" BASIS,\n\u003e\tWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n\u003e\tSee the License for the specific language governing permissions and\n\u003e\tlimitations under the License.\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnathankot%2Frbhpi","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnathankot%2Frbhpi","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnathankot%2Frbhpi/lists"}