yii2源码学习笔记(二)】的更多相关文章

Widget类是所有部件的基类.yii2\base\Widget.php <?php /** * @link http://www.yiiframework.com/ * @copyright Copyright (c) 2008 Yii Software LLC * @license http://www.yiiframework.com/license/ */ namespace yii\base; use Yii; use ReflectionClass; /** * Widget is…
yii\base\Object代码详解 <?php /** * @link http://www.yiiframework.com/ * @copyright Copyright (c) 2008 Yii Software LLC * @license http://www.yiiframework.com/license/ */ namespace yii\base; use Yii; /** * Object is the base class that implements the *pr…
Application是所有应用程序类的基类,接下来了解一下它的源码.yii2\base\Application.php. <?php /** * @link http://www.yiiframework.com/ * @copyright Copyright (c) 2008 Yii Software LLC * @license http://www.yiiframework.com/license/ */ namespace yii\base; use Yii; /** * Applic…
Action是所有控制器的基类,接下来了解一下它的源码.yii2\base\Action.php <?php /** * @link http://www.yiiframework.com/ * @copyright Copyright (c) 2008 Yii Software LLC * @license http://www.yiiframework.com/license/ */ namespace yii\base; use Yii; /** * Action is the base…
笔记一里记录,jQuery的总体结构如下: (function( global, factory ) { //调用factory(工厂)生成jQuery实例 factory( global ); }(typeof window !== "undefined" ? window : this, function( window, noGlobal ) { //factory实现,jquery源码主体部分 })); 那么这个生成jQuery的工厂是咋样的? 酱紫的: function( w…
Action 的概述 InlineAction 就是内联动作,所谓的内联动作就是放到controller 里面的 actionXXX 这种 Action.customAction 就是独立动作,就是直接继承 Action 并实现 run 方法的 Action. 与 Controller 的交互 public function createAction($id) { if ($id === '') { $id = $this->defaultAction; } $actionMap = $this…
//添加实例属性和方法 jQuery.fn = jQuery.prototype = { // 版本,使用方式:$().jquery弹出当前引入的jquery的版本 jquery: core_version, // 修正指向问题(后有详解) constructor: jQuery, // 初始化和参数管理 init: function( selector, context, rootjQuery ) { var match, elem; // 写错之后的处理,如果写成: $(""),…
继续了解controller基类. /** * Runs a request specified in terms of a route.在路径中指定的请求. * The route can be either an ID of an action within this controller or a complete route consisting * of module IDs, controller ID and action ID. If the route starts with…
View继承了component,用于渲染视图文件:yii2\base\View.php <?php /** * @link http://www.yiiframework.com/ * @copyright Copyright (c) 2008 Yii Software LLC * @license http://www.yiiframework.com/license/ */ namespace yii\base; use Yii; use yii\helpers\FileHelper; u…
Theme 类,应用的主题,通过替换路径实现主题的应用,方法为获取根路径和根链接:yii2\base\Theme.php <?php /** * @link http://www.yiiframework.com/ * @copyright Copyright (c) 2008 Yii Software LLC * @license http://www.yiiframework.com/license/ */ namespace yii\base; use Yii; use yii\helpe…