mtoolkit/mtoolkit-controller 问题修复 & 功能扩展

解决BUG、新增功能、兼容多环境部署,快速响应你的开发需求

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

mtoolkit/mtoolkit-controller

Composer 安装命令:

composer require mtoolkit/mtoolkit-controller

包简介

The controller module of MToolkit framework

README 文档

README

The controller module of MToolkit framework.

Summary

How a controller works

MPageController

MPageController is an autorun controller for the web pages.

Controller (Index.php):

<?php

require_once __DIR__ . '/Settings.php';

use \MToolkit\Controller\MPageController;

class Index extends MAbstractPageController
{
    private $masterPage;

    public function __construct()
    {
        parent::__construct(__DIR__.'/Index.view');
    }

    public function helloWorld()
    {
        return "Hello World";
    }
} 

And the view file. Every view file must contain the meta tag, with the correct content-type:

<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">

Index.view:

<?php /* @var $this Index */ ?>
<html>
    <head>
        <title>Entry page</title>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
    </head>
    <body>
        <b><?php echo $this->helloWorld(); ?></b>
    </body>
</html>

And now you can create your web app.

Handler

Routing

View Life Cycle

  1. Construct
  2. Init
  3. Load
  4. Pre render
  5. Render
  6. Post render

Construct

Init

Load

Pre render

Render

Post render

统计信息

  • 总下载量: 49
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 0
  • 点击次数: 7
  • 依赖项目数: 2
  • 推荐数: 0

GitHub 信息

  • Stars: 0
  • Watchers: 1
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: LGPL-3.0
  • 更新时间: 2016-01-18

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固