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…
继续了解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剩余代码 /** * @return string|boolean the view file currently being rendered. False if no view file is being rendered. * 当前正在渲染的视图文件 */ public function getViewFile() { return end($this->_viewFiles); } /** * This method is invoked right before [[rende…
Module类的最后代码 /** * Registers sub-modules in the current module. * 注册子模块到当前模块 * Each sub-module should be specified as a name-value pair, where * name refers to the ID of the module and value the module or a configuration * array that can be used to c…
这几天有点忙今天好些了,继续上次的module来吧 /** * Returns the directory that contains the controller classes according to [[controllerNamespace]]. *根据控制器的命名空间返回控制器的目录路径 * Note that in order for this method to return a value, you must define * an alias for the root nam…
今天继续了解model类 /** 2 * Returns the form name that this model class should use. 3 * 4 * 返回表单的名称,就是这个 model 的类名 5 * 6 * The form name is mainly used by [[\yii\widgets\ActiveForm]] to determine how to name 7 * the input fields for the attributes in a mode…
继续了解组件Component.php /** * Returns a value indicating whether a property is defined for this component. * A property is defined if: * * - the class has a getter or setter method associated with the specified name * (in this case, property name is case…
类图关系 属性与方法 class Component extends BaseObject { private $_events = []; private $_eventWildcards = []; private $_behaviors; public function __get($name) public function __set($name, $value) public function __isset($name) public function __unset($name)…