Open framework/yii.php file, override app() static method as follow:
<?php
class Yii extends YiiBase
{
/**
* @static| // Use Gists to store code you would like to remember later on | |
| console.log(window); // log the "window" object to the console |
| " ============================================================================= | |
| " << 判断操作系统是 Windows 还是 Linux 和判断是终端还是 Gvim >> | |
| " ============================================================================= | |
| " ----------------------------------------------------------------------------- | |
| " < 判断操作系统是否是 Windows 还是 Linux > | |
| " ----------------------------------------------------------------------------- | |
| let g:iswindows = 0 | |
| let g:islinux = 0 | |
| if(has("win32") || has("win64") || has("win95") || has("win16")) |
| // A module that can be mixed in to *any object* in order to provide it with | |
| // custom events. You may bind with `on` or remove with `off` callback | |
| // functions to an event; `trigger`-ing an event fires all callbacks in | |
| // succession. | |
| // | |
| // var object = {}; | |
| // _.extend(object, Backbone.Events); | |
| // object.on('expand', function(){ alert('expanded'); }); | |
| // object.trigger('expand'); |