04 2016 档案
摘要:property)`. * * 重写 Object 中的 isset 方法,添加对 behaviors 的处理,循环 behaviors,如果其中有相应的属性,就认为有 * * @param string $name the property name or the event name * @return boolean whether the...
阅读全文
摘要:接下来我们来了解Component.php 目录为:vendor/yiisoft/yii2/base/Component.php 为了对Component.php有个初级的认识,我先截取一段yii2.0手册上的注释。 组件(Component)与对象(Object) Yii 2.0 把 1.1 中的
阅读全文
摘要:今天我们来看一下Model.php 目录:base/Model.php
阅读全文
摘要:今天我们继续来挖Application.php 下面我们来看一下ArrayableTrait.php
阅读全文
摘要:今天我们继续来探索Component.php 下面我们来看一下Application.php
阅读全文
摘要:继续解读Object.php 接下来接续了解Component.php
阅读全文
摘要:现在我们来揭开YII2最基础的类Object.php类这神秘的面纱(他是所有类的老祖宗)! 目录位置是base/Object.php
阅读全文
摘要:因为此类继承了Object,下一篇我们着重分析一下Object.php这个类。
阅读全文
摘要:接下来我们继续了解Component.php 目录为:vendor/yiisoft/yii2/base/Component.php (接上次的代码) //此方法将检查是否有附加的行为有 命名方法(如果可用)将执行它。
阅读全文
摘要:今天开始阅读vendor/yiisoft/yii2/base/Action.php 我们接下来先重点了解一下Component.php 目录为:vendor/yiisoft/yii2/base/Component.php /** * Component is the base class that
阅读全文
摘要:今天继续阅读vendor/yiisoft/yii2/web/User.php protected function loginByCookie() //用户的日志。 { $value = Yii::$app->getRequest()->getCookies()->getValue($this->identityCookie['name']); //根据登录的Cook...
阅读全文
摘要:今天阅读的是vendor/yiisoft/yii2/web/User.php '_identity', 'httpOnly' => true];//COOKIE的配置,仅当登录时是正确的。 public $authTimeout; //用户登录的状态,如果非活动状态,注销。 public $absoluteAuthTimeout; public $autoRe...
阅读全文
摘要:本章描述了如何在你的应用中创建一个新的 “Hello” 页面。为了实现这一目标,将会创建一个操作和一个视图: 应用将会分派页面请求给操作 操作将会依次渲染视图呈现 “Hello” 给最终用户 创建操作 为了 “Hello”,需要创建一个 say 操作,从请求中接收 message 参数并显示给最终用
阅读全文