{"id":186596,"date":"2013-07-14T22:36:03","date_gmt":"2013-07-14T18:36:03","guid":{"rendered":"http:\/\/savepearlharbor.com\/?p=186596"},"modified":"-0001-11-30T00:00:00","modified_gmt":"-0001-11-29T21:00:00","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=186596","title":{"rendered":"<span class=\"post_title\">Yii 1.1.14 RC<\/span>"},"content":{"rendered":"<div class=\"content html_format\">   \t\u0412\u044b\u0448\u0435\u043b \u043a\u0430\u043d\u0434\u0438\u0434\u0430\u0442 \u0432 \u0440\u0435\u043b\u0438\u0437\u044b PHP \u0444\u0440\u0435\u0439\u043c\u0432\u043e\u0440\u043a\u0430 Yii 1.1.14. \u0417\u0430\u0431\u0440\u0430\u0442\u044c \u043c\u043e\u0436\u043d\u043e \u0441 <a href=\"https:\/\/github.com\/yiisoft\/yii\/releases\/tag\/1.1.14-rc\">GitHub<\/a>.<\/p>\n<p>  \u0418\u0441\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u044b \u0431\u043e\u043b\u0435\u0435 80 \u043e\u0448\u0438\u0431\u043e\u043a, \u0434\u043e\u0431\u0430\u0432\u043b\u0435\u043d\u043e \u0431\u043e\u043b\u0435\u0435 60 \u043d\u0435\u0431\u043e\u043b\u044c\u0448\u0438\u0445 \u0443\u043b\u0443\u0447\u0448\u0435\u043d\u0438\u0439 \u0438 \u043d\u043e\u0432\u044b\u0445 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u0435\u0439. \u041f\u043e\u044f\u0432\u0438\u043b\u0441\u044f \u043d\u043e\u0432\u044b\u0439 \u043a\u043b\u0430\u0441\u0441<br \/>  <code>CPasswordHelper<\/code>, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043f\u0440\u0435\u0434\u043e\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u0442 \u043d\u0430\u0434\u0451\u0436\u043d\u044b\u0439 \u043c\u0435\u0442\u043e\u0434 \u0445\u0440\u0430\u043d\u0435\u043d\u0438\u044f \u0438 \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0438 \u0445\u0435\u0448\u0435\u0439 \u043f\u0430\u0440\u043e\u043b\u0435\u0439. \u0422\u0430\u043a\u0436\u0435 \u0434\u043e\u0431\u0430\u0432\u043b\u0435\u043d <code>CRedisCache<\/code>,<br \/>  \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u043a\u043e\u0442\u043e\u0440\u043e\u0433\u043e \u043c\u043e\u0436\u043d\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c Redis \u0434\u043b\u044f \u0445\u0440\u0430\u043d\u0435\u043d\u0438\u0439 \u043a\u0435\u0448\u0430. Yii \u043c\u043e\u0436\u0435\u0442 \u0431\u044b\u0442\u044c \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043b\u0435\u043d \u043a\u0430\u043a<br \/>  <a href=\"https:\/\/packagist.org\/packages\/yiisoft\/yii\">\u043f\u0430\u043a\u0435\u0442 Composer<\/a>. \u041f\u043e\u043b\u043d\u044b\u0439 \u0441\u043f\u0438\u0441\u043e\u043a \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u0439 \u0434\u0430\u043d<br \/>  \u0432 <a href=\"https:\/\/raw.github.com\/yiisoft\/yii\/1.1.14-rc\/CHANGELOG\">changelog<\/a>.<\/p>\n<p>  \u0417\u043d\u0430\u0447\u0438\u0442\u0435\u043b\u044c\u043d\u0443\u044e \u0447\u0430\u0441\u0442\u044c \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u0439 \u0441\u0434\u0435\u043b\u0430\u043b\u0438 \u0447\u043b\u0435\u043d\u044b \u0441\u043e\u043e\u0431\u0449\u0435\u0441\u0442\u0432\u0430: <a href=\"http:\/\/habrahabr.ru\/users\/creocoder\/\" class=\"user_link\">creocoder<\/a>, tom&#8212;, paystey, Ragazzo, antoncpu, Yiivgeny \u0438 \u0434\u0440\u0443\u0433\u0438\u0435,<br \/>  \u0437\u0430 \u0447\u0442\u043e \u0438\u043c \u043e\u0433\u0440\u043e\u043c\u043d\u043e\u0435 \u0441\u043f\u0430\u0441\u0438\u0431\u043e.<\/p>\n<p>  \u0422\u0430\u043a \u043a\u0430\u043a \u044d\u0442\u043e \u043a\u0430\u043d\u0434\u0438\u0434\u0430\u0442 \u0432 \u0440\u0435\u043b\u0438\u0437\u044b (RC), \u043d\u0435 \u0441\u0442\u043e\u0438\u0442 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0435\u0433\u043e \u043d\u0430 \u0431\u043e\u0435\u0432\u044b\u0445 \u0441\u0435\u0440\u0432\u0435\u0440\u0430\u0445. \u0421\u0442\u0430\u0431\u0438\u043b\u044c\u043d\u044b\u0439 \u0440\u0435\u043b\u0438\u0437 1.1.14 \u0431\u0443\u0434\u0435\u0442 \u0434\u043e\u0441\u0442\u043f\u0435\u043d \u0432<br \/>  \u0442\u0435\u0447\u0435\u043d\u0438\u0435 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u0438\u0445 \u043d\u0435\u0434\u0435\u043b\u044c, \u0430 \u043f\u043e\u043a\u0430 \u043c\u044b \u0431\u0443\u0434\u0435\u043c \u043e\u0447\u0435\u043d\u044c \u043f\u0440\u0438\u0437\u043d\u0430\u0442\u0435\u043b\u044c\u043d\u044b, \u0435\u0441\u043b\u0438 \u0432\u044b <b>\u043f\u0440\u043e\u0432\u0435\u0440\u0438\u0442\u0435 RC \u0438<br \/>  <a href=\"https:\/\/github.com\/yiisoft\/yii\/issues\">\u0441\u043e\u043e\u0431\u0449\u0438\u0442\u0435 \u043d\u0430\u043c \u043e\u0431 \u043e\u0448\u0438\u0431\u043a\u0430\u0445<\/a><\/b>. \u0417\u0430\u0440\u0430\u043d\u0435\u0435 \u0441\u043f\u0430\u0441\u0438\u0431\u043e.<\/p>\n<p>  \u041d\u0443 \u0430 \u0442\u0435\u043f\u0435\u0440\u044c \u0440\u0430\u0441\u0441\u043c\u043e\u0442\u0440\u0438\u043c \u0433\u043b\u0430\u0432\u043d\u044b\u0435 \u0443\u043b\u0443\u0447\u0448\u0435\u043d\u0438\u044f.<\/p>\n<p>  <a name=\"habracut\"><\/a><\/p>\n<h4>\u041d\u043e\u0432\u044b\u0439 \u043a\u043b\u0430\u0441\u0441 <code>CPasswordHelper<\/code><\/h4>\n<p>  <code>CPasswordHelper<\/code> \u043f\u0440\u0435\u0434\u043e\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u0442 \u043d\u0430\u0434\u0451\u0436\u043d\u044b\u0439 \u043c\u0435\u0442\u043e\u0434 \u0445\u0440\u0430\u043d\u0435\u043d\u0438\u044f \u0438 \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0438 \u0445\u0435\u0448\u0435\u0439 \u043f\u0430\u0440\u043e\u043b\u0435\u0439. \u0418\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0435\u0433\u043e \u043e\u0447\u0435\u043d\u044c \u043f\u0440\u043e\u0441\u0442\u043e:<\/p>\n<pre><code class=\"php\">\/\/ \u0433\u0435\u043d\u0435\u0440\u0438\u0440\u0443\u0435\u043c \u0445\u0435\u0448, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0437\u0430\u0442\u0435\u043c \u0431\u0443\u0434\u0435\u0442 \u0441\u043e\u0445\u0440\u0430\u043d\u0451\u043d \u0432 \u0411\u0414. $password \u043f\u0440\u0438\u0445\u043e\u0434\u0438\u0442 \u0438\u0437 \u0444\u043e\u0440\u043c\u044b \u0440\u0435\u0433\u0438\u0441\u0442\u0440\u0430\u0446\u0438\u0438 $hash = CPasswordHelper::hashPassword($password);  \/\/ $hash \u2014 \u044d\u0442\u043e \u0442\u043e, \u0447\u0442\u043e \u043c\u044b \u0441\u043e\u0445\u0440\u0430\u043d\u044f\u043b\u0438 \u0432 \u0411\u0414, $password \u043f\u0440\u0438\u0445\u043e\u0434\u0438\u0442 \u0438\u0437 \u0444\u043e\u0440\u043c\u044b \u043b\u043e\u0433\u0438\u043d\u0430 if (CPasswordHelper::verifyPassword($password, $hash)   \/\/ \u0432\u0441\u0451 \u0445\u043e\u0440\u043e\u0448\u043e else   \/\/ \u043d\u0435\u043f\u0440\u0430\u0432\u0438\u043b\u044c\u043d\u044b\u0439 \u043f\u0430\u0440\u043e\u043b\u044c <\/code><\/pre>\n<h4>\u041d\u043e\u0432\u044b\u0439 \u043c\u0435\u0442\u043e\u0434 <code>CDbCommandBuilder::createMultipleInsertCommand()<\/code><\/h4>\n<p>  \u041f\u0440\u0438 \u043f\u043e\u043c\u043e\u0449\u0438 <code>CDbCommandBuilder::createMultipleInsertCommand()<\/code> \u0441\u0442\u0430\u043b\u043e \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u044b\u043c \u0432\u0441\u0442\u0430\u0432\u0438\u0442\u044c \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0437\u0430\u043f\u0438\u0441\u0435\u0439 \u0437\u0430 \u043e\u0434\u0438\u043d \u0437\u0430\u043f\u0440\u043e\u0441:<\/p>\n<pre><code class=\"php\">$builder=Yii::app()-&gt;db-&gt;schema-&gt;commandBuilder; $command=$builder-&gt;createMultipleInsertCommand('tbl_post', array(   array('title' =&gt; 'record 1', 'text' =&gt; 'text1'),   array('title' =&gt; 'record 2', 'text' =&gt; 'text2'), )); $command-&gt;execute(); <\/code><\/pre>\n<h4><code>CRedisCache<\/code><\/h4>\n<p>  \u0422\u0435\u043f\u0435\u0440\u044c \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435 \u043c\u043e\u0436\u043d\u043e \u0441\u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0434\u043b\u044f \u0445\u0440\u0430\u043d\u0435\u043d\u0438\u044f \u043a\u0435\u0448\u0430 \u0432 Redis. \u0414\u0435\u043b\u0430\u0435\u0442\u0441\u044f \u0447\u0435\u0440\u0435\u0437 `protected\/config\/main.php`:<\/p>\n<pre><code class=\"php\">array(   \/\/ ...   'components'=&gt;array(     'cache'=&gt;array(       'class'=&gt;'CRedisCache',       'hostname'=&gt;'localhost',       'port'=&gt;6379,       'database'=&gt;0,     ),   ), ) <\/code><\/pre>\n<h4>\u0423\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0430 Yii \u043a\u0430\u043a <a href=\"https:\/\/packagist.org\/packages\/yiisoft\/yii\">\u043f\u0430\u043a\u0435\u0442 Composer<\/a>:<\/h4>\n<p>  Yii \u0442\u0435\u043f\u0435\u0440\u044c \u043c\u043e\u0436\u043d\u043e \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u044c \u0447\u0435\u0440\u0435\u0437 <a href=\"https:\/\/packagist.org\/packages\/yiisoft\/yii\">Composer<\/a>. \u0414\u043b\u044f \u044d\u0442\u043e\u0433\u043e \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u0434\u043e\u0431\u0430\u0432\u0438\u0442\u044c<br \/>  \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0435\u0435 \u0432 <code>composer.json<\/code>.<\/p>\n<pre><code class=\"javascript\">&quot;yiisoft\/yii&quot;: &quot;dev-master&quot; <\/code><\/pre>\n<h4>\u041e\u0442\u043b\u043e\u0433\u0438\u043d\u043e\u0432\u0430\u043d\u0438\u0435 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f \u043f\u043e\u0441\u043b\u0435 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0451\u043d\u043d\u043e\u0433\u043e \u0432\u0440\u0435\u043c\u0435\u043d\u0438<\/h4>\n<p>  \u0415\u0441\u043b\u0438 \u0432\u0430\u043c \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u043e\u0442\u043b\u043e\u0433\u0438\u043d\u0438\u0442\u044c \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f \u0447\u0435\u0440\u0435\u0437 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0451\u043d\u043d\u043e\u0435 \u0432\u0440\u0435\u043c\u044f \u0432\u043d\u0435 \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u0438 \u043e\u0442 \u0435\u0433\u043e \u0430\u043a\u0442\u0438\u0432\u043d\u043e\u0441\u0442\u0438, \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u044d\u0442\u043e<br \/>  \u043c\u043e\u0436\u043d\u043e \u0442\u0430\u043a:<\/p>\n<pre><code class=\"php\">  \/\/ ...   'components'=&gt;array(     'user'=&gt;array(       \/\/ ...       'absoluteAuthTimeout' =&gt; 60*60*24;     ),   ), ) <\/code><\/pre>\n<h4>\u041f\u043e\u0434\u0434\u0435\u0440\u0436\u043a\u0430 RANGE \u043f\u0440\u0438 \u043e\u0442\u0434\u0430\u0447\u0435 \u0444\u0430\u0439\u043b\u043e\u0432<\/h4>\n<p>  \u041f\u0440\u0438 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0438 <code>CHttpRequest::sendFile<\/code> Yii \u0442\u0435\u043f\u0435\u0440\u044c \u0432\u0435\u0440\u043d\u043e \u043e\u0442\u0432\u0435\u0447\u0430\u0435\u0442 \u043d\u0430 RANGE \u0437\u0430\u043f\u0440\u043e\u0441\u044b, \u0442\u043e \u0435\u0441\u0442\u044c \u043a\u043e\u043d\u0435\u0447\u043d\u044b\u0439 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c<br \/>  \u043f\u043e\u043b\u0443\u0447\u0430\u0435\u0442 \u0431\u043e\u043b\u044c\u0448\u0443\u044e \u0441\u043a\u043e\u0440\u043e\u0441\u0442\u044c \u043f\u0440\u0438 \u0441\u043a\u0430\u0447\u0438\u0432\u0430\u043d\u0438\u0438 \u0432 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u043f\u043e\u0442\u043e\u043a\u043e\u0432.<\/p>\n<h4>\u0418\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435 <code>through<\/code> \u0441 <code>BELONGS_TO<\/code><\/h4>\n<p>  \u041e\u043f\u0446\u0438\u044f \u00abthrough\u00bb \u0442\u0435\u043f\u0435\u0440\u044c \u043c\u043e\u0436\u0435\u0442 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c\u0441\u044f \u0441 <code>CActiveRecord::BELONGS_TO<\/code>. \u041f\u043e\u0434\u0440\u043e\u0431\u043d\u0435\u0435 \u043e\u0431 \u044d\u0442\u043e\u043c<br \/>  <a href=\"http:\/\/www.yiiframework.com\/doc\/guide\/1.1\/ru\/database.arr#relational-query-with-through\">\u043d\u0430\u043f\u0438\u0441\u0430\u043d\u043e \u0432 \u043f\u043e\u043b\u043d\u043e\u043c \u0440\u0443\u043a\u043e\u0432\u043e\u0434\u0441\u0442\u0432\u0435<\/a>.<\/p>\n<h4>\u0412\u044b\u0431\u043e\u0440\u043e\u0447\u043d\u043e\u0435 \u043b\u043e\u0433\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435 \u0433\u043b\u043e\u0431\u0430\u043b\u044c\u043d\u044b\u0445 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0445<\/h4>\n<p>  <code>CLogFilter::$logVars<\/code> \u0442\u0435\u043f\u0435\u0440\u044c \u043f\u0440\u0438\u043d\u0438\u043c\u0430\u0435\u0442 \u043c\u0430\u0441\u0441\u0438\u0432 \u043c\u0430\u0441\u0441\u0438\u0432\u043e\u0432, \u0432 \u043a\u043e\u0442\u043e\u0440\u043e\u043c \u043c\u043e\u0436\u043d\u043e \u0443\u043a\u0430\u0437\u0430\u0442\u044c, \u0447\u0442\u043e \u0438\u043c\u0435\u043d\u043d\u043e \u043b\u043e\u0433\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0438\u0437 <code>$GLOBALS<\/code>:<\/p>\n<pre><code class=\"php\">\t'components'=&gt;array( \t\t'log'=&gt;array( \t\t\t'class'=&gt;'CLogRouter', \t\t\t'routes'=&gt;array( \t\t\t\tarray( \t\t\t\t\t'class'=&gt;'system.logging.CWebLogRoute', \t\t\t\t\t'filter'=&gt;array( \t\t\t\t\t\t'class'=&gt;'system.logging.CLogFilter', \t\t\t\t\t\t'logVars'=&gt;array( \t\t\t\t\t\t\t'_COOKIE', \/\/ \u0441\u0442\u0430\u0440\u044b\u0439 \u0441\u0438\u043d\u0442\u0430\u043a\u0441\u0438\u0441, &lt; 1.1.14 \t\t\t\t\t\t\tarray('_SERVER','REMOTE_ADDR'), \/\/ \u043d\u043e\u0432\u044b\u0439 \u0441\u0438\u043d\u0442\u0430\u043a\u0441\u0438\u0441, &gt;= 1.1.14 \t\t\t\t\t\t\tarray('_SERVER','HTTP_USER_AGENT'), \/\/ \u043d\u043e\u0432\u044b\u0439 \u0441\u0438\u043d\u0442\u0430\u043a\u0441\u0438\u0441, &gt;= 1.1.14 \t\t\t\t\t\t), \t\t\t\t\t), \t\t\t\t), \t\t\t), \t\t), \t), <\/code><\/pre>\n<p>  \u041f\u0440\u0438\u0432\u0435\u0434\u0451\u043d\u043d\u0430\u044f \u0432\u044b\u0448\u0435 \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u044f \u0434\u0430\u0441\u0442 \u0432 \u043b\u043e\u0433\u0435 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0435\u0435:<\/p>\n<pre><code class=\"php\">$_COOKIE=array (   '__utma' =&gt; '111872281.473431406.1366046648.1366046648.1366046648.1',   '__utmz' =&gt; '111872281.1366046648.1.1.utmcsr=(direct)|utmccn=(direct)|utmcmd=(none)',   'cartVisible' =&gt; '1',   '96ab4aec0c2977c9b793d4ba009eb3ce' =&gt; '...',   'PHPSESSID' =&gt; 'vb8pk7obs3q2lc7bl8ield7si7', )  $_SERVER.REMOTE_ADDR='::1'  $_SERVER.HTTP_USER_AGENT='Mozilla\/5.0 (Windows NT 6.1; WOW64; rv:22.0) Gecko\/20100101 Firefox\/22.0' <\/code><\/pre>\n<h4>\u041d\u043e\u0432\u044b\u0439 <code>CLocalizedFormatter<\/code><\/h4>\n<p>  \u041d\u043e\u0432\u044b\u0439 \u043a\u043b\u0430\u0441\u0441 <code>CLocalizedFormatter<\/code> \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u0444\u043e\u0440\u043c\u0430\u0442\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f \u0432 \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0438\u0438 \u0441 \u0442\u0435\u043a\u0443\u0449\u0435\u0439 \u043b\u043e\u043a\u0430\u043b\u044c\u044e:<\/p>\n<pre><code class=\"php\">'components'=&gt;array( \t'format'=&gt;array( \t\t'class'=&gt;'system.utils.CLocalizedFormatter', \t\t'locale'=&gt;'en_US', \t), \t'germanFormat'=&gt;array( \t\t'class'=&gt;'system.utils.CLocalizedFormatter', \t\t'locale'=&gt;'de_DE', \t), \t'russianFormat'=&gt;array( \t\t'class'=&gt;'system.utils.CLocalizedFormatter', \t\t'locale'=&gt;'ru_RU', \t), ),  <\/code><\/pre>\n<pre><code class=\"php\">echo Yii::app()-&gt;format-&gt;formatDatetime(time()) . &quot;\\n&quot;; echo Yii::app()-&gt;germanFormat-&gt;formatDatetime(time()) . &quot;\\n&quot;; echo Yii::app()-&gt;russianFormat-&gt;formatDatetime(time()) . &quot;\\n&quot;;  \/\/ Jul 7, 2013 9:34:56 PM \/\/ 07.07.2013 21:34:56 \/\/ 07.07.2013, 21:34:56 <\/code><\/pre>\n<h4>\u0413\u0435\u043d\u0435\u0440\u0430\u0446\u0438\u044f \u043d\u0430\u0437\u0432\u0430\u043d\u0438\u0439 \u043f\u043e\u043b\u0435\u0439 \u0438\u0437 \u043a\u043e\u043c\u043c\u0435\u043d\u0442\u0430\u0440\u0438\u0435\u0432 \u0411\u0414<\/h4>\n<p>  Gii \u0442\u0435\u043f\u0435\u0440\u044c \u043c\u043e\u0436\u0435\u0442 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u043a\u043e\u043c\u043c\u0435\u043d\u0442\u0430\u0440\u0438\u0438 \u043a \u043f\u043e\u043b\u044f\u043c \u0442\u0430\u0431\u043b\u0438\u0446\u044b \u0432 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435 \u043d\u0430\u0437\u0432\u0430\u043d\u0438\u0439 \u043f\u043e\u043b\u0435\u0439 \u0433\u0435\u043d\u0435\u0440\u0438\u0440\u0443\u0435\u043c\u043e\u0439 \u043c\u043e\u0434\u0435\u043b\u0438. \u041a \u043f\u0440\u0438\u043c\u0435\u0440\u0443,<br \/>  \u0435\u0441\u043b\u0438 \u0442\u0430\u0431\u043b\u0438\u0446\u0443 \u0441\u043e\u0437\u0434\u0430\u0442\u044c \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c:<\/p>\n<pre><code class=\"sql\">CREATE TABLE `tbl_user` (   `id`  int(11) NOT NULL AUTO_INCREMENT,   `first_name` varchar(100) NOT NULL COMMENT '\u0418\u043c\u044f:',   `last_name` varchar(100) NOT NULL COMMENT 'Nachname:',   `title` varchar(50) NOT NULL COMMENT 'Title (e.g. Mr., Mrs., etc.):',   PRIMARY KEY (`id`) ) ENGINE=InnoDB AUTO_INCREMENT=1; <\/code><\/pre>\n<p>  \u0422\u043e \u0441\u0433\u0435\u043d\u0435\u0440\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0439 \u043c\u0435\u0442\u043e\u0434 <code>attributeLabels<\/code> \u0431\u0443\u0434\u0435\u0442 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u043c (\u0435\u0441\u043b\u0438 \u0432\u044b\u0431\u0440\u0430\u0442\u044c \u00abUse Column Comments as Attribute Labels\u00bb \u0432 Gii):<\/p>\n<pre><code class=\"php\">\/**  * @return array customized attribute labels (name=&gt;label)  *\/ public function attributeLabels() { \treturn array( \t\t'id' =&gt; 'ID', \t\t'first_name' =&gt; '\u0418\u043c\u044f:', \t\t'last_name' =&gt; 'Nachname:', \t\t'title' =&gt; 'Title (e.g. Mr., Mrs., etc.):', \t); }  <\/code><\/pre>\n<h4>\u041d\u043e\u0432\u044b\u0435 \u043c\u0435\u0442\u043e\u0434\u044b \u0432 <code>CSecurityManager<\/code><\/h4>\n<p>  \u0412 <code>CSecurityManager<\/code> \u0434\u043e\u0431\u0430\u0432\u043b\u0435\u043d\u044b:<\/p>\n<p>  * <code>CSecurityManager::generateSessionRandomBlock()<\/code>: \u0433\u0435\u043d\u0435\u0440\u0438\u0440\u0443\u0435\u0442 \u0441\u043b\u0443\u0447\u0430\u0439\u043d\u0443\u044e \u043f\u043e\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u044c \u0431\u0430\u0439\u0442 \u043d\u0430 \u043e\u0441\u043d\u043e\u0432\u0435 \u0442\u0435\u043a\u0443\u0449\u0435\u0439 \u0441\u0435\u0441\u0441\u0438\u0438<br \/>   \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f.<br \/>  * <code>CSecurityManager::generatePseudoRandomBlock()<\/code>: \u0443\u043b\u0443\u0447\u0448\u0435\u043d\u043d\u0430\u044f \u0430\u043b\u044c\u0442\u0435\u0440\u043d\u0430\u0442\u0438\u0432\u0430 <code>mt_rand()<\/code>.<br \/>  * <code>CSecurityManager::generateRandomBytes()<\/code>: \u0433\u0435\u043d\u0435\u0440\u0438\u0440\u0443\u0435\u0442 \u0441\u043b\u0443\u0447\u0430\u0439\u043d\u044b\u0435 \u0431\u0438\u043d\u0430\u0440\u043d\u044b\u0435 \u0434\u0430\u043d\u043d\u044b\u0435. \u041a\u0440\u0438\u043f\u0442\u043e\u0441\u0442\u043e\u0439\u043a\u043e\u0441\u0442\u044c \u0437\u0430\u0434\u0430\u0451\u0442\u0441\u044f \u0432\u0442\u043e\u0440\u044b\u043c<br \/>   \u0430\u0440\u0433\u0443\u043c\u0435\u043d\u0442\u043e\u043c. \u0421\u0442\u043e\u0438\u0442 \u043e\u0442\u043c\u0435\u0442\u0438\u0442\u044c, \u0447\u0442\u043e \u0433\u0435\u043d\u0435\u0440\u0430\u0446\u0438\u044f \u0434\u043e\u0432\u043e\u043b\u044c\u043d\u043e \u043c\u0435\u0434\u043b\u0435\u043d\u043d\u0430\u044f.<br \/>  * <code>CSecurityManager::generateRandomString()<\/code>: \u0433\u0435\u043d\u0435\u0440\u0438\u0440\u0443\u0435\u0442 \u0441\u043b\u0443\u0447\u0430\u0439\u043d\u0443\u044e \u0441\u0442\u0440\u043e\u043a\u0443. \u041a\u0440\u0438\u043f\u0442\u043e\u0441\u0442\u043e\u0439\u043a\u043e\u0441\u0442\u044c \u0437\u0430\u0434\u0430\u0451\u0442\u0441\u044f \u0432\u0442\u043e\u0440\u044b\u043c \u0430\u0440\u0433\u0443\u043c\u0435\u043d\u0442\u043e\u043c.<br \/>   \u0421\u0442\u043e\u0438\u0442 \u043e\u0442\u043c\u0435\u0442\u0438\u0442\u044c, \u0447\u0442\u043e \u0433\u0435\u043d\u0435\u0440\u0430\u0446\u0438\u044f \u0434\u043e\u0432\u043e\u043b\u044c\u043d\u043e \u043c\u0435\u0434\u043b\u0435\u043d\u043d\u0430\u044f.    \t<\/p>\n<div class=\"clear\"><\/div>\n<\/p><\/div>\n<p> \u0441\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 \u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b \u0441\u0442\u0430\u0442\u044c\u0438 <a href=\"http:\/\/habrahabr.ru\/post\/186596\/\"> http:\/\/habrahabr.ru\/post\/186596\/<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<div class=\"content html_format\">   \t\u0412\u044b\u0448\u0435\u043b \u043a\u0430\u043d\u0434\u0438\u0434\u0430\u0442 \u0432 \u0440\u0435\u043b\u0438\u0437\u044b PHP \u0444\u0440\u0435\u0439\u043c\u0432\u043e\u0440\u043a\u0430 Yii 1.1.14. \u0417\u0430\u0431\u0440\u0430\u0442\u044c \u043c\u043e\u0436\u043d\u043e \u0441 <a href=\"https:\/\/github.com\/yiisoft\/yii\/releases\/tag\/1.1.14-rc\">GitHub<\/a>.<\/p>\n<p>  \u0418\u0441\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u044b \u0431\u043e\u043b\u0435\u0435 80 \u043e\u0448\u0438\u0431\u043e\u043a, \u0434\u043e\u0431\u0430\u0432\u043b\u0435\u043d\u043e \u0431\u043e\u043b\u0435\u0435 60 \u043d\u0435\u0431\u043e\u043b\u044c\u0448\u0438\u0445 \u0443\u043b\u0443\u0447\u0448\u0435\u043d\u0438\u0439 \u0438 \u043d\u043e\u0432\u044b\u0445 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u0435\u0439. \u041f\u043e\u044f\u0432\u0438\u043b\u0441\u044f \u043d\u043e\u0432\u044b\u0439 \u043a\u043b\u0430\u0441\u0441<br \/>  <code>CPasswordHelper<\/code>, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043f\u0440\u0435\u0434\u043e\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u0442 \u043d\u0430\u0434\u0451\u0436\u043d\u044b\u0439 \u043c\u0435\u0442\u043e\u0434 \u0445\u0440\u0430\u043d\u0435\u043d\u0438\u044f \u0438 \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0438 \u0445\u0435\u0448\u0435\u0439 \u043f\u0430\u0440\u043e\u043b\u0435\u0439. \u0422\u0430\u043a\u0436\u0435 \u0434\u043e\u0431\u0430\u0432\u043b\u0435\u043d <code>CRedisCache<\/code>,<br \/>  \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u043a\u043e\u0442\u043e\u0440\u043e\u0433\u043e \u043c\u043e\u0436\u043d\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c Redis \u0434\u043b\u044f \u0445\u0440\u0430\u043d\u0435\u043d\u0438\u0439 \u043a\u0435\u0448\u0430. Yii \u043c\u043e\u0436\u0435\u0442 \u0431\u044b\u0442\u044c \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043b\u0435\u043d \u043a\u0430\u043a<br \/>  <a href=\"https:\/\/packagist.org\/packages\/yiisoft\/yii\">\u043f\u0430\u043a\u0435\u0442 Composer<\/a>. \u041f\u043e\u043b\u043d\u044b\u0439 \u0441\u043f\u0438\u0441\u043e\u043a \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u0439 \u0434\u0430\u043d<br \/>  \u0432 <a href=\"https:\/\/raw.github.com\/yiisoft\/yii\/1.1.14-rc\/CHANGELOG\">changelog<\/a>.<\/p>\n<p>  \u0417\u043d\u0430\u0447\u0438\u0442\u0435\u043b\u044c\u043d\u0443\u044e \u0447\u0430\u0441\u0442\u044c \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u0439 \u0441\u0434\u0435\u043b\u0430\u043b\u0438 \u0447\u043b\u0435\u043d\u044b \u0441\u043e\u043e\u0431\u0449\u0435\u0441\u0442\u0432\u0430: <a href=\"http:\/\/habrahabr.ru\/users\/creocoder\/\" class=\"user_link\">creocoder<\/a>, tom&#8212;, paystey, Ragazzo, antoncpu, Yiivgeny \u0438 \u0434\u0440\u0443\u0433\u0438\u0435,<br \/>  \u0437\u0430 \u0447\u0442\u043e \u0438\u043c \u043e\u0433\u0440\u043e\u043c\u043d\u043e\u0435 \u0441\u043f\u0430\u0441\u0438\u0431\u043e.<\/p>\n<p>  \u0422\u0430\u043a \u043a\u0430\u043a \u044d\u0442\u043e \u043a\u0430\u043d\u0434\u0438\u0434\u0430\u0442 \u0432 \u0440\u0435\u043b\u0438\u0437\u044b (RC), \u043d\u0435 \u0441\u0442\u043e\u0438\u0442 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0435\u0433\u043e \u043d\u0430 \u0431\u043e\u0435\u0432\u044b\u0445 \u0441\u0435\u0440\u0432\u0435\u0440\u0430\u0445. \u0421\u0442\u0430\u0431\u0438\u043b\u044c\u043d\u044b\u0439 \u0440\u0435\u043b\u0438\u0437 1.1.14 \u0431\u0443\u0434\u0435\u0442 \u0434\u043e\u0441\u0442\u043f\u0435\u043d \u0432<br \/>  \u0442\u0435\u0447\u0435\u043d\u0438\u0435 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u0438\u0445 \u043d\u0435\u0434\u0435\u043b\u044c, \u0430 \u043f\u043e\u043a\u0430 \u043c\u044b \u0431\u0443\u0434\u0435\u043c \u043e\u0447\u0435\u043d\u044c \u043f\u0440\u0438\u0437\u043d\u0430\u0442\u0435\u043b\u044c\u043d\u044b, \u0435\u0441\u043b\u0438 \u0432\u044b <b>\u043f\u0440\u043e\u0432\u0435\u0440\u0438\u0442\u0435 RC \u0438<br \/>  <a href=\"https:\/\/github.com\/yiisoft\/yii\/issues\">\u0441\u043e\u043e\u0431\u0449\u0438\u0442\u0435 \u043d\u0430\u043c \u043e\u0431 \u043e\u0448\u0438\u0431\u043a\u0430\u0445<\/a><\/b>. \u0417\u0430\u0440\u0430\u043d\u0435\u0435 \u0441\u043f\u0430\u0441\u0438\u0431\u043e.<\/p>\n<p>  \u041d\u0443 \u0430 \u0442\u0435\u043f\u0435\u0440\u044c \u0440\u0430\u0441\u0441\u043c\u043e\u0442\u0440\u0438\u043c \u0433\u043b\u0430\u0432\u043d\u044b\u0435 \u0443\u043b\u0443\u0447\u0448\u0435\u043d\u0438\u044f.<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[],"tags":[],"class_list":["post-186596","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/186596","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=186596"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/186596\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=186596"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=186596"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=186596"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}