Magelight is a lightweight MVC framework inspired by Magento written ground-up for PHP 7
Magelight is distributed under Open Software License 3.0 (OSL 3.0).
- MVC architecture with module-based customization mechanisms
- Query builder and Active-Record models
- Extensible controllers
- Extensible views with redefinable templates
- Native PHP syntax templating
- IOC support within object forgery
- PHPUnit-based essentials for unit testing regardless static calls
- Robust module-based customizations:
- Class redefinition and preferences that allow to extend class behavior through all application
- Document layout redefinition
- Blocks template redefinition
- Runtime method hooks (before, after) that allow to modify method arguments or result
- XML-based configuration that can be overriden in modules
- XML-based routing that can be overriden in modules same as config
- Customizable L10N and I18N support
- Application backend framework with simple customizable scaffolding
- Admin user management and access control
- User registration and authorization
- uLogin service support
- Restore password capability
- Main module providing following essentials
- Document - an HTML document object as basic view
- Pager - widget for paginations
- Breadcrumbs - content path widget
- Grid - a basic grid for displaying paginated table data
- Css and Js assets minification and merging mechanisms
- City, Region and Country structured data and models
- Internationalized in EN, RU and UA languages
- Image model implementing miscellaneous image transformations
- Self-crawling sitemap builder
- Visitors actions logging
- Forms with bootstrap-based layout that can be either built with form constructor or templated in an individual template.
- Elements and fields with fully-controllable attributes and content
- Asyncronous csubmit capability, frontend and backend validation
- Customizable validator and rules
- Localizable validation errors
- Generic fields available:
- Captcha - a simple captcha for registration form or other
- Checkbox - a checkbox form element
- File - a single generic file input
- FilePretty - prettified file input
- Input - generic input
- InputAppended - an input with an addon
- InputHidden - hidden input
- InputMasked - input with configurable mask for email/phone/credit-card data input
- InputPrepended - input with addon in the beginning
- LabeledCheckbox - a checkbox with label
- LabeledRadio - a radio input with label
- PasswordInput - a generic input for password
- Radio - generic radio input
- ReCaptcha - a ReCaptcha captcha input with validation
- Select - generic select box
- Textarea - generic textarea
- Support for any custom field with element-based constructor or phtml template
- PHP 7+
- Checkout code with git.
include 'core.php'
- Use Magelight!
- run
composer require rganin/magelight @dev
- require
vendor/autoload.php
in your project - create modules directory in your project or copy sample application structure
vendor/rganin/magelight/app/*
to your project directory - do not forget to add your own modules directory by
\Magelight::app()->addModulesDir('your_app/modules')
in your project
Magelight is open to everyone. Feel free to explore, highlight issues and contribute your solutions.
See contribution guidelines for more details.