{"id":277149,"date":"2016-03-29T09:58:04","date_gmt":"2016-03-29T05:58:04","guid":{"rendered":"http:\/\/savepearlharbor.com\/?p=277149"},"modified":"-0001-11-30T00:00:00","modified_gmt":"-0001-11-29T21:00:00","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=277149","title":{"rendered":"Yii framework \u0440\u0430\u0437\u0431\u043e\u0440 \u043a\u043e\u0434\u0430"},"content":{"rendered":"<br \/>\n<h5>\u0420\u0430\u0437\u0431\u043e\u0440\u0443 \u043a\u043e\u0434\u0430 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f Yii Framework (\u0438\u0441\u0445\u043e\u0434\u043d\u0438\u043a).<br \/>  <\/h5>\n<p>  \u0418\u0437 \u0441\u0442\u0430\u0442\u044c\u0438 \u043c\u043e\u0436\u043d\u043e \u0432\u044b\u043d\u0435\u0441\u0442\u0438 \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u043d\u044b\u0435 \u043a\u0443\u0441\u043a\u0438 \u043a\u043e\u0434\u0430 \u043d\u0430 php, \u0430 \u0442\u0430\u043a \u0436\u0435 \u0442\u043e\u043d\u043a\u043e\u0441\u0442\u0438 \u0438 \u043a\u043e\u043d\u0441\u0442\u0440\u0443\u043a\u0446\u0438\u0438 Yii Framework, \u0440\u0430\u0441\u0447\u0438\u0442\u0430\u043d\u0430 \u043e\u043d\u0430 \u043d\u0430 \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u043a\u0443 php \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0438\u0441\u0442\u043e\u0432 \u0438 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u0435\u0439 Yii Framework.<br \/>  <a name=\"habracut\"><\/a>  <\/p>\n<h4>\u041f\u043e\u0432\u0435\u0434\u0435\u043d\u0438\u044f Behavior<\/h4>\n<p>  \u041f\u0440\u0438\u043c\u0435\u0440 \u043f\u043e\u0432\u0435\u0434\u0435\u043d\u0438\u044f \u0434\u043b\u044f \u0440\u0430\u0431\u043e\u0442\u044b \u0441 \u0438\u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u044f\u043c\u0438(\u043a\u0430\u043a \u043c\u044b \u0437\u043d\u0430\u0435\u043c \u043f\u043e\u0432\u0435\u0434\u0435\u043d\u0438\u044f \u043f\u0440\u0438\u043a\u0440\u0435\u043f\u043b\u044f\u044e\u0442\u0441\u044f \u043a \u043c\u043e\u0434\u0435\u043b\u0438 \u0438 \u0441\u0442\u0430\u043d\u043e\u0432\u044f\u0442\u0441\u044f \u0447\u0430\u0441\u0442\u044c\u044e \u0435\u0435 \u0444\u0443\u043d\u043a\u0446\u0438\u043e\u043d\u0430\u043b\u0430):  <\/p>\n<pre><code class=\"php\">class ImageBehavior extends CBehavior{     public $modelName = '';     const MAX_WIDTH   = 450;     const MAX_HEIGHT  = 450;      public function resize($path){          $mimeType = mime_content_type($path);          $type     = str_replace('image\/','',$mimeType);          list($width, $height) = getimagesize($path);          list($newWidth, $newHeight) = $this-&gt;getNewSize($width,$height);          $thumb = imagecreatetruecolor($newWidth, $newHeight);          $createFunction = 'imagecreatefrom' . $type;         $source         = $createFunction($path);          imagecopyresized($thumb, $source, 0, 0, 0, 0, $newWidth, $newHeight, $width, $height);          $imageFunction = 'image' . $type;          ob_start();         header('Content-Type: ' . $mimeType);          $imageFunction($thumb,null,100);          $img = ob_get_contents();          @unlink($path);          @file_put_contents($path,$img);     }      public function getNewSize($width,$height){         $wK        = $width\/$height;         $hK        = $height\/$width;         $newWidth  = $width;         $newHeight = $height;         if($width &gt; self::MAX_WIDTH && ($width &gt; $height)){             $newWidth  = self::MAX_WIDTH;             $newHeight = $newWidth\/$wK;         }         if($height &gt; self::MAX_HEIGHT && ($height &gt; $width)){             $newHeight = self::MAX_HEIGHT;             $newWidth  = $newHeight\/$hK;         }         return array($newWidth,$newHeight);     }      public function columnExists($column){         $modelName   = $this-&gt;modelName;         $model       = $modelName::model();         $table       = Yii::app()-&gt;getDb()-&gt;getSchema()-&gt;getTable($model-&gt;tableName());         $columnNames = $table-&gt;getColumnNames();          return in_array($column,$columnNames);     }      protected function afterSave($event){         if(!is_null($this-&gt;image)){             if($this-&gt;columnExists('image_path')){                 $webroot   = Yii::getPathOfAlias('webroot');                 $modelName = $this-&gt;modelName;                 $dir       = strtolower('\/upload\/' . $modelName);                 $dirPath   = $webroot . $dir;                 $ext       = str_replace(&quot;image\/&quot;,&quot;&quot;,$this-&gt;image-&gt;getType());                 $path      = $dir . '\/' . $this-&gt;id . '_' . time().'.'.$ext;                  if(!file_exists($dirPath))                     mkdir($dirPath,0777);                  $this-&gt;image-&gt;saveAs($webroot . $path);                  if(!is_null($this-&gt;image_path))                     @unlink($webroot . $this-&gt;image_path);                  $this-&gt;image_path = $path;                  $this-&gt;resize($webroot . $path);                 $modelName::model()-&gt;updateByPk($this-&gt;id,array(                     'image_path' =&gt; $path                 ));             }         }     }      protected function beforeSave($event){          $this-&gt;image = CUploadedFile::getInstance($this,'image');     }      public function deleteImage(){         if($this-&gt;columnExists('image_path')){             $path     = $this-&gt;image_path;             $fullPath = Yii::getPathOfAlias('webroot') . $path;             if(file_exists($fullPath))                 @unlink($fullPath);         }     }      public function getModelName(){         return get_called_class();     }  <\/code><\/pre>\n<p>  \u0414\u0430\u0432\u0430\u0439\u0442\u0435 \u0440\u0430\u0437\u0431\u0435\u0440\u0435\u043c \u043f\u043e\u043f\u043e\u0434\u0440\u043e\u0431\u043d\u0435\u0435, \u0432 \u043f\u043e\u0432\u0435\u0434\u0435\u043d\u0438\u0435 \u0432\u044b\u043d\u0435\u0441\u0435\u043d\u0430 \u0447\u0430\u0441\u0442\u044c \u0444\u0443\u043d\u043a\u0446\u0438\u043e\u043d\u0430\u043b\u0430 \u043c\u043e\u0434\u0435\u043b\u0438 Yii + \u0434\u043e\u0431\u0430\u0432\u043b\u0435\u043d\u044b \u043e\u0431\u0449\u0438\u0435 \u043c\u0435\u0442\u043e\u0434\u044b \u0434\u043b\u044f \u0440\u0430\u0431\u043e\u0442\u044b \u0441 \u0438\u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u044f\u043c\u0438. \u0423 \u043d\u0430\u0441 \u0435\u0441\u0442\u044c 5 \u043c\u043e\u0434\u0435\u043b\u0435\u0439 \u0432 \u043a\u043e\u0442\u043e\u0440\u044b\u0445 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e\u0442\u0441\u044f \u0438\u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u044f, \u0434\u043b\u044f \u0442\u043e\u0433\u043e \u0447\u0442\u043e \u0431\u044b \u043d\u0435 \u0434\u0443\u0431\u043b\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u043a\u043e\u0434 \u043c\u044b \u043f\u0440\u043e\u0441\u0442\u043e \u0432\u044b\u043d\u043e\u0441\u0438\u043c \u0444\u0443\u043d\u043a\u0446\u0438\u043e\u043d\u0430\u043b \u0432 \u043f\u043e\u0432\u0435\u0434\u0435\u043d\u0438\u0435. \u0422\u0430\u043a \u0436\u0435 \u0432 \u043f\u043e\u0432\u0435\u0434\u0435\u043d\u0438\u0438 \u043c\u043e\u0436\u043d\u043e \u043f\u0435\u0440\u0435\u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0438\u0442\u044c \u0447\u0430\u0441\u0442\u044c \u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u043d\u044b\u0445 \u0444\u0443\u043d\u043a\u0446\u0438\u0439 \u043a\u043b\u0430\u0441\u0441\u0430, \u0432 \u043c\u043e\u0435\u043c \u0441\u043b\u0443\u0447\u0430\u0435 \u044d\u0442\u043e beforeSave \u0438 afterSave.  <\/p>\n<h4>Action \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u044f<\/h4>\n<p>  \u0414\u043b\u044f \u0443\u0434\u043e\u0431\u043d\u043e\u0433\u043e \u043f\u043e\u0432\u0442\u043e\u0440\u0433\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044f \u043a\u043e\u0434\u0430 \u0432 Yii \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u044e\u0442 Actions \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043f\u0440\u0438\u043a\u0440\u0435\u043f\u043b\u044f\u044e\u0442\u0441\u044f \u043a \u043a\u043e\u043d\u0442\u0440\u043e\u043b\u043b\u0435\u0440\u0430\u043c.<br \/>  \u0412\u043e \u0432\u0440\u0435\u043c\u044f \u0433\u0435\u043d\u0435\u0440\u0430\u0446\u0438\u0438 \u043a\u043e\u0434\u0430 \u043f\u0440\u0438 \u043f\u043e\u043c\u043e\u0449\u0438 \u043c\u043e\u0434\u0443\u043b\u044f gii. \u0421\u043e\u0437\u0434\u0430\u044e\u0442\u0441\u044f \u043c\u043d\u043e\u0436\u0435\u0442\u0441\u0432\u043e \u043f\u043e\u0447\u0442\u0438 \u043e\u0434\u0438\u043d\u0430\u043a\u043e\u0432\u044b\u0445 \u043a\u043e\u043d\u0442\u0440\u043e\u043b\u043b\u0435\u0440\u043e\u0432 \u0444\u0443\u043d\u043a\u0446\u0438\u043e\u043d\u0430\u043b \u043a\u043e\u0442\u043e\u0440\u044b\u0445 \u043c\u043e\u0436\u043d\u043e \u0432\u044b\u043d\u0435\u0441\u0442\u0438 \u0432 \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u044b\u0439 \u043a\u043b\u0430\u0441\u0441 Action.<br \/>  \u0412 \u043c\u043e\u0435\u043c \u0441\u043b\u0443\u0447\u0430\u0435 \u0441\u043e\u0437\u0434\u0430\u0435\u0442\u0441\u044f CRUDAction \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043d\u0430\u0441\u043b\u0435\u0434\u0443\u0435\u0442\u0441\u044f \u043e\u0442 CAction, \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u044b 2 \u0430\u0442\u0440\u0438\u0431\u0443\u0442\u0430 \u043d\u0430\u0437\u0432\u0430\u043d\u0438\u0435 \u043c\u043e\u0434\u0435\u043b\u0438 \u0438 \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u0430 \u0440\u0435\u0434\u0438\u0440\u0435\u043a\u0442\u0430 \u043d\u0430 \u043a\u043e\u0442\u043e\u0440\u0443\u044e \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c \u043f\u043e\u043f\u0430\u0434\u0430\u0435\u0442 \u043f\u043e\u0441\u043b\u0435 \u0437\u0430\u0432\u0435\u0440\u0448\u0435\u043d\u0438\u044f \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0439 CRUD(Create Read Update Delete), \u0442\u0430\u043a \u0436\u0435 \u043f\u0440\u043e\u0438\u0441\u0445\u043e\u0434\u0438\u0442 \u0437\u0430\u0433\u0440\u0443\u0437\u043a\u0430 \u043c\u043e\u0434\u0435\u043b\u0438:  <\/p>\n<pre><code class=\"php\">&lt;?php  class CRUDAction extends  CAction{     public $modelName;     public $redirectTo = ['index'];      public function loadModel($id){         $m = $this-&gt;modelName;         $model = $m::model()-&gt;findByPk($id);         if($model===null)             throw new CHttpException(404,'The requested page does not exist.');         return $model;     } } <\/code><\/pre>\n<p>  CreateAction \u2014 \u043d\u0430\u0441\u043b\u0435\u0434\u0443\u0435\u0442\u0441\u044f \u043e\u0442 CRUDAction, \u0434\u0438\u043d\u0430\u043c\u0438\u0447\u0435\u0441\u043a\u0438 \u0441\u043e\u0437\u0434\u0430\u0435\u0442\u0441\u044f \u043c\u043e\u0434\u0435\u043b\u044c \u0438 \u0437\u0430\u0434\u0430\u0435\u0442\u0441\u044f \u043d\u0430\u0437\u0432\u0430\u043d\u0438\u0435 \u0441\u0446\u0435\u043d\u0430\u0440\u0438\u044f, \u0432 \u043c\u0435\u0442\u043e\u0434\u0435 run \u043e\u043f\u0438\u0441\u044b\u0432\u0430\u0435\u0442\u0441\u044f \u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u043d\u044b\u0435 \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u044f:  <\/p>\n<pre><code class=\"php\">&lt;?php Yii::import('application.components.actions.CRUDAction'); class CreateAction extends CRUDAction{      public function run(){         $model = new $this-&gt;modelName;         $model-&gt;scenario = 'create';          if(isset($_POST[$this-&gt;modelName])){             $model-&gt;attributes = $_POST[$this-&gt;modelName];             if($model-&gt;save())                 $this-&gt;getController()-&gt;redirect($this-&gt;redirectTo);         }          $renderPath = strtolower(&quot;create&quot;);         $this-&gt;getController()-&gt;render($renderPath,[             'model' =&gt; $model,         ]);     } } <\/code><\/pre>\n<p>  \u0412\u0438\u0434\u0436\u0435\u0442, \u0431\u043e\u043b\u044c\u0448\u043e\u0435 \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u043e\u0434\u0438\u043d\u0430\u043a\u043e\u0433\u043e\u0432\u043e\u0433\u043e \u0444\u0443\u043d\u043a\u0446\u0438\u043e\u043d\u0430\u043b\u0430 \u2014 \u043c\u043e\u0436\u043d\u043e \u0443\u043f\u0430\u043a\u043e\u0432\u0430\u0442\u044c \u0432 \u0432\u0438\u0434\u0436\u0435\u0442 \u0438 \u0432\u044b\u0437\u044b\u0432\u0430\u0442\u044c \u0433\u0434\u0435 \u043f\u043e\u043d\u0430\u0434\u043e\u0431\u0438\u0442\u0441\u044f:  <\/p>\n<pre><code class=\"php\">class Citywidget extends CWidget{     public $cols = 10;     public $name;     public $dialogId;     public $city_id;     public $defaultName = '\u0413\u043e\u0440\u043e\u0434';      public function init(){         parent::init();     }      public function run(){          $this-&gt;render('citywidget',[             'name'        =&gt; $this-&gt;name,             'dialogId'    =&gt; $this-&gt;dialogId,             'city_id'     =&gt; $this-&gt;city_id,             'cols'        =&gt; $this-&gt;cols,             'defaultName' =&gt; $this-&gt;defaultName,         ]);     } } <\/code><\/pre>\n<p>  <\/p>\n<pre><code class=\"php\">&lt;?php     $this-&gt;beginWidget('zii.widgets.jui.CJuiDialog',array(         'id' =&gt; $dialogId,         \/\/ additional javascript options for the dialog plugin         'options'=&gt; [             'title' =&gt; '\u0413\u043e\u0440\u043e\u0434\u0430',             'autoOpen'=&gt;false,             'width' =&gt; '800px'         ],         'htmlOptions' =&gt; [             'width' =&gt; '800px'         ]     )); ?&gt;  &lt;?php     $cities   = Cities::getCities();     $count    = count($cities);     $perCol   = round($count\/$cols);      if($city_id == 0){         $city_id = CityChooser::$cityId;     }      $cityName = Cities::getCityNameByPk($city_id,$defaultName); ?&gt;  &lt;style type=&quot;text\/css&quot;&gt;     #&lt;?=$dialogId?&gt;{         display:none;     }     #&lt;?=$dialogId?&gt; ul {         float:left;         clear:right;         padding:5px;     }     #&lt;?=$dialogId?&gt; li {         float:left;         clear:left;     } &lt;\/style&gt; &lt;script type=&quot;text\/javascript&quot;&gt;     function changeCity&lt;?=$dialogId?&gt;(id,cityName,dialogId,inName){         $(&quot;#href-&quot;+dialogId+&quot;&quot;).text(cityName);         $(&quot;input[name*='&quot;+inName+&quot;']&quot;).val(id);         $(&quot;#&quot;+dialogId).dialog(&quot;close&quot;);          if(dialogId == 'chooserDialogId'){             $.get( &quot;\/api\/setcity\/id\/&quot;+id, function( data ) {              });         }         \/\/$(&quot;#&quot;+dialogId).dialog(&quot;close&quot;);     } &lt;\/script&gt;          &lt;?='&lt;ul&gt;'?&gt;         &lt;?php $i=0; ?&gt;         &lt;?php foreach ($cities as $city):?&gt;            &lt;?php if($i&gt;=$perCol):?&gt;                 &lt;?='&lt;\/ul&gt;&lt;ul&gt;'?&gt;                 &lt;?php $i=0; ?&gt;            &lt;?php endif;?&gt;                &lt;li style=&quot;margin-top:4px;&quot;&gt;                 &lt;a href=&quot;#&quot; style=&quot;margin:8px;color: #428bca;&quot; onClick=&quot;changeCity&lt;?=$dialogId?&gt;('&lt;?=$city-&gt;id?&gt;','&lt;?=$city-&gt;name?&gt;','&lt;?=$dialogId?&gt;','&lt;?=$name?&gt;')&quot;&gt;                     &lt;?php if((int)$city-&gt;sort !== 0):?&gt;                         &lt;b&gt;&lt;?=$city-&gt;name?&gt;&lt;\/b&gt;                     &lt;?php else:?&gt;                         &lt;?=$city-&gt;name?&gt;                     &lt;?php endif;?&gt;                 &lt;\/a&gt;               &lt;\/li&gt;              &lt;?php if($i&gt;=$perCol):?&gt;                 &lt;?='&lt;\/ul&gt;'?&gt;             &lt;?php endif;?&gt;              &lt;?php $i++; ?&gt;         &lt;?php endforeach;?&gt;         &lt;?='&lt;\/ul&gt;'?&gt;  &lt;?php $this-&gt;endWidget('zii.widgets.jui.CJuiDialog');?&gt;  &lt;input type=&quot;hidden&quot; name=&quot;&lt;?=$name?&gt;&quot; value=&quot;&lt;?=$city_id?&gt;&quot;&gt;  &lt;a href=&quot;#&quot; id=&quot;href-&lt;?=$dialogId?&gt;&quot; onclick='$(&quot;#&lt;?=$dialogId?&gt;&quot;).dialog(&quot;open&quot;); return false;'&gt;&lt;?= $cityName?&gt;&lt;\/a&gt;  <\/code><\/pre>\n<p>  \u041a\u0430\u043a \u0432\u0438\u0434\u0438\u0442\u0435 \u0441 \u0442\u0430\u043a\u043e\u0439 \u0441\u043c\u0435\u0441\u044c\u044e php \u0438 html \u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c \u043d\u0435\u0443\u0434\u043e\u0431\u043d\u043e, \u0430 \u0432\u043e\u0442 \u0442\u0430\u043a \u0432\u044b\u0433\u043b\u044f\u0434\u0438\u0442 \u0432\u044b\u0437\u043e\u0432 \u0432\u0438\u0434\u0436\u0435\u0442\u0430:  <\/p>\n<pre><code class=\"php\">        &lt;?php             $this-&gt;widget('Citywidget',[                 'name'        =&gt; 'Biztrade[city_id]',                 'city_id'     =&gt; $model-&gt;city_id,                 'dialogId'    =&gt; 'dialogId'             ]);         ?&gt; <\/code><\/pre>\n<p>  \u0418\u0441 \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u043d\u043e\u0433\u043e \u043d\u0430\u0432\u0435\u0440\u043d\u043e\u0435 \u0432\u0441\u0435, \u044f \u043f\u0440\u0438\u043b\u043e\u0436\u0438\u043b <a href=\"https:\/\/yadi.sk\/d\/XEGOlicJqYuWT\">\u0438\u0441\u0445\u043e\u0434\u043d\u0438\u043a<\/a> \u2014 \u0432 \u043d\u0435\u043c \u0432\u044b \u0441\u043c\u043e\u0436\u0435\u0442\u0435 \u043d\u0430\u0439\u0442\u0438 \u0431\u043e\u043b\u0435\u0435 \u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u043d\u044b\u0435 \u0432\u0435\u0449\u0438.\u0421\u043f\u0430\u0441\u0438\u0431\u043e.               <\/p>\n<div class=\"clear\"><\/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=\"https:\/\/habrahabr.ru\/post\/280382\/\"> https:\/\/habrahabr.ru\/post\/280382\/<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<br \/>\n<h5>\u0420\u0430\u0437\u0431\u043e\u0440\u0443 \u043a\u043e\u0434\u0430 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f Yii Framework (\u0438\u0441\u0445\u043e\u0434\u043d\u0438\u043a).<br \/>  <\/h5>\n<p>  \u0418\u0437 \u0441\u0442\u0430\u0442\u044c\u0438 \u043c\u043e\u0436\u043d\u043e \u0432\u044b\u043d\u0435\u0441\u0442\u0438 \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u043d\u044b\u0435 \u043a\u0443\u0441\u043a\u0438 \u043a\u043e\u0434\u0430 \u043d\u0430 php, \u0430 \u0442\u0430\u043a \u0436\u0435 \u0442\u043e\u043d\u043a\u043e\u0441\u0442\u0438 \u0438 \u043a\u043e\u043d\u0441\u0442\u0440\u0443\u043a\u0446\u0438\u0438 Yii Framework, \u0440\u0430\u0441\u0447\u0438\u0442\u0430\u043d\u0430 \u043e\u043d\u0430 \u043d\u0430 \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u043a\u0443 php \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0438\u0441\u0442\u043e\u0432 \u0438 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u0435\u0439 Yii Framework.  <\/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-277149","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/277149","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=277149"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/277149\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=277149"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=277149"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=277149"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}