{"id":307500,"date":"2020-07-26T09:00:26","date_gmt":"2020-07-26T09:00:26","guid":{"rendered":"http:\/\/savepearlharbor.com\/?p=307500"},"modified":"-0001-11-30T00:00:00","modified_gmt":"-0001-11-29T21:00:00","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=307500","title":{"rendered":"\u041a\u0430\u043a \u043d\u0430\u043f\u0438\u0441\u0430\u0442\u044c \u043f\u0440\u043e\u0441\u0442\u0443\u044e \u0421\u043e\u0446\u0438\u0430\u043b\u044c\u043d\u0443\u044e \u0441\u0435\u0442\u044c"},"content":{"rendered":"\n<div class=\"post__text post__text-html post__text_v1\" id=\"post-content-body\" data-io-article-url=\"https:\/\/habr.com\/ru\/post\/479558\/\"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/sf\/nn\/rw\/sfnnrwjs2dd8ltcazmhtainxkvw.png\"><br \/>  \u0412 \u043c\u043e\u0435\u0439 \u0441\u043e\u0446\u0438\u0430\u043b\u044c\u043d\u043e\u0439 \u0441\u0435\u0442\u0438 \u0440\u0435\u0430\u043b\u0438\u0437\u043e\u0432\u0430\u043d\u044b \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0435 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u0438:<br \/>   \u2014 \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u0435 \u0441\u0432\u043e\u0438\u0445 HTML \u0430\u043d\u043a\u0435\u0442;<br \/>   \u2014 \u043e\u0431\u043c\u0435\u043d \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u044f\u043c\u0438, \u0444\u043e\u0442\u043e, \u0430\u0443\u0434\u0438\u043e \u0438 \u0432\u0438\u0434\u0435\u043e;<br \/>   \u2014 \u0432\u0441\u0442\u0440\u043e\u0435\u043d\u043d\u044b\u0439 \u043f\u043b\u0435\u0435\u0440 \u043e\u0431\u043b\u0430\u0447\u043d\u043e\u0433\u043e \u0430\u0443\u0434\u0438\u043e;<br \/>   \u2014 \u0447\u0430\u0442 \u043a\u043e\u043c\u043d\u0430\u0442\u044b \u0434\u043b\u044f \u043e\u0431\u0449\u0435\u043d\u0438\u044f;<br \/>   \u2014 \u0438\u0433\u0440\u0430 \u0432 \u0441\u0438\u043c\u043f\u0430\u0442\u0438\u0438.<br \/>  <a name=\"habracut\"><\/a><br \/>  \u0414\u043b\u044f \u044d\u0442\u043e\u0433\u043e \u043c\u043d\u043e\u044e \u0431\u044b\u043b \u043d\u0430\u043f\u0438\u0441\u0430\u043d API \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0439:<\/p>\n<div class=\"spoiler\" role=\"button\" tabindex=\"0\">                         <b class=\"spoiler_title\">API \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f \u0441\u0435\u0440\u0432\u0435\u0440\u0430<\/b>                         <\/p>\n<div class=\"spoiler_text\">var svlaboratoryBaseUrl = \u00ab<a href=\"http:\/\/svlaboratory.org\" rel=\"nofollow\">svlaboratory.org<\/a>\u00bb;<\/p>\n<p>  var addProfileUrl = svlaboratoryBaseUrl + &quot;\/admin\/chatbot\/addprofile&quot;;<br \/>   \u2014 \u0434\u043e\u0431\u0430\u0432\u043b\u0435\u043d\u0438\u0435 \u043f\u0440\u043e\u0444\u0438\u043b\u044f \u0432 \u0431\u0430\u0437\u0443 \u0434\u0430\u043d\u043d\u044b\u0445;<\/p>\n<p>  var loginProfileUrl = svlaboratoryBaseUrl + &quot;\/admin\/chatbot\/profilelogin&quot;;<br \/>   \u2014 \u0430\u0432\u0442\u043e\u0440\u0438\u0437\u0430\u0446\u0438\u044f \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f;<\/p>\n<p>  var getFotosUrl = svlaboratoryBaseUrl + &quot;\/admin\/chatbot\/getfotos&quot;;<br \/>   \u2014 \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u0438\u0435 \u0432\u0441\u0435\u0445 \u0444\u0430\u0439\u043b\u043e\u0432 \u0430\u043d\u043a\u0435\u0442\u044b \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f (\u0444\u043e\u0442\u043e, \u0432\u0438\u0434\u0435\u043e, \u043c\u0443\u0437\u044b\u043a\u0438);<\/p>\n<p>  var delFotoUrl = svlaboratoryBaseUrl + &quot;\/admin\/chatbot\/deletefoto&quot;;<br \/>   \u2014 \u0443\u0434\u0430\u043b\u0435\u043d\u0438\u0435 \u0444\u043e\u0442\u043e \u0438\u0437 \u0430\u043d\u043a\u0435\u0442\u044b;<\/p>\n<p>  var selectFotoUrl = svlaboratoryBaseUrl + &quot;\/admin\/chatbot\/selectfoto&quot;;<br \/>   \u2014 \u0432\u044b\u0431\u043e\u0440 \u0444\u043e\u0442\u043e \u0434\u043b\u044f \u0433\u043b\u0430\u0432\u043d\u043e\u0433\u043e \u0444\u043e\u0442\u043e;<\/p>\n<p>  var searchProfilesUrl = svlaboratoryBaseUrl + &quot;\/admin\/chatbot\/searchprofiles&quot;;<br \/>   \u2014 \u043f\u043e\u0438\u0441\u043a \u0430\u043d\u043a\u0435\u0442 \u043f\u043e \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u0430\u043c;<\/p>\n<p>  var instaProfilesUrl = svlaboratoryBaseUrl + &quot;\/admin\/chatbot\/instaprofiles&quot;;<br \/>   \u2014 \u043f\u043e\u0438\u0441\u043a \u0430\u043d\u043a\u0435\u0442 \u043f\u043e \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u0430\u043c \u0438\u0437 \u0441\u043f\u0438\u0441\u043a\u0430 \u0432\u0441\u0435\u0445 \u043d\u043e\u0432\u044b\u0445 \u0444\u043e\u0442\u043e \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u0435\u0439;<\/p>\n<p>  var getAnketaUrl = svlaboratoryBaseUrl + &quot;\/admin\/chatbot\/getanketa&quot;;<br \/>   \u2014 \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u0438\u0435 \u0434\u0430\u043d\u043d\u044b\u0445 \u043e \u043f\u0440\u043e\u0444\u0438\u043b\u0435 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f;<\/p>\n<p>  var sendProfileMsgUrl = svlaboratoryBaseUrl + &quot;\/admin\/chatbot\/sendmsg&quot;;<br \/>   \u2014 \u043e\u0442\u043f\u0440\u0430\u0432\u043a\u0430 \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u044f \u0434\u0440\u0443\u0433\u043e\u043c\u0443 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044e;<\/p>\n<p>  var getAllProfileMsgsUrl = svlaboratoryBaseUrl + &quot;\/admin\/chatbot\/getallmsgs&quot;;<br \/>   \u2014 \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u0438\u0435 \u0441\u043f\u0438\u0441\u043a\u0430 \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u0439;<\/p>\n<p>  var getProfilesMsgsUrl = svlaboratoryBaseUrl + &quot;\/admin\/chatbot\/getprofilesmsgs&quot;;<br \/>   \u2014 \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u0438\u0435 \u0441\u043f\u0438\u0441\u043a\u0430 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u0435\u0439 \u043e\u0442\u043f\u0440\u0430\u0432\u0438\u0432\u0448\u0438\u0445 \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u044f;<\/p>\n<p>  var updateProfileUrl = svlaboratoryBaseUrl + &quot;\/admin\/chatbot\/updateprofile&quot;;<br \/>   \u2014 \u043e\u0431\u043d\u043e\u0432\u043b\u0435\u043d\u0438\u0435 \u043f\u043e\u0437\u0438\u0446\u0438\u0438 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f \u0432 \u0441\u043f\u0438\u0441\u043a\u0435 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u0435\u0439;<\/p>\n<p>  var visitProfilesUrl = svlaboratoryBaseUrl + &quot;\/admin\/chatbot\/getvisithistory&quot;;<br \/>   \u2014 \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u0438\u0435 \u0441\u043f\u0438\u0441\u043a\u0430 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u0435\u0439, \u043f\u0440\u043e\u0441\u043c\u0430\u0442\u0440\u0438\u0432\u0430\u0432\u0448\u0438\u0445 \u0430\u043d\u043a\u0435\u0442\u0443;<\/p>\n<p>  var getSmallavatarUrl = svlaboratoryBaseUrl + &quot;:8080\/file\/chatbotmin\/&quot;;<br \/>   \u2014 \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u0438\u0435 \u043c\u0430\u043b\u0435\u043d\u044c\u043a\u043e\u0439 \u043a\u043e\u043f\u0438\u0438 \u0438\u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u044f;<\/p>\n<p>  var getImgUrl = svlaboratoryBaseUrl + &quot;:8080\/file\/chatbotnorm\/&quot;;<br \/>   \u2014 \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u0438\u0435 \u043e\u0431\u044b\u0447\u043d\u043e\u0439 \u043a\u043e\u043f\u0438\u0438 \u0438\u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u044f;<\/p>\n<p>  var getSmallavatarUrl2 = svlaboratoryBaseUrl + &quot;\/application\/smallavatar?url=&quot;;<br \/>   \u2014 \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u0438\u0435 \u043c\u0430\u043b\u0435\u043d\u044c\u043a\u043e\u0439 \u043a\u043e\u043f\u0438\u0438 \u0430\u0432\u0430\u0442\u0430\u0440\u0430;<\/p>\n<p>  var getLikeProfilesUrl = svlaboratoryBaseUrl + &quot;\/admin\/chatbot\/getlikeprofiles&quot;;<br \/>   \u2014 \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u0438\u0435 \u0441\u043f\u0438\u0441\u043a\u0430 \u0432\u0441\u0435\u0445 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u0435\u0439 \u0434\u043b\u044f \u0438\u0433\u0440\u044b \u0432 \u0441\u0438\u043c\u043f\u0430\u0442\u0438\u0438;<\/p>\n<p>  var likeProfileUrl = svlaboratoryBaseUrl + &quot;\/admin\/chatbot\/likeprofile&quot;;<br \/>   \u2014 \u043e\u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0438\u0442\u044c \u043f\u043b\u044e\u0441 \u0430\u043d\u043a\u0435\u0442\u044b;<\/p>\n<p>  var getLikesUrl = svlaboratoryBaseUrl + &quot;\/admin\/chatbot\/getlikes&quot;;<br \/>   \u2014 \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u044c \u0441\u043f\u0438\u0441\u043e\u043a \u0432\u0441\u0435\u0445 \u043f\u043b\u044e\u0441\u043e\u0432;<\/p>\n<p>  var getModerProfilesUrl = svlaboratoryBaseUrl + &quot;\/admin\/chatbot\/getmoderprofiles&quot;;<br \/>   \u2014 \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u0438\u0435 \u0441\u043f\u0438\u0441\u043a\u0430 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u0435\u0439 \u043f\u043e\u0434\u043b\u0435\u0436\u0430\u0449\u0438\u0445 \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0438 \u043c\u043e\u0434\u0435\u0440\u0430\u0442\u043e\u0440\u043e\u043c;<\/p>\n<p>  var moderProfileUrl = svlaboratoryBaseUrl + &quot;\/admin\/chatbot\/moderprofile&quot;;<br \/>   \u2014 \u043e\u0441\u0443\u0449\u0435\u0441\u0442\u0432\u043b\u0435\u043d\u0438\u0435 \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0438 \u043c\u043e\u0434\u0435\u0440\u0430\u0442\u043e\u0440\u043e\u043c \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f;<\/p>\n<p>  var getModerUrl = svlaboratoryBaseUrl + &quot;\/admin\/chatbot\/getmoder&quot;;<br \/>   \u2014 \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u0438\u0435 \u0441\u043f\u0438\u0441\u043a\u0430 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u0435\u0439 \u043f\u0440\u043e\u0448\u0435\u0434\u0448\u0438\u0445 \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0443 \u043c\u043e\u0434\u0435\u0440\u0430\u0442\u043e\u0440\u043e\u043c;  <\/div>\n<\/p><\/div>\n<p>  \u0418 \u0441\u043f\u0438\u0441\u043e\u043a \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0439 \u0441\u0432\u044f\u0437\u0430\u043d\u043d\u044b\u0445 \u0441 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f\u043c\u0438:  <\/p>\n<div class=\"spoiler\" role=\"button\" tabindex=\"0\">                         <b class=\"spoiler_title\">API \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f \u0441\u0435\u0440\u0432\u0435\u0440\u0430 \u0434\u043b\u044f \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u0435\u0439<\/b>                         <\/p>\n<div class=\"spoiler_text\">var getUserorder = svlaboratoryBaseUrl + &quot;\/application\/getuserorder&quot;;<br \/>  var getUserfromorderlist = svlaboratoryBaseUrl + &quot;\/application\/getuserfromorderlist&quot;;<br \/>  var getUsertoorderlist = svlaboratoryBaseUrl + &quot;\/application\/getusertoorderlist&quot;;<br \/>  var addUserorder = svlaboratoryBaseUrl + &quot;\/application\/adduserorder&quot;;<br \/>  var getUsermyorderlist = svlaboratoryBaseUrl + &quot;\/application\/getusermyorderlist&quot;;  <\/div>\n<\/p><\/div>\n<p>  API \u0431\u044b\u043b \u0440\u0435\u0430\u043b\u0438\u0437\u043e\u0432\u0430\u043d \u043a\u0430\u043a \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u044f \u043a\u0430\u0440\u043a\u0430\u0441\u0430 \u0441\u0435\u0440\u0432\u0435\u0440\u043d\u044b\u0445 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0439 Zend Framework.<\/p>\n<p>  \u0420\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442 \u0437\u0430\u043f\u0440\u043e\u0441\u0430 \u043a API \u0431\u044b\u043b\u0438 JSON \u0441\u0442\u0440\u043e\u043a\u0438 \u0434\u0430\u043d\u043d\u044b\u0445:<\/p>\n<pre><code class=\"php\">$response = array(             &quot;success&quot; =&gt; true,             &quot;complete&quot; =&gt; true,             &quot;data&quot; =&gt; $data         ); echo json_encode($response); <\/code><\/pre>\n<p>  \u041a\u043b\u0438\u0435\u043d\u0442 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f \u0431\u044b\u043b \u0441\u043e\u0437\u0434\u0430\u043d \u043a\u0430\u043a \u0435\u0434\u0438\u043d\u043e\u0435 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435 \u043d\u0430 Bootstrap \u0438 JQuery.<\/p>\n<p>  \u0412\u0441\u0435 \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u044f API \u0432\u044b\u0437\u044b\u0432\u0430\u043b\u0438\u0441\u044c \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u043f\u0440\u043e\u0446\u0435\u0434\u0443\u0440\u044b AJAX.<\/p>\n<p>  \u041f\u0440\u0438\u0432\u0435\u0434\u0443 \u043d\u0435\u043c\u043d\u043e\u0433\u043e \u043e\u0431\u0440\u0430\u0437\u0446\u043e\u0432 \u043a\u043e\u0434\u0430 \u0434\u043b\u044f \u043e\u0441\u0443\u0449\u0435\u0441\u0442\u0432\u043b\u0435\u043d\u0438\u044f CRUD \u043d\u0430 \u043f\u0440\u0438\u043c\u0435\u0440\u0435 \u043e\u0442\u043f\u0440\u0430\u0432\u043a\u0438 \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u0439:<br \/>  \u041d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u043e\u0442\u043f\u0440\u0430\u0432\u043a\u0430 \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u0439 \u0440\u0435\u0430\u043b\u0438\u0437\u043e\u0432\u0430\u043d\u0430 \u043a\u0430\u043a \u0444\u0443\u043d\u043a\u0446\u0438\u044f sendProfileMsg \u043d\u0430 \u0441\u0442\u043e\u0440\u043e\u043d\u0435 \u043a\u043b\u0438\u0435\u043d\u0442\u0430 \u043d\u0430 \u044f\u0437\u044b\u043a\u0435 JS:<\/p>\n<pre><code class=\"javascript\">function sendProfileMsg(text) { \tvar data = { \t\tuserid: anketaUserId, \t\tmsg: text \t}; \tdata[&quot;token&quot;] = token; \t$.post(sendProfileMsgUrl, \t\tdata, \t\tfunction(data) { \t\t\tif (data.complete) { \t\t\t\tgetAllProfileMsgs(); \t\t\t} \t\t}, \t\t&quot;json&quot; \t); } <\/code><\/pre>\n<p>  \u0418 \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0430 \u0437\u0430\u043f\u0440\u043e\u0441\u0430 \u043a \u0441\u0435\u0440\u0432\u0435\u0440\u0443 \u043d\u0430 \u044f\u0437\u044b\u043a\u0435 PHP \u0441 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435\u043c \u043a\u0430\u0440\u043a\u0430\u0441\u0430 Zend Framework<\/p>\n<pre><code class=\"php\">public function sendmsgAction() {         header('Access-Control-Allow-Origin: http:\/\/svlaboratory.org:8080');         $this-&gt;_helper-&gt;layout-&gt;disableLayout();         $this-&gt;_helper-&gt;viewRenderer-&gt;setNoRender(true);         $userId = $this-&gt;_getParam('userid');         $msg = $this-&gt;_getParam('msg');         $authHelper = new Ext_Controller_Action_Helper_Auth();                  $token = $this-&gt;_getParam('token', null);         $ip = $_SERVER['REMOTE_ADDR'];         $myUserId = $authHelper-&gt;getUserId($token, $ip);                  $response = array(             &quot;success&quot; =&gt; true,             &quot;complete&quot; =&gt; true         );         $modelChat = new Model_Chat();                  $data = array(             &quot;message&quot; =&gt; $msg,             &quot;user_id_from&quot; =&gt; $myUserId,             &quot;user_id_to&quot; =&gt; $userId,         );                  $modelChat-&gt;save($data);         $this-&gt;notificateUser($userId, $myUserId);         echo json_encode($response);     } <\/code><\/pre>\n<p>  \u0414\u043b\u044f \u0441\u043e\u0445\u0440\u0430\u043d\u0435\u043d\u0438\u044f \u0434\u0430\u043d\u043d\u044b\u0445 \u0432 \u0431\u0430\u0437\u0443 \u0434\u0430\u043d\u043d\u044b\u0445 \u0442\u0443\u0442 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043b\u0441\u044f \u043a\u043b\u0430\u0441\u0441 Model<\/p>\n<pre><code class=\"php\">class Ext_Model { protected $_dbAdapter;           \/**      *      * @var array      *\/     protected $_fields = array();     protected $_primaryKey = array();      \/**      *      * @var Zend_Db_Table_Abstract      *\/     protected $_dbTable = null;      \/**      *      * @var string      *\/     protected $_dbTableClass = null;      protected $_id=null;          public function getId()     {         return $this-&gt;_id;     }          public function setId($id)     {         $this-&gt;_id=$id;     }   public function save($data)     {         $insertId = null;                  $data = $this-&gt;_beforeSave($data);         \/\/ \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u0438 \u0434\u043b\u044f \u0441\u043e\u0445\u0440\u0430\u043d\u0435\u043d\u0438\u044f \u0437\u0430\u043f\u0438\u0441\u0438         $cleanData = array();         $pk = array();         foreach ($this-&gt;_fields as $field) {             if (array_key_exists($field, $data)) {                 $cleanData[$field] = $data[$field];             }         }         foreach ($this-&gt;_primaryKey as $field =&gt; $value) {             if (isset($cleanData[$value])) {                 $pk[$value] = $cleanData[$value];             }         }          if (!empty($cleanData)) {             if (empty($pk)) {                 $insertId = $this-&gt;insert($cleanData);                 $data[&quot;id&quot;] = $insertId;             } else {                 $this-&gt;update($pk, $cleanData);             }         }                 $this-&gt;_afterSave($data);         return $insertId;     }  public function update($id, $data)     {         $data = $this-&gt;_beforeUpdate($data);         $where = &quot;&quot;;         foreach ($this-&gt;_primaryKey as $key =&gt; $values) {             if ($key &gt; 0 and $key &lt;= count($this-&gt;_primaryKey)) {                 $where .= ' and ';             }             $where .= &quot;`$values`&quot; . &quot; = &quot; . &quot;$id[$values]&quot;;              unset($data[$values]);         }         $this-&gt;getDBTable()-&gt;update($data, $where);         $data=$id+$data;         $this-&gt;_afterUpdate($data);     }      public function insert($data)     {         $data = $this-&gt;_beforeInsert($data);         $this-&gt;getDBTable()-&gt;insert($data);         $this-&gt;setId($this-&gt;getDBTable()-&gt;getAdapter()-&gt;lastInsertId());         $this-&gt;_afterInsert($data);         return $this-&gt;getDBTable()-&gt;getAdapter()-&gt;lastInsertId();     }  public function fetchRowManyWhere($conditions = array())     {         $select = $this-&gt;getDBTable()-&gt;select();         $this-&gt;_beforeFetch($select);         foreach ($conditions as $field =&gt; $value) {             $select-&gt;where(&quot;`$field` = ?&quot;, $value);         }         $row = $this-&gt;getDBTable()-&gt;fetchRow($select);         if (!$row) {             return array();         }         return $row-&gt;toArray();     }      public function fetchAllManyWhere($conditions = array(), $limit = null, $offset = null, $order = null)     {         $select = $this-&gt;getDBTable()-&gt;select();         $this-&gt;_beforeFetch($select);         foreach ($conditions as $field =&gt; $value) {             $select-&gt;where(&quot;`$field` = ?&quot;, $value);         }                  if ($order !== null) {             $select-&gt;order($order);         }                  if ($limit !== null || $offset !== null) {             $select-&gt;limit($limit, $offset);         }                  $rows = $this-&gt;getDBTable()-&gt;fetchAll($select);         if (!$rows) {             return array();         }         return $rows-&gt;toArray();     }  public function delete($id)     {         $id=$this-&gt;_beforeDelete($id);         $this-&gt;getDBTable()-&gt;delete(&quot;id = &quot; . (int) $id);         $this-&gt;_afterDelete($id);     }      public function deleteByAttrib($att, $value)     {         $select = $this-&gt;getDBTable()-&gt;select();         $where = $this-&gt;getDBTable()-&gt;getAdapter()-&gt;quoteInto(&quot;`$att` = ?&quot;, $value);         $this-&gt;getDBTable()-&gt;delete($where);     }  public function getDBTable()     {         if (!$this-&gt;_dbTable) {             if (!$this-&gt;_dbTableClass) {                 throw new Ext_Model_Exception('DB table class is not set');             }             $this-&gt;_dbTable = new $this-&gt;_dbTableClass;         }         return $this-&gt;_dbTable;     }  public function setDBTable(Zend_Db_Table_Abstract $table)     {         $this-&gt;_dbTable = $table;         return $this;     }          public function lastInsertId()     {         return $this-&gt;getDBTable()-&gt;getAdapter()-&gt;lastInsertId();     }          protected function _beforeFetch($select)     {      }          protected function _beforeSave($data)     {         return $data;     }     protected function _afterSave($data)     {         return $data;     }     protected function _beforeUpdate($data)     {         return $data;     }     protected function _afterUpdate($data)     {         return $data;     }     protected function _beforeInsert($data)     {         return $data;     }     protected function _afterInsert($data)     {         return $data;     }     protected function _beforeDelete($id)     {         return $id;     }     protected function _afterDelete($id)     {         return $id;     } } <\/code><\/pre>\n<p>  \u0414\u0440\u0443\u0433\u0438\u0435 \u043c\u0435\u0442\u043e\u0434\u044b \u0442\u0438\u043f\u0430 delete \u0438\u043b\u0438 fetchRow, find, fetchAll<br \/>  \u0440\u0435\u0430\u043b\u0438\u0437\u0443\u044e\u0442\u0441\u044f \u0430\u043d\u0430\u043b\u043e\u0433\u0438\u0447\u043d\u043e \u0432\u043d\u0435\u0434\u0440\u044f\u044f \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b \u0432 \u0437\u0430\u043f\u0440\u043e\u0441\u044b MySQL.<br \/>  \u041a\u043b\u0430\u0441\u0441 \u043c\u043e\u0434\u0435\u043b\u0438 \u0441 \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0435\u0439 \u043e\u0441\u043d\u043e\u0432\u043d\u044b\u0445 \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0439 \u0441 \u0442\u0430\u0431\u043b\u0438\u0446\u0430\u043c\u0438 MySQL \u043d\u0430\u0441\u043b\u0435\u0434\u0443\u0435\u0442\u0441\u044f \u0434\u043b\u044f \u043a\u0430\u0436\u0434\u043e\u0439 \u0442\u0430\u0431\u043b\u0438\u0446\u044b MySQL:<\/p>\n<pre><code class=\"php\">class Model_DbTable_Chat extends Zend_Db_Table_Abstract {     protected $_name = 'chat'; } <\/code><\/pre>\n<pre><code class=\"php\">class Model_Chat extends Ext_Model {     protected $_dbTableClass = 'Model_DbTable_Chat';      protected $_fields = array( \t'id',         'message',         'description',         'user_id_from',         'user_id_to', \t'date',     );      protected $_primaryKey = array('id');          protected function _beforeInsert($data)     {         $data['date'] = date(&quot;Y-m-d H:i:s&quot;, time());         return $data;     }          public function fetchAllMsg($iser_id1, $iser_id2)     {         $select = $this-&gt;getDBTable()-&gt;select();         $this-&gt;_beforeFetch($select);                  $sql = &quot;SELECT * FROM chatbotchat WHERE (user_id_from = :userid1 AND user_id_to = :userid2) OR (user_id_from = :userid2 AND user_id_to = :userid1) Order by date ASC&quot;;         $rows = $this-&gt;getDBTable()-&gt;getAdapter()-&gt;fetchAll($sql, array(&quot;userid1&quot; =&gt; $iser_id1, &quot;userid2&quot; =&gt; $iser_id2));         if (!$rows) {             return array();         }         return $rows;     }          public function fetchReadAllMsg($iser_id1, $iser_id2)     {         $select = $this-&gt;getDBTable()-&gt;select();         $this-&gt;_beforeFetch($select);          $sql = &quot;UPDATE chatbotchat SET is_read = 1 WHERE (user_id_from = :userid2 AND user_id_to = :userid1)&quot;;         $this-&gt;getDBTable()-&gt;getAdapter()-&gt;query($sql, array(&quot;userid1&quot; =&gt; $iser_id1, &quot;userid2&quot; =&gt; $iser_id2));     }          public function fetchProfilesMsg($user_id)     {         $select = $this-&gt;getDBTable()-&gt;select();         $this-&gt;_beforeFetch($select);         $sql = &quot;SELECT * FROM chatbotchat WHERE (user_id_from = :userid OR user_id_to = :userid) Order by date DESC&quot;;         $rows = $this-&gt;getDBTable()-&gt;getAdapter()-&gt;fetchAll($sql, array(&quot;userid&quot; =&gt; $user_id));         if (!$rows) {             return array();         }         return $rows;     } } <\/code><\/pre>\n<p>  \u0414\u043b\u044f \u0432\u0432\u043e\u0434\u0430 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u043e\u0432 \u0438 \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044f \u0444\u043e\u0440\u043c \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043b\u0441\u044f CSS \u043a\u0430\u0440\u043a\u0430\u0441\u0430 Bootstrap.<br \/>  \u0414\u043b\u044f \u0434\u0438\u043d\u0430\u043c\u0438\u0447\u0435\u0441\u043a\u043e\u0433\u043e \u043e\u0442\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u044f \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043b\u0441\u044f JavaScript \u0438 JQuery.<\/p>\n<p>  \u0412 \u0431\u0430\u0437\u0435 \u0434\u0430\u043d\u043d\u044b\u0445 MySQL \u0431\u044b\u043b\u0438 \u0441\u043e\u0437\u0434\u0430\u043d\u044b \u0441\u0443\u0449\u043d\u043e\u0441\u0442\u0438: <br \/>  user <br \/>   \u2014 \u0442\u0430\u0431\u043b\u0438\u0446\u0430 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u0435\u0439 \u0438 \u0438\u0445 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u043e\u0432;<\/p>\n<p>  \u041a \u043f\u0440\u0438\u043c\u0435\u0440\u0443 \u0442\u0430\u0431\u043b\u0438\u0446\u0430 user:<\/p>\n<pre><code class=\"sql\">-- ----------------------------------------------------- -- Table `svlab`.`user` -- ----------------------------------------------------- CREATE  TABLE IF NOT EXISTS `svlab`.`user` (   `id` INT   AUTO_INCREMENT ,   `first_name` VARCHAR(45) DEFAULT NULL,   `last_name` VARCHAR(200) DEFAULT NULL,   `nickname` VARCHAR(200) DEFAULT NULL,   `gender` VARCHAR(200) DEFAULT NULL,   `birth_date` DATETIME DEFAULT NULL,   `avatar_url` VARCHAR(200) DEFAULT NULL,   `min_avatar_url` VARCHAR(200) DEFAULT NULL,   `email` VARCHAR(45) NOT NULL,   `password` VARCHAR(45) DEFAULT &quot;12345&quot;,   `password_recover` VARCHAR(15) DEFAULT NULL,   `country` VARCHAR(200) DEFAULT NULL,   `region` VARCHAR(200) DEFAULT NULL,   `city` VARCHAR(200) DEFAULT NULL,   `postal_code` VARCHAR(200) DEFAULT NULL,   `street` VARCHAR(200) DEFAULT NULL,   `house_number` VARCHAR(200) DEFAULT NULL,   `add_address_info` VARCHAR(200) DEFAULT NULL,   `site` VARCHAR(200) DEFAULT NULL,   `about_me_info` TEXT DEFAULT NULL,   `registration_date` DATETIME NOT NULL,   `comment_rating` FLOAT DEFAULT 0,   `comment_rating_pos` FLOAT DEFAULT 0,   `comment_rating_neg` FLOAT DEFAULT 0,   `white_ips` TEXT,    `is_active` TINYINT(1) DEFAULT false,   PRIMARY KEY (`id`) ,   UNIQUE INDEX `user_id_unique` (`id` ASC) ,   UNIQUE INDEX `user_email_unique` (`email` ASC)) ENGINE = InnoDB; <\/code><\/pre>\n<p>  profile<br \/>   \u2014 \u0442\u0430\u0431\u043b\u0438\u0446\u0430 \u0430\u043d\u043a\u0435\u0442 \u0438 \u0438\u0445 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u043e\u0432;<\/p>\n<p>  chat<br \/>   \u2014 \u0442\u0430\u0431\u043b\u0438\u0446\u0430 \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u0439;<\/p>\n<pre><code class=\"sql\">-- ----------------------------------------------------- -- Table `svlab`.`chat` -- ----------------------------------------------------- CREATE  TABLE IF NOT EXISTS `svlab`.`chat` (   `id` INT NOT NULL AUTO_INCREMENT,   `message` TEXT,   `user_id_from` INT NOT NULL,   `user_id_to` INT NOT NULL,   `date` DATETIME,   `is_read` TINYINT(1) DEFAULT false,   PRIMARY KEY (`id`),   UNIQUE INDEX `chatbotchat_id_unique` (`id` ASC)) ENGINE=MyISAM DEFAULT CHARSET=utf8; <\/code><\/pre>\n<p>  file<br \/>   \u2014 \u0442\u0430\u0431\u043b\u0438\u0446\u0430 \u0444\u0430\u0439\u043b\u043e\u0432;<\/p>\n<p>  foto<br \/>   \u2014 \u0442\u0430\u0431\u043b\u0438\u0446\u0430 \u0444\u043e\u0442\u043e;<\/p>\n<p>  like<br \/>   \u2014 \u0442\u0430\u0431\u043b\u0438\u0446\u0430 \u043f\u043b\u044e\u0441\u043e\u0432;<\/p>\n<p>  token<br \/>   \u2014 \u0442\u0430\u0431\u043b\u0438\u0446\u0430 \u043a\u043b\u044e\u0447\u0435\u0439 \u0430\u0432\u0442\u043e\u0440\u0438\u0437\u0430\u0446\u0438\u0438;<\/p>\n<p>  moder<br \/>   \u2014 \u0442\u0430\u0431\u043b\u0438\u0446\u0430 \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0438 \u0430\u043d\u043a\u0435\u0442 \u043c\u043e\u0434\u0435\u0440\u0430\u0442\u043e\u0440\u043e\u043c;<\/p>\n<p>  userorder<br \/>   \u2014 \u0442\u0430\u0431\u043b\u0438\u0446\u0430 \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0439 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f;<\/p>\n<p>  \u0422\u0430\u043a\u0438\u0435 \u0442\u0430\u0431\u043b\u0438\u0446\u044b \u0431\u0430\u0437\u044b \u0434\u0430\u043d\u043d\u044b\u0445, \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u044f \u0441\u0435\u0440\u0432\u0435\u0440\u043d\u043e\u0433\u043e \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f \u0438 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435 \u043a\u043b\u0438\u0435\u043d\u0442\u0430 \u0431\u0440\u0430\u0443\u0437\u0435\u0440\u0430 \u043b\u0435\u0433\u043a\u043e \u043d\u0430\u043f\u0438\u0441\u0430\u0442\u044c \u0431\u043e\u043b\u0435\u0435 \u043c\u0435\u043d\u0435\u0435 \u043e\u043f\u044b\u0442\u043d\u043e\u043c\u0443 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0438\u0441\u0442\u0443 \u043e\u0441\u0432\u043e\u0438\u0432\u0448\u0435\u043c\u0443 \u043a\u043d\u0438\u0433\u0438 \u043f\u043e <br \/>  CSS, HTML, JS, PHP, SQL.<\/p>\n<p>  \u041b\u0438\u0447\u043d\u044b\u0439 \u043f\u043b\u0435\u0435\u0440 \u0430\u0443\u0434\u0438\u043e \u0437\u0430\u0433\u0440\u0443\u0437\u043e\u043a \u0438 \u0447\u0430\u0442\u044b \u0431\u044b\u043b\u0438 \u0440\u0435\u0430\u043b\u0438\u0437\u043e\u0432\u0430\u043d\u044b \u043a\u0430\u043a \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u044b\u0435 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f \u043e\u0442\u043e\u0431\u0440\u0430\u0436\u0430\u0435\u043c\u044b\u0435 \u0432\u043e frame \u0442\u0435\u0433\u0435 \u043a\u043e\u0434\u0430 HTML \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f \u043a\u043b\u0438\u0435\u043d\u0442\u0430 \u0431\u0440\u0430\u0443\u0437\u0435\u0440\u0430.<\/p>\n<p>  \u0422\u0430\u043a\u0436\u0435 \u0441\u043e\u0446\u0438\u0430\u043b\u044c\u043d\u0430\u044f \u0441\u0435\u0442\u044c \u0438\u043c\u0435\u0435\u0442 \u0434\u043e\u0441\u0442\u0443\u043f \u043a \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u044b\u043c \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f\u043c \u0438 \u0438\u0433\u0440\u0430\u043c \u043c\u043e\u0435\u0433\u043e \u0430\u0432\u0442\u043e\u0440\u0441\u0442\u0432\u0430 \u0432\u043e \u0432\u043a\u043b\u0430\u0434\u043a\u0435 \u0438\u0433\u0440\u044b. \u041f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435 \u0441\u043e\u0446\u0438\u0430\u043b\u044c\u043d\u043e\u0439 \u0441\u0435\u0442\u0438 \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u043b\u0435\u0433\u043a\u043e \u0434\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u0441\u0432\u043e\u0438 \u0438\u0433\u0440\u044b \u0437\u0430\u043f\u043e\u043b\u043d\u0438\u0432 \u0444\u043e\u0440\u043c\u0443 \u043e\u043f\u0438\u0441\u0430\u043d\u0438\u044f \u0438\u0433\u0440\u044b. \u041e\u0441\u043d\u043e\u0432\u043d\u044b\u043c \u043f\u043e\u043b\u0435\u043c \u044d\u0442\u043e\u0439 \u0444\u043e\u0440\u043c\u044b \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f URL WEB \u0430\u0434\u0440\u0435\u0441 \u043f\u0443\u0431\u043b\u0438\u043a\u0443\u0435\u043c\u043e\u0433\u043e \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f \u0438\u043b\u0438 \u0438\u0433\u0440\u044b. \u0412 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u0435 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435 \u0438\u043b\u0438 \u0438\u0433\u0440\u0430 \u0431\u0443\u0434\u0443\u0442 \u043f\u043e\u043a\u0430\u0437\u0430\u043d\u044b \u0432\u043e frame \u0442\u0435\u0433\u0435 HTML \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u044b \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f \u0441\u043e\u0446\u0438\u0430\u043b\u044c\u043d\u043e\u0439 \u0441\u0435\u0442\u0438.<\/p>\n<p>  \u041f\u043e\u0441\u043c\u043e\u0442\u0440\u0435\u0442\u044c \u0433\u043e\u0442\u043e\u0432\u043e\u0435 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435 \u0441\u043e\u0446\u0438\u0430\u043b\u044c\u043d\u043e\u0439 \u0441\u0435\u0442\u0438 \u043c\u043e\u0436\u043d\u043e \u043f\u043e \u0441\u0441\u044b\u043b\u043a\u0435:<br \/>  <a href=\"http:\/\/svlaboratory.org:8080\/socialnetwork\/index2.html\" rel=\"nofollow\">\u0421\u043e\u0446\u0438\u0430\u043b\u044c\u043d\u0430\u044f \u0441\u0435\u0442\u044c \u041b\u044e\u0431\u043e\u0432\u044c SVLAB<\/a><br \/>  \u041e\u043f\u0438\u0441\u0430\u043d\u0438\u0435 \u0421\u043e\u0446\u0438\u0430\u043b\u044c\u043d\u043e\u0439 \u0441\u0435\u0442\u0438 \u0438 <b>\u043c\u043e\u0431\u0438\u043b\u044c\u043d\u043e\u0435 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435<\/b> \u0442\u0443\u0442:<br \/>  <a href=\"http:\/\/svlaboratory.org\/blog\/blog-single\/articleid\/59\" rel=\"nofollow\">http:\/\/svlaboratory.org\/blog\/blog-single\/articleid\/59<\/a><br \/>  \u0438\u043b\u0438 \u043d\u0430 4PDA: <a href=\"https:\/\/4pda.ru\/forum\/index.php?showtopic=974282\" rel=\"nofollow\">\u0421\u043e\u0446\u0438\u0430\u043b\u044c\u043d\u0430\u044f \u0441\u0435\u0442\u044c \u041b\u044e\u0431\u043e\u0432\u044c SVLAB<\/a><\/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:\/\/habr.com\/ru\/post\/479558\/\"> https:\/\/habr.com\/ru\/post\/479558\/<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"\n<div class=\"post__text post__text-html post__text_v1\" id=\"post-content-body\" data-io-article-url=\"https:\/\/habr.com\/ru\/post\/479558\/\"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/sf\/nn\/rw\/sfnnrwjs2dd8ltcazmhtainxkvw.png\"><br \/>  \u0412 \u043c\u043e\u0435\u0439 \u0441\u043e\u0446\u0438\u0430\u043b\u044c\u043d\u043e\u0439 \u0441\u0435\u0442\u0438 \u0440\u0435\u0430\u043b\u0438\u0437\u043e\u0432\u0430\u043d\u044b \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0435 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u0438:<br \/>   \u2014 \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u0435 \u0441\u0432\u043e\u0438\u0445 HTML \u0430\u043d\u043a\u0435\u0442;<br \/>   \u2014 \u043e\u0431\u043c\u0435\u043d \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u044f\u043c\u0438, \u0444\u043e\u0442\u043e, \u0430\u0443\u0434\u0438\u043e \u0438 \u0432\u0438\u0434\u0435\u043e;<br \/>   \u2014 \u0432\u0441\u0442\u0440\u043e\u0435\u043d\u043d\u044b\u0439 \u043f\u043b\u0435\u0435\u0440 \u043e\u0431\u043b\u0430\u0447\u043d\u043e\u0433\u043e \u0430\u0443\u0434\u0438\u043e;<br \/>   \u2014 \u0447\u0430\u0442 \u043a\u043e\u043c\u043d\u0430\u0442\u044b \u0434\u043b\u044f \u043e\u0431\u0449\u0435\u043d\u0438\u044f;<br \/>   \u2014 \u0438\u0433\u0440\u0430 \u0432 \u0441\u0438\u043c\u043f\u0430\u0442\u0438\u0438.  <\/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-307500","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/307500","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=307500"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/307500\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=307500"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=307500"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=307500"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}