{"id":20130475,"url":"https://github.com/drmvc/orm","last_synced_at":"2025-08-07T00:40:44.853Z","repository":{"id":56972268,"uuid":"127835428","full_name":"drmvc/orm","owner":"drmvc","description":"Simple and easy-to-use lightweight ORM","archived":false,"fork":false,"pushed_at":"2018-04-18T23:35:02.000Z","size":47,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-03-02T21:42:46.650Z","etag":null,"topics":["database","orm","sql"],"latest_commit_sha":null,"homepage":"https://drmvc.com","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/drmvc.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2018-04-03T01:50:51.000Z","updated_at":"2019-02-07T00:35:53.000Z","dependencies_parsed_at":"2022-08-21T11:20:13.154Z","dependency_job_id":null,"html_url":"https://github.com/drmvc/orm","commit_stats":null,"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"purl":"pkg:github/drmvc/orm","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/drmvc%2Form","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/drmvc%2Form/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/drmvc%2Form/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/drmvc%2Form/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/drmvc","download_url":"https://codeload.github.com/drmvc/orm/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/drmvc%2Form/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":269180959,"owners_count":24373842,"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-06T02:00:09.910Z","response_time":99,"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":["database","orm","sql"],"created_at":"2024-11-13T20:38:48.147Z","updated_at":"2025-08-07T00:40:44.784Z","avatar_url":"https://github.com/drmvc.png","language":"PHP","readme":"[![Latest Stable Version](https://poser.pugx.org/drmvc/orm/v/stable)](https://packagist.org/packages/drmvc/orm)\n[![Build Status](https://travis-ci.org/drmvc/orm.svg?branch=master)](https://travis-ci.org/drmvc/orm)\n[![Total Downloads](https://poser.pugx.org/drmvc/orm/downloads)](https://packagist.org/packages/drmvc/orm)\n[![License](https://poser.pugx.org/drmvc/orm/license)](https://packagist.org/packages/drmvc/orm)\n[![PHP 7 ready](https://php7ready.timesplinter.ch/drmvc/orm/master/badge.svg)](https://travis-ci.org/drmvc/orm)\n[![Code Climate](https://codeclimate.com/github/drmvc/orm/badges/gpa.svg)](https://codeclimate.com/github/drmvc/orm)\n[![Scrutinizer CQ](https://scrutinizer-ci.com/g/drmvc/orm/badges/quality-score.png?b=master)](https://scrutinizer-ci.com/g/drmvc/orm/)\n[![Code Coverage](https://scrutinizer-ci.com/g/drmvc/orm/badges/coverage.png?b=master)](https://scrutinizer-ci.com/g/drmvc/orm/?branch=master)\n\n# DrMVC\\Orm\n\nSimple and easy-to-use lightweight ORM.\n\n    composer require drmvc/orm\n\n## Install\n\ncomposer require drmvc/orm\n\n## How to use\n\n```php\n\n\u003c?php\n\nuse DrMVC\\Database;\nuse DrMVC\\Config;\nuse DrMVC\\Orm\\Entity;\nuse DrMVC\\Orm\\Orm;\n\nrequire_once __DIR__ . '/../vendor/autoload.php';\n\n// Create config object and load database configuration\n$config = new Config();\n$config-\u003eload(__DIR__ . '/config.php');\n\n// Open connection with database\n$db = new Database($config);\n$instance = $db-\u003egetInstance();\n\n$orm = new Orm('test_table', $instance);\n\n$entity = new Entity();\n\n$entity-\u003ename = 'Kolya';\n$entity-\u003eemail = 'qweqwe';\n$entity-\u003epassword = 'qwerty3';\n\n$orm-\u003esaveEntity($entity);\n\n// if find, update data\nif ($entity = $orm-\u003efindById(1)) {\n    $entity-\u003ename = 'Pavel';\n    $entity-\u003eemail = 'pavel@mail.ru';\n    $entity-\u003epassword = 'qwerty3';\n    $orm-\u003esaveEntity($entity);\n}\n\nforeach ($orm-\u003efindAll() as $en) {\n    echo '\u003cpre\u003e' . print_r($en-\u003ename . ' - ' . $en-\u003eid, true) . '\u003c/pre\u003e';\n    echo '\u003cpre\u003e' . print_r($orm-\u003edeleteEntity($en), true) . '\u003c/pre\u003e';\n}\n```\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdrmvc%2Form","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdrmvc%2Form","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdrmvc%2Form/lists"}