{"id":21944241,"url":"https://github.com/michaelkrone/generator-phalcon","last_synced_at":"2025-04-22T21:04:59.935Z","repository":{"id":10661305,"uuid":"12893984","full_name":"michaelkrone/generator-phalcon","owner":"michaelkrone","description":"Yeoman generator for Phalcon php multi-module applications.","archived":false,"fork":false,"pushed_at":"2014-01-22T22:39:40.000Z","size":495,"stargazers_count":46,"open_issues_count":0,"forks_count":10,"subscribers_count":6,"default_branch":"master","last_synced_at":"2025-04-22T21:04:54.496Z","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/michaelkrone.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":"2013-09-17T11:58:05.000Z","updated_at":"2020-05-25T21:29:34.000Z","dependencies_parsed_at":"2022-09-26T17:50:40.914Z","dependency_job_id":null,"html_url":"https://github.com/michaelkrone/generator-phalcon","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/michaelkrone%2Fgenerator-phalcon","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/michaelkrone%2Fgenerator-phalcon/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/michaelkrone%2Fgenerator-phalcon/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/michaelkrone%2Fgenerator-phalcon/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/michaelkrone","download_url":"https://codeload.github.com/michaelkrone/generator-phalcon/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":250324690,"owners_count":21411945,"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-11-29T04:15:11.665Z","updated_at":"2025-04-22T21:04:59.913Z","avatar_url":"https://github.com/michaelkrone.png","language":"PHP","funding_links":[],"categories":["Scaffolding"],"sub_categories":[],"readme":"# generator-phalcon \n\nA generator for [Yeoman](http://yeoman.io). Let Yeoman generate a multi module [Phalcon PHP Framework](http://phalconphp.com) application.\n\n\n## Getting Started\n\nSince this is a Yeoman generator you have to install him first:\n\n```\n$ npm install -g yo\n```\n\n### Phalcon Generator\n\nTo install generator-phalcon from npm, run:\n\n```\n$ npm install -g generator-phalcon\n```\n\nFinally, initiate the generator:\n\n```\n$ yo phalcon\n```\n\nYou will be asked some questions about your application. You can specify the main namespace where all generated classes will live in. This will also be used to generate the project name. You can specify the folder name this project lives in (if it differs from the project name). Finally you have a working multi-module application set up:\n\n```\nI welcome you to the Phalcon project generator.\n                                                                                                   \nI will create a new Phalcon multi module application\nPlease answer some questions first:\n                                                                                                   \n[?] How would you like to call the new Project? (Enter the global namespace of the project, eg. MyApplication)\n[?] How would you like to name the main module? (Enter the namespace of the default module, eg. MyMainModule)\n[?] Please enter the name of the folder this project lives in (defaults to the slugified project name).\n                                                                                                   \n```\n\n### Module Subgenerator\n\nIf you would like to add another module to your project, just issue the module subgenerator like this:\n\n```\n$ yo phalcon:module\n```\n\nThis will kickstart the module generator which will include a new module in your project. This works for every project created by the generator-phalcon generator.\n\nThe subgenerator will ask you about the project namespace and the namespace of the new module:\n\n```\nI will create a new Phalcon module for your application.\n                                                                                                   \nPlease answer these simple questions:\n                                                                                                   \n[?] What is the namespace of the project this module should belong to? (Enter the global namespace of the project, eg. MyApplication) \n[?] How would you like to name your module? (Enter the namespace of your new module, eg. MyNewModule)\n```\n\n### Controller Subgenerator\n\nIf you would like to add another controller to your project, just issue the module subgenerator like this:\n\n```\n$ yo phalcon:controller\n```\n\nThis will kickstart the controller generator which will include a new controller in one of your projects modules.\n\nThe subgenerator will ask you about the project namespace, the namespace of the new module and the controller name:\n\n```\nI will create a new Phalcon controller for your application.\n\nPlease answer these simple questions:\n\n[?] What is the namespace of the project this controller should belong to? (Enter the global namespace of the project, eg. MyApplication)\n[?] How is the namespace of the module your controller should belong to? (Enter the namespace of your new module, eg. MyNewModule)\n[?] What is the name of your controller (Without \"Controller\" suffix)? (Enter the simple controller name, eg. Auth)\n\n```\n\n### Build the project\n\nBy now the project can be build with Ant. The build directory contains some PHP specific configurations for PHP MessDetector, PHPDox and CodeSniffer.\n\n### About the generated project\n\nAs every Yeoman generator, this generator is opinionated about how you should manage your application, be it directory structure, class inheritance or every other detail of your application.\nAs Phalcon is a very flexible framework feel free to adjust the project to your needs.\nThe project generated with the generator-phalcon generator will have the following structure:\n\n```\n.\n├── bower.json\n├── build\n│   ├── phpcs.xml\n│   ├── phpdox.xml\n│   └── phpmd.xml\n├── build.xml\n├── composer.json\n├── package.json\n├── private\n│   ├── common\n│   │   └── lib\n│   │       └── application\n│   │           ├── ApplicationModule.php\n│   │           ├── Application.php\n│   │           ├── controllers\n│   │           │   ├── ApplicationApiController.php\n│   │           │   └── ApplicationController.php\n│   │           ├── models\n│   │           │   └── ApplicationModel.php\n│   │           ├── RoutedModule.php\n│   │           └── router\n│   │               └── ApplicationRouter.php\n│   ├── config\n│   │   ├── config.php\n│   │   └── modules.php\n│   └── modules\n│       └── mainmodule\n│           ├── config\n│           │   └── config.php\n│           ├── controllers\n│           │   ├── api\n│           │   │   └── IndexController.php\n│           │   ├── ModuleApiController.php\n│           │   └── ModuleController.php\n│           ├── lib\n│           ├── models\n│           │   └── ModuleModel.php\n│           ├── Module.php\n│           └── ModuleRoutes.php\n├── public\n│   ├── assets\n│   ├── common\n│   ├── index.php\n│   ├── src\n│   │   └── app\n│   │       ├── layouts\n│   │       │   └── main.html\n│   │       ├── modules\n│   │       │   └── mainmodule\n│   │       │       └── views\n│   │       │           └── index\n│   │       │               └── index.html\n│   │       └── partials\n│   │           └── index.html\n│   └── styles\n└── test\n    ├── application\n    │   ├── ApplicationTest.php\n    │   └── phpunit.xml\n    ├── helpers\n    │   ├── TestHelper.php\n    │   └── UnitTestCase.php\n    ├── modules\n    │   └── mainmodule\n    │       ├── helpers\n    │       │   ├── ModuleTestHelper.php\n    │       │   └── ModuleUnitTestCase.php\n    │       ├── IndexControllerTest.php\n    │       ├── ModuleTest.php\n    │       └── phpunit.xml\n    └── phalcon\n        ├── FunctionalTestCase.php\n        ├── ModelTestCase.php\n        └── UnitTestCase.php\n\n```\n\n### Todo\n\n   * Documentation\n   * Subgenerators for models, routes\n   * Generators for client side scripts\n\n### Getting To Know Yeoman\n\nYeoman has a heart of gold. He's a person with feelings and opinions, but he's very easy to work with. If you think he's too opinionated, he can be easily convinced.\n\nIf you'd like to get to know Yeoman better and meet some of his friends, [Grunt](http://gruntjs.com) and [Bower](http://bower.io), check out the complete [Getting Started Guide](https://github.com/yeoman/yeoman/wiki/Getting-Started).\n\n\n## License\n\n[MIT License](http://en.wikipedia.org/wiki/MIT_License)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmichaelkrone%2Fgenerator-phalcon","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmichaelkrone%2Fgenerator-phalcon","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmichaelkrone%2Fgenerator-phalcon/lists"}