Commit 815c7eff authored by Alexander Kochetov's avatar Alexander Kochetov

Merge branch 'master' of https://github.com/yiisoft/yii2 into auth-manager

parents 3fe23f83 ecbae287
...@@ -13,4 +13,4 @@ nbproject ...@@ -13,4 +13,4 @@ nbproject
Thumbs.db Thumbs.db
# composer vendor dir # composer vendor dir
/framework/vendor /yii/vendor
\ No newline at end of file \ No newline at end of file
<?php <?php
// comment out the following line to disable debug mode
defined('YII_DEBUG') or define('YII_DEBUG', true); defined('YII_DEBUG') or define('YII_DEBUG', true);
require(__DIR__ . '/../../framework/yii.php'); $frameworkPath = __DIR__ . '/../../yii';
require($frameworkPath . '/Yii.php');
// Register Composer autoloader
@include($frameworkPath . '/vendor/autoload.php');
$config = require(__DIR__ . '/protected/config/main.php'); $config = require(__DIR__ . '/protected/config/main.php');
$application = new yii\web\Application($config); $application = new yii\web\Application($config);
......
...@@ -4,6 +4,11 @@ return array( ...@@ -4,6 +4,11 @@ return array(
'id' => 'hello', 'id' => 'hello',
'basePath' => dirname(__DIR__), 'basePath' => dirname(__DIR__),
'preload' => array('log'), 'preload' => array('log'),
'modules' => array(
'debug' => array(
'class' => 'yii\debug\Module',
)
),
'components' => array( 'components' => array(
'cache' => array( 'cache' => array(
'class' => 'yii\caching\FileCache', 'class' => 'yii\caching\FileCache',
......
...@@ -6,6 +6,15 @@ use app\models\ContactForm; ...@@ -6,6 +6,15 @@ use app\models\ContactForm;
class SiteController extends Controller class SiteController extends Controller
{ {
public function actions()
{
return array(
'captcha' => array(
'class' => 'yii\web\CaptchaAction',
),
);
}
public function actionIndex() public function actionIndex()
{ {
echo $this->render('index'); echo $this->render('index');
......
...@@ -26,7 +26,7 @@ class ContactForm extends Model ...@@ -26,7 +26,7 @@ class ContactForm extends Model
// email has to be a valid email address // email has to be a valid email address
array('email', 'email'), array('email', 'email'),
// verifyCode needs to be entered correctly // verifyCode needs to be entered correctly
//array('verifyCode', 'captcha', 'allowEmpty' => !Captcha::checkRequirements()), array('verifyCode', 'captcha'),
); );
} }
......
...@@ -58,6 +58,7 @@ $this->registerAssetBundle('app'); ...@@ -58,6 +58,7 @@ $this->registerAssetBundle('app');
</div> </div>
<?php $this->endBody(); ?> <?php $this->endBody(); ?>
</div> </div>
<?php $this->widget('yii\debug\Toolbar'); ?>
</body> </body>
</html> </html>
<?php $this->endPage(); ?> <?php $this->endPage(); ?>
<?php <?php
use yii\helpers\Html; use yii\helpers\Html;
use yii\widgets\ActiveForm; use yii\widgets\ActiveForm;
use yii\widgets\Captcha;
/** /**
* @var yii\base\View $this * @var yii\base\View $this
...@@ -30,6 +31,15 @@ $this->params['breadcrumbs'][] = $this->title; ...@@ -30,6 +31,15 @@ $this->params['breadcrumbs'][] = $this->title;
<?php echo $form->field($model, 'email')->textInput(); ?> <?php echo $form->field($model, 'email')->textInput(); ?>
<?php echo $form->field($model, 'subject')->textInput(); ?> <?php echo $form->field($model, 'subject')->textInput(); ?>
<?php echo $form->field($model, 'body')->textArea(array('rows' => 6)); ?> <?php echo $form->field($model, 'body')->textArea(array('rows' => 6)); ?>
<?php
$field = $form->field($model, 'verifyCode');
echo $field->begin();
echo $field->label();
$this->widget(Captcha::className());
echo Html::activeTextInput($model, 'verifyCode', array('class' => 'input-medium'));
echo $field->error();
echo $field->end();
?>
<div class="form-actions"> <div class="form-actions">
<?php echo Html::submitButton('Submit', null, null, array('class' => 'btn btn-primary')); ?> <?php echo Html::submitButton('Submit', null, null, array('class' => 'btn btn-primary')); ?>
</div> </div>
......
...@@ -11,7 +11,7 @@ ...@@ -11,7 +11,7 @@
// fcgi doesn't have STDIN defined by default // fcgi doesn't have STDIN defined by default
defined('STDIN') or define('STDIN', fopen('php://stdin', 'r')); defined('STDIN') or define('STDIN', fopen('php://stdin', 'r'));
require(__DIR__ . '/../framework/yii.php'); require(__DIR__ . '/../framework/Yii.php');
$id = 'yiic-build'; $id = 'yiic-build';
$basePath = __DIR__; $basePath = __DIR__;
......
...@@ -64,10 +64,10 @@ ...@@ -64,10 +64,10 @@
"source": "https://github.com/yiisoft/yii2" "source": "https://github.com/yiisoft/yii2"
}, },
"config": { "config": {
"vendor-dir": "framework/vendor" "vendor-dir": "yii/vendor"
}, },
"bin": [ "bin": [
"framework/yiic" "yii/yiic"
], ],
"require": { "require": {
"php": ">=5.3.0", "php": ">=5.3.0",
......
<?php
namespace yiiunit;
class DatabaseTestCase extends TestCase
{
protected $database;
protected $driverName = 'mysql';
protected $db;
protected function setUp()
{
$databases = $this->getParam('databases');
$this->database = $databases[$this->driverName];
$pdo_database = 'pdo_'.$this->driverName;
if (!extension_loaded('pdo') || !extension_loaded($pdo_database)) {
$this->markTestSkipped('pdo and pdo_'.$pdo_database.' extension are required.');
}
}
/**
* @param bool $reset whether to clean up the test database
* @param bool $open whether to open and populate test database
* @return \yii\db\Connection
*/
public function getConnection($reset = true, $open = true)
{
if (!$reset && $this->db) {
return $this->db;
}
$db = new \yii\db\Connection;
$db->dsn = $this->database['dsn'];
if (isset($this->database['username'])) {
$db->username = $this->database['username'];
$db->password = $this->database['password'];
}
if ($open) {
$db->open();
$lines = explode(';', file_get_contents($this->database['fixture']));
foreach ($lines as $line) {
if (trim($line) !== '') {
$db->pdo->exec($line);
}
}
}
$this->db = $db;
return $db;
}
}
...@@ -5,7 +5,7 @@ define('YII_DEBUG', true); ...@@ -5,7 +5,7 @@ define('YII_DEBUG', true);
$_SERVER['SCRIPT_NAME'] = '/' . __DIR__; $_SERVER['SCRIPT_NAME'] = '/' . __DIR__;
$_SERVER['SCRIPT_FILENAME'] = __FILE__; $_SERVER['SCRIPT_FILENAME'] = __FILE__;
require_once(__DIR__ . '/../../framework/yii.php'); require_once(__DIR__ . '/../../yii/Yii.php');
Yii::setAlias('@yiiunit', __DIR__); Yii::setAlias('@yiiunit', __DIR__);
......
<?php <?php
return array( return array(
'mysql' => array( 'databases' => array(
'dsn' => 'mysql:host=127.0.0.1;dbname=yiitest', 'mysql' => array(
'username' => 'travis', 'dsn' => 'mysql:host=127.0.0.1;dbname=yiitest',
'password' => '', 'username' => 'travis',
'fixture' => __DIR__ . '/mysql.sql', 'password' => '',
), 'fixture' => __DIR__ . '/mysql.sql',
),
'sqlite' => array(
'dsn' => 'sqlite::memory:',
'fixture' => __DIR__ . '/sqlite.sql',
),
)
); );
/** /**
* This is the database schema for testing MySQL support of Yii DAO and Active Record. * This is the database schema for testing MySQL support of Yii DAO and Active Record.
* The following database setup is required to perform then relevant tests: * The database setup in config.php is required to perform then relevant tests:
* Database name: yiitest
* username: test
* password: test
* charset: utf8
*/ */
DROP TABLE IF EXISTS tbl_order_item CASCADE; DROP TABLE IF EXISTS tbl_order_item CASCADE;
......
This diff is collapsed.
...@@ -47,7 +47,6 @@ class YiiBaseTest extends TestCase ...@@ -47,7 +47,6 @@ class YiiBaseTest extends TestCase
public function testGetVersion() public function testGetVersion()
{ {
echo Yii::getVersion();
$this->assertTrue((boolean)preg_match('~\d+\.\d+(?:\.\d+)?(?:-\w+)?~', \Yii::getVersion())); $this->assertTrue((boolean)preg_match('~\d+\.\d+(?:\.\d+)?(?:-\w+)?~', \Yii::getVersion()));
} }
......
...@@ -35,7 +35,8 @@ class DbCacheTest extends CacheTest ...@@ -35,7 +35,8 @@ class DbCacheTest extends CacheTest
function getConnection($reset = true) function getConnection($reset = true)
{ {
if($this->_connection === null) { if($this->_connection === null) {
$params = $this->getParam('mysql'); $databases = $this->getParam('databases');
$params = $databases['mysql'];
$db = new \yii\db\Connection; $db = new \yii\db\Connection;
$db->dsn = $params['dsn']; $db->dsn = $params['dsn'];
$db->username = $params['username']; $db->username = $params['username'];
......
...@@ -10,10 +10,11 @@ use yiiunit\data\ar\OrderItem; ...@@ -10,10 +10,11 @@ use yiiunit\data\ar\OrderItem;
use yiiunit\data\ar\Order; use yiiunit\data\ar\Order;
use yiiunit\data\ar\Item; use yiiunit\data\ar\Item;
class ActiveRecordTest extends \yiiunit\MysqlTestCase class ActiveRecordTest extends \yiiunit\DatabaseTestCase
{ {
public function setUp() public function setUp()
{ {
parent::setUp();
ActiveRecord::$db = $this->getConnection(); ActiveRecord::$db = $this->getConnection();
} }
......
...@@ -7,7 +7,7 @@ use yii\db\Command; ...@@ -7,7 +7,7 @@ use yii\db\Command;
use yii\db\Query; use yii\db\Query;
use yii\db\DataReader; use yii\db\DataReader;
class CommandTest extends \yiiunit\MysqlTestCase class CommandTest extends \yiiunit\DatabaseTestCase
{ {
function testConstruct() function testConstruct()
{ {
......
...@@ -4,12 +4,12 @@ namespace yiiunit\framework\db; ...@@ -4,12 +4,12 @@ namespace yiiunit\framework\db;
use yii\db\Connection; use yii\db\Connection;
class ConnectionTest extends \yiiunit\MysqlTestCase class ConnectionTest extends \yiiunit\DatabaseTestCase
{ {
function testConstruct() function testConstruct()
{ {
$connection = $this->getConnection(false); $connection = $this->getConnection(false);
$params = $this->getParam('mysql'); $params = $this->database;
$this->assertEquals($params['dsn'], $connection->dsn); $this->assertEquals($params['dsn'], $connection->dsn);
$this->assertEquals($params['username'], $connection->username); $this->assertEquals($params['username'], $connection->username);
...@@ -18,7 +18,7 @@ class ConnectionTest extends \yiiunit\MysqlTestCase ...@@ -18,7 +18,7 @@ class ConnectionTest extends \yiiunit\MysqlTestCase
function testOpenClose() function testOpenClose()
{ {
$connection = $this->getConnection(false); $connection = $this->getConnection(false, false);
$this->assertFalse($connection->isActive); $this->assertFalse($connection->isActive);
$this->assertEquals(null, $connection->pdo); $this->assertEquals(null, $connection->pdo);
...@@ -39,9 +39,8 @@ class ConnectionTest extends \yiiunit\MysqlTestCase ...@@ -39,9 +39,8 @@ class ConnectionTest extends \yiiunit\MysqlTestCase
function testGetDriverName() function testGetDriverName()
{ {
$connection = $this->getConnection(false); $connection = $this->getConnection(false, false);
$this->assertEquals('mysql', $connection->driverName); $this->assertEquals($this->driverName, $connection->driverName);
$this->assertFalse($connection->isActive);
} }
function testQuoteValue() function testQuoteValue()
......
...@@ -7,7 +7,7 @@ use yii\db\Command; ...@@ -7,7 +7,7 @@ use yii\db\Command;
use yii\db\Query; use yii\db\Query;
use yii\db\DataReader; use yii\db\DataReader;
class QueryTest extends \yiiunit\MysqlTestCase class QueryTest extends \yiiunit\DatabaseTestCase
{ {
function testSelect() function testSelect()
{ {
......
<?php
namespace yiiunit\framework\db\sqlite;
class SqliteActiveRecordTest extends \yiiunit\framework\db\ActiveRecordTest
{
public function setUp()
{
$this->driverName = 'sqlite';
parent::setUp();
}
}
<?php
namespace yiiunit\framework\db\sqlite;
class SqliteCommandTest extends \yiiunit\framework\db\CommandTest
{
public function setUp()
{
$this->driverName = 'sqlite';
parent::setUp();
}
function testAutoQuoting()
{
$db = $this->getConnection(false);
$sql = 'SELECT [[id]], [[t.name]] FROM {{tbl_customer}} t';
$command = $db->createCommand($sql);
$this->assertEquals("SELECT \"id\", 't'.\"name\" FROM 'tbl_customer' t", $command->sql);
}
}
<?php
namespace yiiunit\framework\db\sqlite;
class SqliteConnectionTest extends \yiiunit\framework\db\ConnectionTest
{
public function setUp()
{
$this->driverName = 'sqlite';
parent::setUp();
}
function testConstruct()
{
$connection = $this->getConnection(false);
$params = $this->database;
$this->assertEquals($params['dsn'], $connection->dsn);
}
function testQuoteValue()
{
$connection = $this->getConnection(false);
$this->assertEquals(123, $connection->quoteValue(123));
$this->assertEquals("'string'", $connection->quoteValue('string'));
$this->assertEquals("'It''s interesting'", $connection->quoteValue("It's interesting"));
}
function testQuoteTableName()
{
$connection = $this->getConnection(false);
$this->assertEquals("'table'", $connection->quoteTableName('table'));
$this->assertEquals("'schema'.'table'", $connection->quoteTableName('schema.table'));
$this->assertEquals('{{table}}', $connection->quoteTableName('{{table}}'));
$this->assertEquals('(table)', $connection->quoteTableName('(table)'));
}
function testQuoteColumnName()
{
$connection = $this->getConnection(false);
$this->assertEquals('"column"', $connection->quoteColumnName('column'));
$this->assertEquals("'table'.\"column\"", $connection->quoteColumnName('table.column'));
$this->assertEquals('[[column]]', $connection->quoteColumnName('[[column]]'));
$this->assertEquals('{{column}}', $connection->quoteColumnName('{{column}}'));
$this->assertEquals('(column)', $connection->quoteColumnName('(column)'));
}
}
<?php
/**
* Created by JetBrains PhpStorm.
* User: RusMaxim
* Date: 09.05.13
* Time: 21:41
* To change this template use File | Settings | File Templates.
*/
namespace yiiunit\framework\db\sqlite;
class SqliteQueryTest extends \yiiunit\framework\db\QueryTest
{
public function setUp()
{
$this->driverName = 'sqlite';
parent::setUp();
}
}
...@@ -12,6 +12,16 @@ class ArrayHelperTest extends \yii\test\TestCase ...@@ -12,6 +12,16 @@ class ArrayHelperTest extends \yii\test\TestCase
} }
public function testRemove()
{
$array = array('name' => 'b', 'age' => 3);
$name = ArrayHelper::remove($array, 'name');
$this->assertEquals($name, 'b');
$this->assertEquals($array, array('age' => 3));
}
public function testMultisort() public function testMultisort()
{ {
// single key // single key
......
...@@ -70,4 +70,48 @@ class StringHelperTest extends \yii\test\TestCase ...@@ -70,4 +70,48 @@ class StringHelperTest extends \yii\test\TestCase
$this->assertEquals('PostTag', StringHelper::id2camel('post-tag')); $this->assertEquals('PostTag', StringHelper::id2camel('post-tag'));
$this->assertEquals('PostTag', StringHelper::id2camel('post_tag', '_')); $this->assertEquals('PostTag', StringHelper::id2camel('post_tag', '_'));
} }
public function testBasename()
{
$this->assertEquals('', StringHelper::basename(''));
$this->assertEquals('file', StringHelper::basename('file'));
$this->assertEquals('file.test', StringHelper::basename('file.test', '.test2'));
$this->assertEquals('file', StringHelper::basename('file.test', '.test'));
$this->assertEquals('file', StringHelper::basename('/file'));
$this->assertEquals('file.test', StringHelper::basename('/file.test', '.test2'));
$this->assertEquals('file', StringHelper::basename('/file.test', '.test'));
$this->assertEquals('file', StringHelper::basename('/path/to/file'));
$this->assertEquals('file.test', StringHelper::basename('/path/to/file.test', '.test2'));
$this->assertEquals('file', StringHelper::basename('/path/to/file.test', '.test'));
$this->assertEquals('file', StringHelper::basename('\file'));
$this->assertEquals('file.test', StringHelper::basename('\file.test', '.test2'));
$this->assertEquals('file', StringHelper::basename('\file.test', '.test'));
$this->assertEquals('file', StringHelper::basename('C:\file'));
$this->assertEquals('file.test', StringHelper::basename('C:\file.test', '.test2'));
$this->assertEquals('file', StringHelper::basename('C:\file.test', '.test'));
$this->assertEquals('file', StringHelper::basename('C:\path\to\file'));
$this->assertEquals('file.test', StringHelper::basename('C:\path\to\file.test', '.test2'));
$this->assertEquals('file', StringHelper::basename('C:\path\to\file.test', '.test'));
// mixed paths
$this->assertEquals('file.test', StringHelper::basename('/path\to/file.test'));
$this->assertEquals('file.test', StringHelper::basename('/path/to\file.test'));
$this->assertEquals('file.test', StringHelper::basename('\path/to\file.test'));
// \ and / in suffix
$this->assertEquals('file', StringHelper::basename('/path/to/filete/st', 'te/st'));
$this->assertEquals('st', StringHelper::basename('/path/to/filete/st', 'te\st'));
$this->assertEquals('file', StringHelper::basename('/path/to/filete\st', 'te\st'));
$this->assertEquals('st', StringHelper::basename('/path/to/filete\st', 'te/st'));
// http://www.php.net/manual/en/function.basename.php#72254
$this->assertEquals('foo', StringHelper::basename('/bar/foo/'));
$this->assertEquals('foo', StringHelper::basename('\\bar\\foo\\'));
}
} }
<?php <?php
require(__DIR__ . '/../../../framework/yii.php'); require(__DIR__ . '/../../../yii/Yii.php');
$application = new yii\web\Application('test', __DIR__ . '/protected'); $application = new yii\web\Application('test', __DIR__ . '/protected');
$application->run(); $application->run();
...@@ -158,8 +158,8 @@ class YiiBase ...@@ -158,8 +158,8 @@ class YiiBase
{ {
foreach ($namespaces as $name => $path) { foreach ($namespaces as $name => $path) {
if ($name !== '') { if ($name !== '') {
$name = '@' . str_replace('\\', '/', $name); $name = trim(strtr($name, array('\\' => '/', '_' => '/')), '/');
static::setAlias($name, $path); static::setAlias('@' . $name, rtrim($path, '/\\') . '/' . $name);
} }
} }
} }
...@@ -370,7 +370,8 @@ class YiiBase ...@@ -370,7 +370,8 @@ class YiiBase
include($classFile); include($classFile);
if (class_exists($className, false) || interface_exists($className, false)) { if (class_exists($className, false) || interface_exists($className, false) ||
function_exists('trait_exists') && trait_exists($className, false)) {
return true; return true;
} else { } else {
throw new UnknownClassException("Unable to find '$className' in file: $classFile"); throw new UnknownClassException("Unable to find '$className' in file: $classFile");
......
...@@ -28,4 +28,18 @@ return array( ...@@ -28,4 +28,18 @@ return array(
), ),
'depends' => array('yii', 'yii/validation'), 'depends' => array('yii', 'yii/validation'),
), ),
'yii/captcha' => array(
'sourcePath' => __DIR__ . '/assets',
'js' => array(
'yii.captcha.js',
),
'depends' => array('yii'),
),
'yii/debug' => array(
'sourcePath' => __DIR__ . '/assets',
'js' => array(
'yii.debug.js',
),
'depends' => array('yii'),
),
); );
...@@ -116,8 +116,8 @@ ...@@ -116,8 +116,8 @@
}); });
}, },
options: function() { data: function() {
return this.data('yiiActiveForm').settings; return this.data('yiiActiveForm');
}, },
submitForm: function () { submitForm: function () {
...@@ -384,4 +384,4 @@ ...@@ -384,4 +384,4 @@
} }
}; };
})(window.jQuery); })(window.jQuery);
\ No newline at end of file
/**
* Yii Captcha widget.
*
* This is the JavaScript widget used by the yii\widgets\Captcha widget.
*
* @link http://www.yiiframework.com/
* @copyright Copyright (c) 2008 Yii Software LLC
* @license http://www.yiiframework.com/license/
* @author Qiang Xue <qiang.xue@gmail.com>
* @since 2.0
*/
(function ($) {
$.fn.yiiCaptcha = function (method) {
if (methods[method]) {
return methods[method].apply(this, Array.prototype.slice.call(arguments, 1));
} else if (typeof method === 'object' || !method) {
return methods.init.apply(this, arguments);
} else {
$.error('Method ' + method + ' does not exist on jQuery.yiiCaptcha');
return false;
}
};
var defaults = {
refreshUrl: undefined,
hashKey: undefined
};
var methods = {
init: function (options) {
return this.each(function () {
var $e = $(this);
var settings = $.extend({}, defaults, options || {});
$e.data('yiiCaptcha', {
settings: settings
});
$e.on('click.yiiCaptcha', function() {
methods.refresh.apply($e);
return false;
});
});
},
refresh: function () {
var $e = this,
settings = this.data('yiiCaptcha').settings;
$.ajax({
url: $e.data('yiiCaptcha').settings.refreshUrl,
dataType: 'json',
cache: false,
success: function(data) {
$e.attr('src', data['url']);
$('body').data(settings.hashKey, [data['hash1'], data['hash2']]);
}
});
},
destroy: function () {
return this.each(function () {
$(window).unbind('.yiiCaptcha');
$(this).removeData('yiiCaptcha');
});
},
data: function() {
return this.data('yiiCaptcha');
}
};
})(window.jQuery);
/**
* Yii debug module.
*
* This JavaScript module provides the functions needed by the Yii debug toolbar.
*
* @link http://www.yiiframework.com/
* @copyright Copyright (c) 2008 Yii Software LLC
* @license http://www.yiiframework.com/license/
* @author Qiang Xue <qiang.xue@gmail.com>
* @since 2.0
*/
yii.debug = (function ($) {
return {
load: function (id, url) {
$.ajax({
url: url,
//dataType: 'json',
success: function(data) {
var $e = $('#' + id);
$e.html(data);
}
});
}
};
})(jQuery);
/** /**
* Yii validation module. * Yii validation module.
* *
* This JavaScript module provides the validation methods for the built-in validaotrs. * This JavaScript module provides the validation methods for the built-in validators.
* *
* @link http://www.yiiframework.com/ * @link http://www.yiiframework.com/
* @copyright Copyright (c) 2008 Yii Software LLC * @copyright Copyright (c) 2008 Yii Software LLC
......
...@@ -203,7 +203,7 @@ class Controller extends Component ...@@ -203,7 +203,7 @@ class Controller extends Component
public function forward($route, $params = array()) public function forward($route, $params = array())
{ {
$status = $this->run($route, $params); $status = $this->run($route, $params);
exit($status); Yii::$app->end($status);
} }
/** /**
......
...@@ -22,6 +22,14 @@ use yii\helpers\Html; ...@@ -22,6 +22,14 @@ use yii\helpers\Html;
*/ */
class View extends Component class View extends Component
{ {
/**
* @event ViewEvent an event that is triggered by [[beginPage()]].
*/
const EVENT_BEGIN_PAGE = 'beginPage';
/**
* @event ViewEvent an event that is triggered by [[endPage()]].
*/
const EVENT_END_PAGE = 'endPage';
/** /**
* @event ViewEvent an event that is triggered by [[renderFile()]] right before it renders a view file. * @event ViewEvent an event that is triggered by [[renderFile()]] right before it renders a view file.
*/ */
...@@ -555,6 +563,8 @@ class View extends Component ...@@ -555,6 +563,8 @@ class View extends Component
{ {
ob_start(); ob_start();
ob_implicit_flush(false); ob_implicit_flush(false);
$this->trigger(self::EVENT_BEGIN_PAGE);
} }
/** /**
...@@ -562,6 +572,8 @@ class View extends Component ...@@ -562,6 +572,8 @@ class View extends Component
*/ */
public function endPage() public function endPage()
{ {
$this->trigger(self::EVENT_END_PAGE);
$content = ob_get_clean(); $content = ob_get_clean();
echo strtr($content, array( echo strtr($content, array(
self::PL_HEAD => $this->renderHeadHtml(), self::PL_HEAD => $this->renderHeadHtml(),
......
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment