{"id":212917,"date":"2014-02-23T01:18:03","date_gmt":"2014-02-22T21:18:03","guid":{"rendered":"http:\/\/savepearlharbor.com\/?p=212917"},"modified":"-0001-11-30T00:00:00","modified_gmt":"-0001-11-29T21:00:00","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=212917","title":{"rendered":"<span class=\"post_title\">Yii \u043e\u0431\u043c\u0435\u043d \u043e\u043f\u044b\u0442\u043e\u043c: \u043c\u043e\u0434\u0435\u043b\u0438 (\u043e\u043a\u043e\u043d\u0447\u0430\u043d\u0438\u0435)<\/span>"},"content":{"rendered":"<div class=\"content html_format\">   \t<img decoding=\"async\" src=\"http:\/\/habrastorage.org\/getpro\/habr\/post_images\/a84\/5b6\/2b2\/a845b62b22489df97996ffb65fd91b3a.png\"\/><br \/>  \u041f\u0440\u043e\u0434\u043e\u043b\u0436\u0435\u043d\u0438\u0435 <a href=\"http:\/\/habrahabr.ru\/post\/212681\/\">\u043f\u0440\u0435\u0434\u044b\u0434\u0443\u0449\u0435\u0433\u043e \u043f\u043e\u0441\u0442\u0430<\/a><br \/>  <a name=\"habracut\"><\/a>  <\/p>\n<h5>\u041e\u0431\u043b\u0430\u0441\u0442\u044c \u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0435\u043d\u043d\u043e\u0441\u0442\u0438 \u043c\u043e\u0434\u0435\u043b\u0438 \u0438 \u0435\u0435 \u043c\u0435\u0441\u0442\u043e \u0432 \u043f\u0440\u043e\u0435\u043a\u0442\u0435<\/h5>\n<p>  \u041c\u043e\u0434\u0435\u043b\u0438 \u043f\u0440\u0435\u0434\u043d\u0430\u0437\u043d\u0430\u0447\u0435\u043d\u044b \u0442\u043e\u043b\u044c\u043a\u043e \u0434\u043b\u044f \u043e\u043f\u0435\u0440\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u0434\u0430\u043d\u043d\u044b\u043c\u0438 (\u043f\u043e\u0438\u0441\u043a, \u0441\u043e\u0445\u0440\u0430\u043d\u0435\u043d\u0438\u0435, \u0443\u0434\u0430\u043b\u0435\u043d\u0438\u0435), \u0430 \u0442\u0430\u043a\u0436\u0435 \u0441\u0432\u044f\u0437\u0430\u043d\u043d\u044b\u043c\u0438 \u0441\u0442\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438\u043c\u0438 \u0444\u0430\u0439\u043b\u0430\u043c\u0438, \u0442\u0430\u043a \u043a\u0430\u043a \u043e\u043d\u0438 \u0442\u043e\u0436\u0435 \u043d\u0435\u043e\u0442\u044a\u0435\u043c\u043b\u0435\u043c\u0430\u044f \u0447\u0430\u0441\u0442\u044c \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u044b \u0434\u0430\u043d\u043d\u044b\u0445 (\u0444\u043e\u0442\u043e\u0433\u0440\u0430\u0444\u0438\u044f, \u0432\u0438\u0434\u0435\u043e\u0440\u043e\u043b\u0438\u043a). \u0415\u0441\u0442\u0435\u0441\u0442\u0432\u0435\u043d\u043d\u043e \u0447\u0442\u043e \u043f\u0440\u0438 \u0443\u0434\u0430\u043b\u0435\u043d\u0438\u0438 \u0437\u0430\u043f\u0438\u0441\u0438, \u0441\u0432\u044f\u0437\u0430\u043d\u043d\u044b\u0435 \u0441 \u043d\u0435\u0439 \u043c\u0435\u0434\u0438\u0430\u0444\u0430\u0439\u043b\u044b \u0434\u043e\u043b\u0436\u043d\u044b \u0443\u0434\u0430\u043b\u044f\u0442\u044c\u0441\u044f, \u0434\u043b\u044f \u044d\u0442\u043e\u0433\u043e \u0443\u0434\u043e\u0431\u043d\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c beforeDelete() \u0438\u043b\u0438 afterDelete(). <br \/>  \u041d\u0435\u0441\u043b\u043e\u0436\u043d\u0443\u044e \u0431\u0438\u0437\u043d\u0435\u0441-\u043b\u043e\u0433\u0438\u043a\u0443 \u043c\u043e\u0436\u043d\u043e \u0440\u0435\u0430\u043b\u0438\u0437\u043e\u0432\u0430\u0442\u044c \u0432 \u043c\u043e\u0434\u0435\u043b\u0438, \u0434\u043b\u044f \u0441\u043b\u043e\u0436\u043d\u043e\u0439 \u2014 \u043b\u0443\u0447\u0448\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0441\u0435\u0440\u0432\u0438\u0441\u043d\u0443\u044e \u043f\u0440\u043e\u0441\u043b\u043e\u0439\u043a\u0443 (Service Layer) \u0442\u0430\u043a \u0432\u044b \u0438\u0437\u0431\u0430\u0432\u0438\u0442\u0435 \u043c\u043e\u0434\u0435\u043b\u044c \u043e\u0442 \u043c\u0430\u0441\u0441\u044b \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u0435\u0439 \u0438 \u043d\u0435 \u0431\u0443\u0434\u0435\u0442\u0435 \u0440\u0430\u0437\u0434\u0443\u0432\u0430\u0442\u044c \u0438\u0437 \u043d\u0435\u0435 \u0431\u043e\u0436\u0435\u0441\u0442\u0432\u0435\u043d\u043d\u044b\u0439 \u043e\u0431\u044a\u0435\u043a\u0442.<br \/>  \u0412 \u043c\u043e\u0434\u0435\u043b\u044f\u0445 \u043d\u0435 \u0434\u043e\u043b\u0436\u043d\u044b \u043f\u043e\u044f\u0432\u043b\u044f\u0442\u044c\u0441\u044f:  <\/p>\n<ul>\n<li>HTML-\u0432\u0435\u0440\u0441\u0442\u043a\u0430, CSS, javascript<\/li>\n<li>\u0421\u0443\u043f\u0435\u0440\u0433\u043b\u043e\u0431\u0430\u043b\u044c\u043d\u044b\u0435 \u043c\u0430\u0441\u0441\u0438\u0432\u044b ($_GET, &#8230;)<\/li>\n<li>\u0413\u043b\u043e\u0431\u0430\u043b\u044c\u043d\u044b\u0435 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0435<\/li>\n<li>\u041f\u0440\u043e\u0432\u0435\u0440\u043a\u0430 \u043f\u0440\u0430\u0432 \u0434\u043e\u0441\u0442\u0443\u043f\u0430 (\u044d\u0442\u043e\u0442 \u043c\u043e\u043c\u0435\u043d\u0442, \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e, \u0441\u043f\u043e\u0440\u043d\u044b\u0439, \u043f\u0440\u0430\u043a\u0442\u0438\u043a\u0430 \u043f\u043e\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u0442 \u0447\u0442\u043e \u043a\u043e\u043d\u0442\u0440\u043e\u043b\u044c \u0434\u043e\u0441\u0442\u0443\u043f\u0430 \u043a \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u0438 \u043d\u0443\u0436\u043d\u043e \u043f\u0440\u043e\u0432\u043e\u0434\u0438\u0442\u044c \u0432 \u043a\u043e\u043d\u0442\u0440\u043e\u043b\u043b\u0435\u0440\u0435)<\/li>\n<li>\u0422\u0435\u043a\u0441\u0442\u043e\u0432\u044b\u0435 \u0441\u0442\u0440\u043e\u043a\u0438 \u043d\u0435 \u043e\u0431\u0435\u0440\u043d\u0443\u0442\u044b\u0435 \u0432 Yii::t()<\/li>\n<\/ul>\n<p>  \u041c\u043e\u0434\u0435\u043b\u0438 \u0434\u043e\u043b\u0436\u043d\u044b \u0438\u043c\u0435\u0442\u044c \u043a\u0430\u043a \u043c\u043e\u0436\u043d\u043e \u043c\u0435\u043d\u044c\u0448\u0435 \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u0435\u0439 \u043e\u0442 \u0434\u0440\u0443\u0433\u0438\u0445 \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u043e\u0432, \u0442\u0430\u043a \u043c\u044b \u0441\u043c\u043e\u0436\u0435\u043c \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u0435\u0435 \u043f\u0435\u0440\u0435\u043d\u043e\u0441\u0438\u043c\u043e\u0439, \u0438 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0432 \u0434\u0440\u0443\u0433\u0438\u0445 \u043f\u0440\u043e\u0435\u043a\u0442\u0430\u0445. \u041f\u0440\u0438 \u044d\u0442\u043e\u043c \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u044b \u043e\u0442 \u043a\u043e\u0442\u043e\u0440\u044b\u0445 \u043c\u043e\u0434\u0435\u043b\u044c \u0437\u0430\u0432\u0438\u0441\u0438\u0442 \u0434\u043e\u043b\u0436\u043d\u044b \u0443\u0441\u0442\u0430\u043d\u0430\u0432\u043b\u0438\u0432\u0430\u0442\u044c\u0441\u044f \u0441\u0435\u0442\u0442\u0435\u0440\u0430\u043c\u0438 (\u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440 User::setEmailComponent(&#8217;email&#8217;)). \u041d\u0430\u0437\u043d\u0430\u0447\u0430\u0442\u044c \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u044b \u043c\u043e\u0436\u043d\u043e \u0438 \u0432 User::init() \u043d\u043e \u043f\u0440\u0438 \u044d\u0442\u043e\u043c \u043e\u0431\u044f\u0437\u0430\u0442\u0435\u043b\u044c\u043d\u043e \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0443 \u043d\u0430 \u0435\u0433\u043e \u043d\u0430\u043b\u0438\u0447\u0438\u0435. \u0415\u0441\u043b\u0438 \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442 \u2014 \u0432\u0442\u043e\u0440\u043e\u0441\u0442\u0435\u043f\u0435\u043d\u043d\u044b\u0439 \u0438 \u043d\u0435\u0434\u043e\u0441\u0442\u0443\u043f\u0435\u043d \u2014 \u043c\u043e\u0434\u0435\u043b\u044c \u043e\u0431\u044f\u0437\u0430\u043d\u0430 \u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c \u0431\u0435\u0437 \u0448\u0443\u043c\u0430, \u043e\u0434\u043d\u0430\u043a\u043e \u0435\u0441\u043b\u0438 \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442 \u043f\u0435\u0440\u0432\u043e\u0441\u0442\u0435\u043f\u0435\u043d\u043d\u044b\u0439, \u0442\u043e \u043d\u0430 \u0441\u0442\u0430\u0434\u0438\u0438 \u0438\u043d\u0438\u0446\u0438\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438 \u0441\u043b\u0435\u0434\u0443\u0435\u0442 \u0432\u044b\u0431\u0440\u043e\u0441\u0438\u0442\u044c \u043f\u0440\u0435\u0440\u044b\u0432\u0430\u043d\u0438\u0435.<br \/>  \u042d\u0442\u0438 \u043d\u0435\u0441\u043b\u043e\u0436\u043d\u044b\u0435 \u043f\u0440\u0430\u0432\u0438\u043b\u0430 \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0442 \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u0442\u044c \u0432\u0430\u0448 \u043a\u043e\u0434 \u043a\u043e\u043c\u0430\u043d\u0434\u043e\u0439 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0438\u0441\u0442\u043e\u0432, \u0438 \u0434\u043e\u0441\u0442\u0430\u0442\u043e\u0447\u043d\u043e \u0433\u0438\u0431\u043a\u043e \u0440\u0430\u0441\u0448\u0438\u0440\u044f\u0442\u044c \u0444\u0443\u043d\u043a\u0446\u0438\u043e\u043d\u0430\u043b.<\/p>\n<h5>\u041f\u0440\u043e\u0432\u0435\u0440\u043a\u0430 \u0441\u043e\u0441\u0442\u043e\u044f\u043d\u0438\u044f \u0441\u0442\u0430\u0442\u0443\u0441\u0430<\/h5>\n<p>  \u041e\u0431\u044b\u0447\u043d\u043e \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0443 \u0434\u0435\u043b\u0430\u044e\u0442 \u0432 \u0440\u0430\u0437\u043d\u044b\u0445 \u043c\u0435\u0441\u0442\u0430\u0445, \u043a\u0430\u043a \u0432 \u043a\u043e\u043d\u0442\u0440\u043e\u043b\u043b\u0435\u0440\u0430\u0445 \u0442\u0430\u043a \u0438 \u0432 \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u0438\u044f\u0445 \u0438 \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0430 \u0447\u0430\u0441\u0442\u043e \u0432\u044b\u0433\u043b\u044f\u0434\u0438\u0442 \u0442\u0430\u043a:<\/p>\n<pre><code class=\"php\">\/\/ \u043f\u0440\u043e\u0441\u0442\u043e\u0439 \u0432\u0430\u0440\u0438\u0430\u043d\u0442 if($model-&gt;status == 1){ ... }  \/\/ \u0431\u043e\u043b\u0435\u0435 \u043f\u0440\u043e\u0434\u0432\u0438\u043d\u0443\u0442\u044b\u0439 \u0432\u0430\u0440\u0438\u0430\u043d\u0442 if($model-&gt;getStatus() === Model::STATUS_ACTIVE){ ... }  \/\/ \u0441\u0442\u0440\u0430\u0448\u043d\u044b\u0439 \u0432\u0430\u0440\u0438\u0430\u043d\u0442 if($model-&gt;status !== 1 && $model-&gt;status !== 2 && $model-&gt;status !== 4){ ... }  \/\/\u0434\u0430-\u0434\u0430-\u0434\u0430 \u0431\u044b\u0432\u0430\u0435\u0442 \u0438 \u0442\u0430\u043a\u043e\u0435 <\/code><\/pre>\n<p>  \u041e\u0434\u043d\u0430\u043a\u043e \u0435\u0441\u043b\u0438 \u0441\u043e\u0437\u0434\u0430\u0442\u044c \u043c\u0435\u0442\u043e\u0434 isActive() \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0434\u0435\u043b\u0430\u0435\u0442 \u044d\u0442\u0443 \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0443, \u0442\u043e \u043a\u043e\u0434 \u0441\u0442\u0430\u043d\u0435\u0442 \u0431\u043e\u043b\u0435\u0435 \u043a\u043e\u043d\u0442\u0440\u043e\u043b\u0438\u0440\u0443\u0435\u043c\u044b\u043c, \u043e\u0441\u043e\u0431\u0435\u043d\u043d\u043e \u0432 \u0443\u0441\u043b\u043e\u0432\u0438\u044f\u0445 \u0447\u0430\u0441\u0442\u043e \u043c\u0435\u043d\u044f\u044e\u0449\u0435\u0433\u043e\u0441\u044f \u0422\u0417. \u0422\u0430\u043a\u0436\u0435 \u0438\u043d\u043e\u0433\u0434\u0430 \u043f\u043e\u043b\u0435\u0437\u043d\u044b\u043c \u043e\u043a\u0430\u0436\u0435\u0442\u0441\u044f \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u0435 \u043c\u0435\u0442\u043e\u0434\u0430, \u0432 \u043a\u043e\u0442\u043e\u0440\u043e\u043c \u043e\u043f\u0438\u0441\u0430\u043d\u0430 \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0430 \u043d\u0430 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u044c \u043f\u0435\u0440\u0435\u0445\u043e\u0434\u0430 \u0432 \u0438\u043d\u043e\u0435 \u0441\u043e\u0441\u0442\u043e\u044f\u043d\u0438\u0435 \u0441\u0442\u0430\u0442\u0443\u0441. \u041d\u0430\u043f\u0440\u0438\u043c\u0435\u0440: \u0435\u0441\u043b\u0438 \u0437\u0430\u043f\u0438\u0441\u044c \u0438\u043c\u0435\u0435\u0442 \u0441\u0442\u0430\u0442\u0443\u0441 \u2014 \u00ab\u0421\u043f\u0430\u043c\u00bb, \u0442\u043e \u043f\u0435\u0440\u0435\u0432\u0435\u0441\u0442\u0438 \u0435\u0435 \u0432 \u0441\u0442\u0430\u0442\u0443\u0441 \u00ab\u0410\u043a\u0442\u0438\u0432\u043d\u0430\u00bb \u043d\u0435\u043b\u044c\u0437\u044f, \u043e\u0434\u043d\u0430\u043a\u043e \u0435\u0435 \u043c\u043e\u0436\u043d\u043e \u043f\u0435\u0440\u0435\u0432\u0435\u0441\u0442\u0438 \u0432 \u0441\u0442\u0430\u0442\u0443\u0441 \u00ab\u041d\u0430 \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0443\u00bb. \u0412\u0441\u044e \u044d\u0442\u0443 \u043b\u043e\u0433\u0438\u043a\u0443 \u0436\u0435\u043b\u0430\u0442\u0435\u043b\u044c\u043d\u043e \u0440\u0430\u0437\u043c\u0435\u0449\u0430\u0442\u044c \u0442\u0430\u043a\u0436\u0435 \u0432 \u043c\u043e\u0434\u0435\u043b\u044f\u0445. (\u042d\u0442\u043e \u043c\u043e\u0436\u0435\u0442 \u0431\u044b\u0442\u044c \u043f\u043e\u043b\u0435\u0437\u043d\u043e \u043f\u0440\u0438 \u043f\u043e\u0441\u0442\u0440\u043e\u0435\u043d\u0438\u0438 workflow \u0441\u0438\u0441\u0442\u0435\u043c)<\/p>\n<h5>\u0418\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435 \u0444\u043b\u0430\u0433\u043e\u0432\u044b\u0445 \u043f\u043e\u043b\u0435\u0439<\/h5>\n<p>  \u0414\u043b\u044f \u044d\u043a\u043e\u043d\u043e\u043c\u0438\u0438 \u0440\u0430\u0437\u043c\u0435\u0440\u0430 \u0442\u0430\u0431\u043b\u0438\u0446\u044b (\u0447\u0438\u0441\u043b\u0430 \u043a\u043e\u043b\u043e\u043d\u043e\u043a) \u0438 \u0434\u043b\u044f \u0442\u043e\u0433\u043e \u0447\u0442\u043e\u0431\u044b \u0438\u043c\u0435\u0442\u044c \u0431\u043e\u043b\u0435\u0435 \u0433\u0438\u0431\u043a\u0438\u0439 \u0444\u0443\u043d\u043a\u0446\u0438\u043e\u043d\u0430\u043b \u0440\u0430\u0441\u0448\u0438\u0440\u0435\u043d\u0438\u044f \u043c\u043e\u0434\u0435\u043b\u0438 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e\u0442 \u043f\u043e\u043b\u044f \u0441 \u0431\u0438\u0442\u043e\u0432\u044b\u043c\u0438 \u0444\u043b\u0430\u0433\u0430\u043c\u0438. <br \/>  \u0422\u0430\u043a\u0438\u0435 \u043f\u043e\u043b\u044f \u043a\u0430\u043a \u043f\u0440\u0430\u0432\u0438\u043b\u043e \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u044b \u0432 \u0431\u0430\u0437\u0435 \u0442\u0438\u043f\u043e\u043c integer (\u043d\u043e \u043d\u0435\u043e\u0431\u044f\u0437\u0430\u0442\u0435\u043b\u044c\u043d\u043e) \u0438 \u0441\u043f\u043e\u0441\u043e\u0431\u043d\u044b \u0440\u0430\u0437\u043c\u0435\u0441\u0442\u0438\u0442\u044c \u0434\u043e\u0432\u043e\u043b\u044c\u043d\u043e \u0431\u043e\u043b\u044c\u0448\u043e\u0435 \u0447\u0438\u0441\u043b\u043e \u0444\u043b\u0430\u0433\u043e\u0432. \u0424\u043b\u0430\u0433\u043e\u0432\u044b\u0435 \u043f\u043e\u043b\u044f \u044f \u0443\u0436\u0435 \u0437\u0430\u0442\u0440\u043e\u043d\u0443\u043b \u0432 \u043f\u0440\u0435\u0434\u044b\u0434\u0443\u0449\u0435\u0439 \u0441\u0442\u0430\u0442\u044c\u0435. \u0422\u0435\u043f\u0435\u0440\u044c \u043f\u043e\u043a\u0430\u0436\u0443 \u043f\u0440\u0430\u043a\u0442\u0438\u0447\u0435\u0441\u043a\u043e\u0435 \u043f\u0440\u0438\u043c\u0435\u043d\u0435\u043d\u0438\u0435. (\u0414\u0435\u0442\u0430\u043b\u044c\u043d\u043e \u0431\u0438\u0442\u043e\u0432\u044b\u0435 \u043c\u0430\u0441\u043a\u0438 \u043e\u043f\u0438\u0441\u0430\u043d\u044b <a href=\"http:\/\/habrahabr.ru\/post\/134557\/\">\u0432 \u044d\u0442\u043e\u0439 \u0441\u0442\u0430\u0442\u044c\u0435<\/a>).<br \/>  \u041f\u0440\u0438\u043c\u0435\u0440: \u0415\u0441\u0442\u044c \u043c\u043e\u0434\u0435\u043b\u044c \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f \u0432 \u043a\u043e\u0442\u043e\u0440\u043e\u0439 \u0434\u043b\u044f \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f \u043c\u043e\u0436\u043d\u043e \u043d\u0430\u0437\u043d\u0430\u0447\u0438\u0442\u044c \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u043e\u0434\u043d\u043e\u0432\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0445 \u0444\u043b\u0430\u0433\u043e\u0432 \u2014 \u00ab\u043b\u0443\u0447\u0448\u0438\u0439 \u0430\u0432\u0442\u043e\u0440\u00bb, \u00ab\u043f\u043e\u0434\u0442\u0432\u0435\u0440\u0436\u0434\u0435\u043d \u0442\u0435\u043b\u0435\u0444\u043e\u043d\u00bb, \u00ab\u043f\u043e\u0434\u0442\u0432\u0435\u0440\u0436\u0434\u0435\u043d email\u00bb, \u00ab\u043e\u0441\u0442\u0430\u0432\u0438\u043b \u0437\u0430\u043f\u0440\u043e\u0441 \u043d\u0430 \u043f\u043e\u0441\u0442 \u043c\u043e\u0434\u0435\u0440\u0430\u0442\u043e\u0440\u0430\u00bb  <\/p>\n<div class=\"spoiler\"><b class=\"spoiler_title\">\u0424\u0440\u0430\u0433\u043c\u0435\u043d\u0442 \u043c\u043e\u0434\u0435\u043b\u0438<\/b><\/p>\n<div class=\"spoiler_text\">\n<pre><code class=\"php\">    public $flags = 0;      const FLAG_CONFIRM_EMAIL    = 1; \/\/ 00000001     const FLAG_CONFIRM_PHONE    = 2; \/\/ 00000010     const FLAG_BEST_AUTHOR      = 4; \/\/ 00000100     const FLAG_BECOME_MODERATOR = 8; \/\/ 00001000      \/**      * \u0423\u0441\u0442\u0430\u043d\u0430\u0432\u043b\u0438\u0432\u0430\u0435\u0442 \u0444\u043b\u0430\u0433      * @param integer $flag      * @return \\User      *\/     public function setFlag($flag)     {          $this-&gt;flag += intval($flag);          return $this;     }          \/**      * \u0421\u043d\u0438\u043c\u0430\u0435\u0442 \u0444\u043b\u0430\u0433      * @param integer $flag      * @return \\User      *\/     public function unsetFlag($flag)     {          $this-&gt;flag -= intval($flag);          return $this;     }          \/**      * \u041f\u0440\u043e\u0432\u0435\u0440\u044f\u0435\u0442 \u043d\u0430\u043b\u0438\u0447\u0438\u0435 \u0444\u043b\u0430\u0433\u0430      * @param integer $flag      * @return boolean      *\/     public function hasFlag($flag)     {               return ($this-&gt;flags & intval($flag));     }          \/**      * \u0412\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0435\u0442 \u0447\u0435\u043b\u043e\u0432\u0435\u0447\u0435\u0441\u043a\u0438\u0435 \u043d\u0430\u0437\u0432\u0430\u043d\u0438\u044f \u0444\u043b\u0430\u0433\u043e\u0432      * @return array      *\/     public function getFlagsLabels(){         return array(             self::FLAG_CONFIRM_EMAIL    =&gt; Yii::t('User',&quot;Email \u043f\u043e\u0434\u0442\u0432\u0435\u0440\u0436\u0434\u0435\u043d&quot;),             self::FLAG_CONFIRM_PHONE    =&gt; Yii::t('User',&quot;\u0422\u0435\u043b\u0435\u0444\u043e\u043d \u043f\u043e\u0434\u0442\u0432\u0435\u0440\u0436\u0434\u0435\u043d&quot;),             self::FLAG_BEST_AUTHOR      =&gt; Yii::t('User',&quot;\u041b\u0443\u0447\u0448\u0438\u0439 \u0430\u0432\u0442\u043e\u0440&quot;),             self::FLAG_BECOME_MODERATOR =&gt; Yii::t('User',&quot;\u0417\u0430\u044f\u0432\u043a\u0430 \u043d\u0430 \u043f\u043e\u0441\u0442 \u043c\u043e\u0434\u0435\u0440\u0430\u0442\u043e\u0440\u0430&quot;),         );     }      \/**      * \u0418\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f \u0434\u043b\u044f \u0432\u044b\u0431\u043e\u0440\u043a\u0438 \u043f\u043e \u0444\u043b\u0430\u0433\u0430\u043c      * @param integer $flag      * @return \\User      *\/     public function withFlags($flag=0)     {         $this-&gt;getDbCriteria()-&gt;mergeWith(array(             'order'=&gt;'flags & :flag',             'params' =&gt; array(':flag' =&gt; $flag),         ));         return $this;     }     <\/code><\/pre>\n<p>  <\/div>\n<\/div>\n<p>  \u0412 \u0437\u0430\u043f\u0440\u043e\u0441\u0435 MySQL \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0430 \u043f\u0440\u0438\u043c\u0435\u0442 \u0432\u0438\u0434:  <\/p>\n<pre><code class=\"sql\">    SELECT * FROM `User` WHERE STATUS & 6 <\/code><\/pre>\n<p>  \u0412 \u043f\u0440\u0438\u043c\u0435\u0440\u0435 \u0441\u043e\u0437\u0434\u0430\u043d\u0430 <a href=\"http:\/\/www.yiiframework.com\/doc\/guide\/1.1\/ru\/database.ar#sec-11\">\u0438\u043c\u0435\u043d\u043e\u0432\u0430\u043d\u043d\u0430\u044f \u0433\u0440\u0443\u043f\u043f\u0430 \u0443\u0441\u043b\u043e\u0432\u0438\u0439<\/a> \u044d\u0442\u043e \u043f\u043e\u0437\u0432\u043e\u043b\u0438\u0442 \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u0442\u044c \u043f\u043e\u0438\u0441\u043a \u043a\u0430\u043a \u043f\u043e\u043a\u0430\u0437\u0430\u043d\u043e \u043d\u0438\u0436\u0435:<\/p>\n<pre><code class=\"php\">    User::model()-&gt;withFlags(User::FLAG_CONFIRM_EMAIL)-&gt;findAll(); <\/code><\/pre>\n<h5>\u0420\u0435\u043b\u044f\u0446\u0438\u043e\u043d\u043d\u044b\u0435 \u0441\u0432\u044f\u0437\u0438<\/h5>\n<p>  \u0420\u0435\u043b\u044f\u0446\u0438\u043e\u043d\u043d\u044b\u0435 \u0441\u0432\u044f\u0437\u0438 \u0445\u043e\u0440\u043e\u0448\u043e \u043e\u043f\u0438\u0441\u0430\u043d\u044b \u0432 <a href=\"http:\/\/www.yiiframework.com\/doc\/guide\/1.1\/ru\/database.arr\">\u043e\u0444\u0438\u0446\u0438\u0430\u043b\u044c\u043d\u043e\u0439 \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430\u0446\u0438\u0438<\/a>.<br \/>  \u041d\u0430 \u043f\u0440\u0430\u043a\u0442\u0438\u043a\u0435 \u0432\u043e\u0437\u043d\u0438\u043a\u0430\u044e\u0442 \u0442\u0430\u043a\u0438\u0435 \u043d\u044e\u0430\u043d\u0441\u044b.   <\/p>\n<ul>\n<li>\u0415\u0441\u043b\u0438 \u0440\u0435\u043b\u044f\u0446\u0438\u043e\u043d\u043d\u0430\u044f \u0441\u0432\u044f\u0437\u044c \u043f\u043e\u0441\u0442\u0440\u043e\u0435\u043d\u0430 \u043f\u0440\u0430\u0432\u0438\u043b\u044c\u043d\u043e \u0441 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435\u043c FK \u0442\u043e \u0432\u0441\u0435 \u0434\u043e\u043b\u0436\u043d\u043e \u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c \u0447\u0435\u0442\u043a\u043e, \u0442\u0430\u043a \u043a\u0430\u043a \u0446\u0435\u043b\u043e\u0441\u0442\u043d\u043e\u0441\u0442\u044c \u0434\u0430\u043d\u043d\u044b\u0445 \u043e\u0431\u0435\u0441\u043f\u0435\u0447\u0435\u043d\u0430 \u0411\u0414.<\/li>\n<li>\u0415\u0441\u043b\u0438 \u0440\u0435\u043b\u044f\u0446\u0438\u043e\u043d\u043d\u0430\u044f \u0441\u0432\u044f\u0437\u044c \u043f\u043e\u0441\u0442\u0440\u043e\u0435\u043d\u0430 \u0442\u043e\u043b\u044c\u043a\u043e \u0441\u0440\u0435\u0434\u0441\u0442\u0432\u0430\u043c\u0438 YII ( \u0438 \u043d\u0435\u0442 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u0438 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c FK), \u0432 \u044d\u0442\u043e\u043c \u0441\u043b\u0443\u0447\u0430\u0435 \u043d\u0435 \u0441\u043b\u0435\u0434\u0443\u0435\u0442 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u043f\u0440\u044f\u043c\u043e\u0439 \u0434\u043e\u0441\u0442\u0443\u043f \u043a \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u043e\u0439 \u043e\u0431\u043e\u0437\u043d\u0430\u0447\u0430\u044e\u0449\u0435\u0439 \u0441\u0432\u044f\u0437\u044c, \u0432\u043c\u0435\u0441\u0442\u043e \u044d\u0442\u043e\u0433\u043e \u0441\u043b\u0435\u0434\u0443\u0435\u0442 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c <a href=\"http:\/\/www.yiiframework.com\/doc\/api\/1.1\/CActiveRecord\/#getRelated-detail\">CActiveRecord::getRelated()<\/a>.<\/li>\n<li>\u041f\u0440\u043e\u0432\u0435\u0440\u043a\u0443 \u043f\u0440\u0430\u0432\u0438\u043b\u044c\u043d\u043e\u0441\u0442\u0438 \u0441\u0432\u044f\u0437\u0435\u0439 (\u043f\u0440\u0430\u0432\u0438\u043b\u044c\u043d\u044b\u0435 ID) \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u043a\u043e\u043d\u0442\u0440\u043e\u043b\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u043f\u0440\u0438 \u0432\u0430\u043b\u0438\u0434\u0430\u0446\u0438\u0438 \u0438 \u0432 beforeSave() \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u0435.<\/li>\n<li>\u0423\u0434\u0430\u043b\u0435\u043d\u0438\u0435 \u0441\u0432\u044f\u0437\u0430\u043d\u043d\u044b\u0445 \u0434\u0430\u043d\u043d\u044b\u0445 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u0440\u0435\u0430\u043b\u0438\u0437\u043e\u0432\u0430\u0442\u044c \u0432 beforeDelete() \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u0435.<\/li>\n<\/ul>\n<h5>\u041f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u0438\u044f \u0434\u043b\u044f \u0430\u0442\u0440\u0438\u0431\u0443\u0442\u043e\u0432<\/h5>\n<p>  \u0412 \u043a\u043e\u0434\u0435 \u043c\u043e\u0434\u0435\u043b\u0435\u0439 \u0438\u043d\u043e\u0433\u0434\u0430 \u0432\u0441\u0442\u0440\u0435\u0447\u0430\u0435\u0442\u0441\u044f HTML-\u043a\u043e\u0434 \u2014 \u0435\u043c\u0443 \u0442\u0430\u043c \u043d\u0435 \u043c\u0435\u0441\u0442\u043e. \u0415\u0441\u043b\u0438 \u0435\u0441\u0442\u044c \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e\u0441\u0442\u044c \u0432\u044b\u0432\u0435\u0441\u0442\u0438 HTML-\u0444\u043e\u0440\u043c\u0430\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0439 \u0432\u0438\u0434 \u0430\u0442\u0440\u0438\u0431\u0443\u0442\u0430 \u0434\u043b\u044f \u044d\u0442\u043e\u0433\u043e \u0441\u043b\u0435\u0434\u0443\u0435\u0442 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0438\u043b\u0438 \u0432\u0438\u0434\u0436\u0435\u0442 \u0438\u043b\u0438 \u0441\u043e\u0437\u0434\u0430\u0442\u044c \u0445\u0435\u043b\u043f\u0435\u0440 \u0434\u043b\u044f \u043c\u043e\u0434\u0435\u043b\u0438 (\u043a\u043b\u0430\u0441\u0441 \u0441\u043e \u0441\u0442\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438\u043c\u0438 \u043c\u0435\u0442\u043e\u0434\u0430\u043c\u0438). \u043f\u0440\u0438\u043c\u0435\u0440\u044b \u043f\u043e\u043a\u0430\u0437\u0430\u043d\u044b \u043d\u0438\u0436\u0435.<\/p>\n<div class=\"spoiler\"><b class=\"spoiler_title\">\u041f\u0440\u0438\u043c\u0435\u0440 \u0445\u0435\u043b\u043f\u0435\u0440\u0430<\/b><\/p>\n<div class=\"spoiler_text\">\n<pre><code class=\"php\">class UserHelper{            \/**       * \u0412\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0435\u0442 \u0433\u0438\u043f\u0435\u0440\u0441\u0441\u044b\u043b\u043a\u0443 \u043d\u0430 \u043f\u0440\u043e\u0444\u0438\u043b\u044c \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f       * @return string       *\/      public static function getProfileLink(User $model, $htmlOptions = array())      {           return CHtml::link($model-&gt;getUserName(),$model-&gt;getProfileUrl(),$htmlOptions);      }  }  <\/code><\/pre>\n<p>  <\/div>\n<\/div>\n<div class=\"spoiler\"><b class=\"spoiler_title\">\u041f\u0440\u0438\u043c\u0435\u0440 \u0432\u0438\u0434\u0436\u0435\u0442\u0430<\/b><\/p>\n<div class=\"spoiler_text\">class UserAvatar extends CWidget<br \/>  {<br \/>   public $emptyPhotoUrl = &quot;\/static\/images\/no-photo.png&quot;;<br \/>   public $model;<br \/>   public $htmlOptions;<\/p>\n<p>   public function run(){<br \/>   $avatar = $this-&gt;emptyPhotoUrl;<br \/>   if($model-&gt;hasAvatar())<br \/>   {<br \/>   $avatar = $model-&gt;getAvatarUrl();<br \/>   }<br \/>   echo CHtml::image($avatar,$model-&gt;getUserName(),$this-&gt;htmlOptions);<br \/>   }<br \/>  }<\/p><\/div>\n<\/div>\n<p>  \u0412\u0438\u0434\u0436\u0435\u0442 \u0438 \u0445\u0435\u043b\u043f\u0435\u0440 \u0443\u0434\u043e\u0431\u043d\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0432 \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u0438\u044f\u0445, \u0445\u0435\u043b\u043f\u0435\u0440 \u0443\u0434\u043e\u0431\u0435\u043d \u043f\u0440\u0438 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0438 \u0432\u043d\u0443\u0442\u0440\u0438 \u0432\u0438\u0434\u0436\u0435\u0442\u0430 CGridView.<\/p>\n<h5>\u0416\u0443\u0440\u043d\u0430\u043b\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435 \u043c\u043e\u0434\u0435\u043b\u0435\u0439<\/h5>\n<p>  \u0414\u043b\u044f \u043e\u0442\u043b\u0430\u0434\u043a\u0438 \u043c\u043e\u0434\u0435\u043b\u0435\u0439, \u043e\u0441\u043e\u0431\u0435\u043d\u043d\u043e \u0434\u043b\u044f \u043e\u0442\u043b\u043e\u0432\u0430 \u0442\u0440\u0443\u0434\u043d\u043e\u0432\u043e\u0441\u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u043c\u043e\u0439 \u043e\u0448\u0438\u0431\u043a\u0438 \u0438\u043d\u043e\u0433\u0434\u0430 \u043f\u043e\u043b\u0435\u0437\u043d\u043e \u0438\u043c\u0435\u0442\u044c \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u044c \u0443\u0437\u043d\u0430\u0442\u044c \u0445\u0440\u043e\u043d\u043e\u043b\u043e\u0433\u0438\u044e \u0441\u043e\u0431\u044b\u0442\u0438\u0439.<br \/>  \u0414\u043b\u044f \u044d\u0442\u043e\u0433\u043e \u0432 \u043c\u043e\u0434\u0435\u043b\u044c \u043c\u043e\u0436\u043d\u043e \u0434\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u043c\u0435\u0442\u043e\u0434\u044b \u0436\u0443\u0440\u043d\u0430\u043b\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f, \u0438 \u043d\u0430 \u0432\u0441\u0435 \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u0438 \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u043c\u044b\u0435 \u0441 \u0434\u0430\u043d\u043d\u044b\u043c\u0438 \u0432\u0435\u0441\u0442\u0438 \u0436\u0443\u0440\u043d\u0430\u043b (\u043b\u043e\u0433-\u0444\u0430\u0439\u043b). \u0420\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044f \u044d\u0442\u043e\u0439 \u043d\u0435\u0441\u043b\u043e\u0436\u043d\u043e\u0439 \u043c\u0435\u0445\u0430\u043d\u0438\u043a\u0438 \u043c\u043e\u0436\u0435\u0442 \u0431\u044b\u0442\u044c \u043b\u044e\u0431\u043e\u0439, \u043e\u0434\u043d\u0430\u043a\u043e \u043f\u043e\u043b\u0435\u0437\u043d\u043e \u0432\u0441\u043f\u043e\u043c\u043d\u0438\u0442\u044c \u043f\u0440\u043e \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442 CLogRoute \u0438 \u043d\u0430\u0441\u0442\u0440\u043e\u0438\u0442\u044c \u043e\u0434\u0438\u043d \u0438\u0437 \u043c\u0430\u0440\u0448\u0440\u0443\u0442\u043e\u0432 \u0434\u043b\u044f \u0441\u0432\u043e\u0435\u0439 \u043c\u043e\u0434\u0435\u043b\u0438, \u043b\u043e\u0433 \u043c\u043e\u0436\u043d\u043e \u0432\u0435\u0441\u0442\u0438 \u043a\u0430\u043a \u0432 \u0431\u0430\u0437\u0443 (\u043e\u0441\u0442\u043e\u0440\u043e\u0436\u043d\u043e, \u0441\u043d\u0438\u0436\u0430\u0435\u0442 \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u044c) \u0442\u0430\u043a \u0438 \u0432 \u043f\u0440\u043e\u0441\u0442\u044b\u0435 \u0444\u0430\u0439\u043b\u044b. \u0422\u0430\u043a\u0436\u0435 \u0432 \u043b\u043e\u0433 \u043f\u043e\u043b\u0435\u0437\u043d\u043e \u043f\u0438\u0441\u0430\u0442\u044c \u0434\u0430\u043d\u043d\u044b\u0435 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f \u043e\u0442 \u0438\u043c\u0435\u043d\u0438 \u043a\u043e\u0442\u043e\u0440\u043e\u0433\u043e \u0441\u043e\u0432\u0435\u0440\u0448\u0430\u0435\u0442\u0441\u044f \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u044f, \u044d\u0442\u043e \u0443\u043f\u0440\u043e\u0441\u0442\u0438\u0442 \u0440\u0430\u0437\u0431\u043e\u0440 \u043f\u043e\u043b\u0435\u0442\u043e\u0432.    \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\/212917\/\"> http:\/\/habrahabr.ru\/post\/212917\/<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<div class=\"content html_format\">   \t<img decoding=\"async\" src=\"http:\/\/habrastorage.org\/getpro\/habr\/post_images\/a84\/5b6\/2b2\/a845b62b22489df97996ffb65fd91b3a.png\"\/><br \/>  \u041f\u0440\u043e\u0434\u043e\u043b\u0436\u0435\u043d\u0438\u0435 <a href=\"http:\/\/habrahabr.ru\/post\/212681\/\">\u043f\u0440\u0435\u0434\u044b\u0434\u0443\u0449\u0435\u0433\u043e \u043f\u043e\u0441\u0442\u0430<\/a>  <\/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-212917","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/212917","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=212917"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/212917\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=212917"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=212917"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=212917"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}