{"id":23176478,"url":"https://github.com/lajosbencz/phalcon-model-generator","last_synced_at":"2025-08-01T22:39:38.269Z","repository":{"id":57010781,"uuid":"207013757","full_name":"lajosbencz/phalcon-model-generator","owner":"lajosbencz","description":"Generates annotated Phalcon\\Model files from a database","archived":false,"fork":false,"pushed_at":"2021-03-01T15:56:55.000Z","size":33,"stargazers_count":5,"open_issues_count":0,"forks_count":0,"subscribers_count":3,"default_branch":"master","last_synced_at":"2024-09-14T02:49:45.941Z","etag":null,"topics":["orm","phalcon","tools"],"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/lajosbencz.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-09-07T19:05:04.000Z","updated_at":"2022-05-13T07:00:51.000Z","dependencies_parsed_at":"2022-08-21T15:10:17.495Z","dependency_job_id":null,"html_url":"https://github.com/lajosbencz/phalcon-model-generator","commit_stats":null,"previous_names":[],"tags_count":8,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lajosbencz%2Fphalcon-model-generator","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lajosbencz%2Fphalcon-model-generator/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lajosbencz%2Fphalcon-model-generator/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lajosbencz%2Fphalcon-model-generator/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/lajosbencz","download_url":"https://codeload.github.com/lajosbencz/phalcon-model-generator/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":230225630,"owners_count":18193015,"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":["orm","phalcon","tools"],"created_at":"2024-12-18T06:16:54.682Z","updated_at":"2024-12-18T06:16:55.260Z","avatar_url":"https://github.com/lajosbencz.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"# phalcon-model-generator\n\nGenerates decorated Phalcon\\Model files from a database\n\n### Install\n\n```bash\ncomposer require lajosbencz/phalcon-model-generator\n```\n\n### Use from terminal\n\nParameters are optional, first is path to global app config, second is root key of generator config inside the global.\n\n```bash\nvendor/bin/model-generate.php\nvendor/bin/model-generate.php config.php\nvendor/bin/model-generate.php config.php model_generator\n```\n\n### Use from script\n\n```php\n\u003c?php\n\nrequire_once __DIR__ . '/vendor/autoload.php';\n\n$config = new \\Phalcon\\Config([\n    'database' =\u003e [\n        'host' =\u003e '127.0.0.1',\n        'port' =\u003e 3306,\n        'username' =\u003e 'local',\n        'password' =\u003e 'local',\n        'dbname' =\u003e 'test_models',\n    ],\n    'model_generator' =\u003e [\n        // path to namespace root (will be created)\n        'directory' =\u003e __DIR__,\n        // namespace extensible for models\n        'namespace' =\u003e 'TestModels',\n        // namespace for overwritten models\n        'namespace_auto' =\u003e 'TestModels\\Auto',\n        // models will inherit from this base class\n        'base_model' =\u003e \\Phalcon\\Mvc\\Model::class,\n        // views will inherit from this base class\n        'base_view' =\u003e \\Phalcon\\Mvc\\Model::class,\n        // reusable relation parameter\n        'reusable' =\u003e false,\n        // logging: false for off, true for stdout, string for logging to stream\n        'log' =\u003e true,\n        // ignored tables (as they appear in database)\n        'blacklist' =\u003e [],\n    ],\n]);\n\n$g = new PhalconModelGenerator\\Generator($config, 'model_generator');\n$g-\u003egenerate();\n\n```\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flajosbencz%2Fphalcon-model-generator","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flajosbencz%2Fphalcon-model-generator","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flajosbencz%2Fphalcon-model-generator/lists"}