{"id":18929533,"url":"https://github.com/thecodingmachine/integration.magento.moufgento","last_synced_at":"2025-07-17T23:09:36.028Z","repository":{"id":57020132,"uuid":"37972036","full_name":"thecodingmachine/integration.magento.moufgento","owner":"thecodingmachine","description":"Moufgento is a modern MVC framework for Magento, based on the Splash MVC framework (designed for Mouf-PHP).","archived":false,"fork":false,"pushed_at":"2016-05-26T18:28:08.000Z","size":111,"stargazers_count":0,"open_issues_count":0,"forks_count":2,"subscribers_count":5,"default_branch":"1.0","last_synced_at":"2025-07-17T21:19:02.425Z","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/thecodingmachine.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2015-06-24T08:23:36.000Z","updated_at":"2015-06-24T08:24:48.000Z","dependencies_parsed_at":"2022-08-22T20:31:15.797Z","dependency_job_id":null,"html_url":"https://github.com/thecodingmachine/integration.magento.moufgento","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/thecodingmachine/integration.magento.moufgento","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thecodingmachine%2Fintegration.magento.moufgento","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thecodingmachine%2Fintegration.magento.moufgento/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thecodingmachine%2Fintegration.magento.moufgento/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thecodingmachine%2Fintegration.magento.moufgento/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/thecodingmachine","download_url":"https://codeload.github.com/thecodingmachine/integration.magento.moufgento/tar.gz/refs/heads/1.0","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thecodingmachine%2Fintegration.magento.moufgento/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":265677614,"owners_count":23810006,"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-08T11:33:26.218Z","updated_at":"2025-07-17T23:09:35.980Z","avatar_url":"https://github.com/thecodingmachine.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"Moufgento: a modern MVC framework for Magento based on Mouf and PSR-7\n=====================================================================\n\nWhy should I care?\n------------------\n\nMoufgento is a **modern MVC framework for Magento**. Actually, it is a bridge between [Magento](http://magento.com/) and the [Splash MVC framework](http://mouf-php.com/packages/mouf/mvc.splash/index.md)\nused by [Mouf-PHP](http://mouf-php.com) (a dependency injection based framework).\n\nMagento comes with a very heavy framework, based on Zend Framework 1. It is definitely very powerful, allowing to overload almost any part of the application. Yet, it is somewhat old and lacks the modern features we have come to love in the current MVC frameworks, like dependency injection, annotations support, few or no XML configuration files... For these reasons, if you find yourself with a need to do a massive custom application inside Magento, you might want to use something else than Magento default framework.\n\nMoufgento is at the same time a module for Magento that adds PSR-7 compatible middleware support AND an integration of Splash, \nthe default MVC framework that comes with Mouf and that is provided as a middleware.\n\nMoufgento offers the following features:\n\n- The ability to plug any zend/stratigility middleware (i.e. PSR-7 Middleware) in Magento\n- A default router (Splash) with\n    - **controllers**, declared through a nice graphical DI container\n    - use of **annotations** in your controllers (for instance: `@URL` to declare a new route, `@Logged` to restrict access to logged users, etc...)\n    - support for any kind of **views** supported in Splash MVC (this includes plain PHP files, [Twig templates](http://twig.sensiolabs.org/), etc...)\n    - a [nice web-based UI to scafold your controllers and views](http://mouf-php.com/packages/mouf/mvc.splash/doc/writing_controllers.md)\n    - integration of your views inside the Magento theme\n    - (very) easy Ajax support\n    - integration of Mouf's [**authentication**](doc/authentication_and_right_management.md) system into Magento\n    - integration of Mouf's [**web library (JS/CSS)**](doc/scripts-and-styles.md) system into Magento\n\nMoufgento has been tested with Magento CE 1.9.\n\n\nAnother interesting feature is that your code is **100% compatible** with Splash MVC. This means that you can write a controller in Splash MVC and deploy it later in Magento (or the opposite), or any other third party system that Splash can be plugged into (i.e. Drupal, Wordpress, Joomla...)\n\nInstallation\n------------\n\nYou will first need to install Magento and Mouf side by side.\n\n1. Start by installing [Magento](http://magento.com/) as you would normally do.\n2. [Install the Mouf PHP framework](http://mouf-php.com/packages/mouf/mouf/doc/installing_mouf.md) _in the same directory_ as Magento\n   This means you should have the **composer.json** file of Composer in the same directory as the **index.php** of Magento.\n3. Modify **composer.json** and add the **moufgento** module. Your **composer.json** should contain at least these lines:\n\n```json\n{\n    \"repositories\": [\n    {\n        \"type\": \"composer\",\n        \"url\": \"http://packages.firegento.com\"\n    },\n    {\n        \"type\": \"vcs\",\n        \"url\": \"https://github.com/magento-hackathon/magento-composer-installer\"\n    }\n    ],\n    \"autoload\" : {\n        \"psr-0\" : {\n            \"MyApp\" : \"src/\"\n        }\n    },\n    \"require\" : {\n        \"magento-hackathon/magento-composer-installer\": \"*\",\n        \"mouf/mouf\" : \"~2.0\",\n        \"mouf/integration.magento.moufgento\" : \"~1.0\",\n    },\n    \"minimum-stability\" : \"dev\",\n    \"prefer-stable\": true\n}\n```\n\n   Do not forget to customize your vendor name (the `MyApp` part of the autoloader section).\n4. Create the empty `src/` directory at the root of your project.\n5. Run the install process in Mouf: connect to Mouf UI and run the install process for all the packages\n   (including Moufgento install process of course)\n6. You have now to patch the Magento Autoloader because there is [some weird issue with the `class_exists` function](http://www.webguys.de/magento/tuerchen-11-the-magento-autoloader-and-external-libraries/) .\n   First, copy `app/code/core/Varien/Autoload.php` into `app/code/local/Varien/Autoload.php`\n   Then, in the `autoload` method, replace :\n\n```php\nreturn include $classFile;\n```\n\n   By\n\n```php\nreturn @include $classFile;\n\n```\n\nGetting started\n---------------\n\n[In the next section, we will learn **how to create a controller and a view**.](doc/mvc.md)\n\nOr if you already know Splash, you can directly jump to another part of this documentation:\n\n- [widgets integration](doc/widgets.md)\n- [authentication and authorization](doc/authentication_and_right_management.md)\n- [web library (JS/CSS)](doc/scripts-and-styles.md)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fthecodingmachine%2Fintegration.magento.moufgento","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fthecodingmachine%2Fintegration.magento.moufgento","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fthecodingmachine%2Fintegration.magento.moufgento/lists"}