# MvcCore
[![Latest Stable Version](https://img.shields.io/badge/Stable-v5.2.18-brightgreen.svg?style=plastic)](https://github.com/mvccore/mvccore/releases)
[![License](https://img.shields.io/badge/License-BSD%203-brightgreen.svg?style=plastic)](https://mvccore.github.io/docs/mvccore/5.0.0/LICENSE.md)
![PHP Version](https://img.shields.io/badge/PHP->=5.4-brightgreen.svg?style=plastic)
PHP MVC framework to create web applications in standard way, with many extensions and examples, with option to pack whole project (partially or completely) into super fast single file app or web tool.
## Outline
1. [Installation](#user-content-1-installation)
2. [Usage](#user-content-2-usage)
2.1. [Usage - Create Classic Web Application](#user-content-21-usage---create-classic-web-application)
2.2. [Usage - Create Application In Single PHP Or PHAR File](#user-content-22-usage---create-application-in-single-php-or-phar-file)
3. [Examples](#user-content-3-examples)
3.1. [Examples - Basic](#user-content-31-examples---basic)
3.2. [Examples - Empty Templates](#user-content-32-examples---empty-templates)
3.3. [Examples - Advanced (Applications)](#user-content-33-examples---advanced-applications)
4. [Features](#user-content-4-features)
4.1. [Features - Classic MVC Web Framework Features](#user-content-41-features---classic-mvc-web-framework-features)
4.2. [Features - `MvcCore` Classes Features](#user-content-42features----mvccore-classes-features)
4.3. [Features - Main Extensions That Is Definitely Worth Talking About](#user-content-43-features---main-extensions-that-is-definitely-worth-talking-about)
4.4. [Features - Packing & Single File Building](#user-content-44-features---packing--single-file-building)
## 1. Installation
```shell
composer require mvccore/mvccore
```
[go to top](#user-content-outline)
## 2. Usage
With MvcCore framework, you can develop classic web applicatons or application in single PHP or PHAR file:
### 2.1. Usage - Create Classic Web Application
Use basic [empty project template (`mvccore/project-basic`)](https://github.com/mvccore/project-basic):
```shell
composer create-project mvccore/project-basic
```
[go to top](#user-content-outline)
### 2.2. Usage - Create Application In Single PHP Or PHAR File
Use basic [single file project template (`mvccore/project-portable`)](https://github.com/mvccore/project-portable):
```shell
# load MvcCore portable project structure
composer create-project mvccore/project-portable
# go to project root dir
cd project-portable
# load MvcCore basic portable project
composer create-project mvccore/project-basic-portable development
# ... now you can do anything in development dir
```
[go to top](#user-content-outline)
## 3. Examples
### 3.1. Examples - Basic
#### 3.1.1. [Examples - Basic - Hello World (`mvccore/example-helloworld`)](https://github.com/mvccore/example-helloworld)
- Best example where to start - simple request and response via controller instance and it's view.
- How controller and view is defined and rendered.
- How is possible to pack single file application - all JS/CSS files and images is possible to pack into single PHP or PHAR.
- Example has very simple `Bootstrap.php`, 2 controllers - `Default.php` and `Base.php`, very simple layout and few views.
- Example could work as single file application.
[go to top](#user-content-outline)
#### 3.1.2. [Examples - Basic - Pig-Latin Translator (`mvccore/example-translator`)](https://github.com/mvccore/example-translator)
- Translator from English to Pig-Latin.
- Example with standard and AJAX request/responses.
- Example contains simple form created only in HTML.
- Example could work as single file application.
[go to top](#user-content-outline)
#### 3.1.3. [Examples - Basic - CD Collection (`mvccore/example-cdcol`)](https://github.com/mvccore/example-cdcol)
- Standard CRUD example working with SQLite file database.
- Example contains MySQL and MSSQL database dumps and system config commented connections settings.
- Example with a rewrite routes, CRUD controller and very simple database SQL model.
- Example contains forms created and validated by forms extension.
- Example could work as single file application.
[go to top](#user-content-outline)
### 3.2. Examples - Empty Templates
#### 3.2.1. [Examples - Empty Templates - Basic (`mvccore/project-basic`)](https://github.com/mvccore/project-basic)
- Website project designed for standard Web usage, not designed for full portable build/pack.
- Example has not defined any controllers in sub-namespaces, but it could.
- Example prints only table names from database, connection from database is defined in example system config.
- Example has defined single `layout.phtml` and 2 action views - `home.phtml` and `not-found.phtml`.
[go to top](#user-content-outline)
#### 3.2.2. [Examples - Empty Templates - Portable (`mvccore/project-portable`)](https://github.com/mvccore/project-portable)
- Website project designed for full portable build/pack.
- To develop new application - work in `/development` directory.
- To build single file application - use `make.cmd` and configure build process in `make-php.php` or `make-phar.php` (see examples).
- Test your built application in `/release` directory.
[go to top](#user-content-outline)
### 3.3. Examples - Advanced (Applications)
After exploring basic examples, you could look into more complex MvcCore applications:
#### 3.3.1. [Examples - Advanced - XML Documents (`mvccore/app-xmldocs`)](https://github.com/mvccore/app-xmldocs)
- Very simple website with documents defined in XML files.
- Example contains controllers structured deeply in `Admin` and `Front` namespaces.
- Example contains sub-controllers.
- Example contains XML document model class example.
[go to top](#user-content-outline)
#### 3.3.2. [Examples - Advanced - Questionnaires (`mvccore/app-xmldocs`)](https://github.com/mvccore/app-questionnaires)
- Application to create questionnaire with predefined question types defined by XML.
- All questions are rendered as forms, created and validated by forms extension.
- All answers are stored in MySQL database to create reports.
- All questionnaires has automatically created reports with visual graphs by question types.
- Example could work as single file application.
[go to top](#user-content-outline)
#### 3.3.3. [Examples - Advanced - Single File Editor & Manager (`mvccore/example-file-manager`)](https://github.com/mvccore/example-file-manager)
- Files and directories editor, working for now only with files.
- File couldn't work as single file application yet.
[go to top](#user-content-outline)
## 4. Features
### 4.1. Features - Classic MVC Web Framework Features
- any request types handling and HTML/XML/JSON responses
- great `Namespace\Controller:Action` routing by query params or rewrite routes
- automatic URL generating by route name or `Namespace\Controller:Action` combination
- unlimited controllers and views structure in any directories depth
- views, sub views and layout views rendering and view helpers
- automatic model classes with connections into databases with `\PDO`
- system and custom configuration files reading/writing
- automatic environment detection or detection by system config
- session namespaces and cookies management
- debug tools and logging
- special framework tools for OOP
- possibility to extend or patch (replace) any `MvcCore` core class
- no unnecessary code in framework, everything spacial is always `MvcCore` extension
[go to top](#user-content-outline)
### 4.2.Features - `MvcCore` Classes Features
#### 4.2.1. Features - Classes - `\MvcCore\Application`
- application instance singleton
- main MVC object instances storage (getters/setters)
- storage for core classes names (getters/setters)
- custom pre/post handlers for specific app lifecycle points (getters/setters)
- exceptions and errors dispatching
- application `Run()` method lifecycle:
- request and
没有合适的资源?快使用搜索试试~ 我知道了~
PHP MVC framework to create web applications in standard way
共126个文件
php:119个
md:2个
editorconfig:1个
1.该资源内容由用户上传,如若侵权请联系客服进行举报
2.虚拟产品一经售出概不退款(资源遇到问题,请及时私信上传者)
2.虚拟产品一经售出概不退款(资源遇到问题,请及时私信上传者)
版权申诉
0 下载量 11 浏览量
2023-08-18
11:12:21
上传
评论
收藏 274KB ZIP 举报
温馨提示
PHP MVC framework to create web applications in standard way, with many extensions and examples, with option to pack whole project.zip
资源推荐
资源详情
资源评论
收起资源包目录
PHP MVC framework to create web applications in standard way (126个子文件)
.editorconfig 171B
.gitattributes 48B
.gitignore 764B
debug.html 4KB
composer.json 912B
README.md 19KB
LICENSE.md 1KB
IRoute.php 33KB
IRequest.php 33KB
IApplication.php 33KB
IRouter.php 33KB
IController.php 31KB
UrlBuilding.php 25KB
IView.php 25KB
InternalInits.php 24KB
GettersSetters.php 23KB
Reflection.php 21KB
CollectionsMethods.php 20KB
InternalInits.php 18KB
Dispatching.php 17KB
ITool.php 17KB
Dispatching.php 16KB
IniDump.php 15KB
GettersSetters.php 15KB
Helpers.php 15KB
Props.php 14KB
IModel.php 14KB
Detection.php 13KB
RouteMethods.php 13KB
Routing.php 13KB
Rendering.php 13KB
RewriteRouting.php 13KB
Rendering.php 12KB
Instancing.php 12KB
Props.php 11KB
Handlers.php 11KB
IResponse.php 10KB
Converters.php 10KB
Props.php 9KB
IConfig.php 9KB
Props.php 9KB
Matching.php 9KB
ReadWrite.php 9KB
GettersSetters.php 9KB
Environment.php 8KB
Props.php 8KB
ViewHelpers.php 8KB
Connection.php 8KB
GettersSetters.php 8KB
DataMethods.php 7KB
Initializations.php 7KB
IniRead.php 7KB
Props.php 7KB
FlashMessages.php 7KB
Helpers.php 7KB
Parsers.php 6KB
Config.php 6KB
Headers.php 6KB
UrlBuilding.php 6KB
PropsGettersSetters.php 6KB
IConstants.php 6KB
MetaData.php 5KB
Closing.php 5KB
Props.php 5KB
Content.php 5KB
ISession.php 5KB
Resources.php 5KB
UrlByQuery.php 5KB
Instancing.php 5KB
MagicMethods.php 5KB
Escaping.php 5KB
Canonical.php 5KB
IDebug.php 5KB
MagicMethods.php 4KB
PropsGettersSetters.php 4KB
MagicMethods.php 4KB
PropsGettersSetters.php 4KB
MagicMethods.php 4KB
IConstants.php 4KB
MetaData.php 4KB
IConstants.php 4KB
Starting.php 4KB
Props.php 4KB
StringConversions.php 4KB
IConstants.php 3KB
GettersSetters.php 3KB
Cookies.php 3KB
Json.php 3KB
Instancing.php 3KB
LocalMethods.php 3KB
IConstants.php 3KB
startup.php 3KB
IConstants.php 3KB
NamespaceMethods.php 3KB
IEnvironment.php 3KB
IConstants.php 3KB
Props.php 3KB
Redirecting.php 3KB
Comparers.php 3KB
GettersSetters.php 3KB
共 126 条
- 1
- 2
资源评论
处处清欢
- 粉丝: 154
- 资源: 2483
下载权益
C知道特权
VIP文章
课程特权
开通VIP
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功