{"id":338398,"date":"2022-09-15T09:00:42","date_gmt":"2022-09-15T09:00:42","guid":{"rendered":"http:\/\/savepearlharbor.com\/?p=338398"},"modified":"-0001-11-30T00:00:00","modified_gmt":"-0001-11-29T21:00:00","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=338398","title":{"rendered":"<span>\u041a\u0430\u043a \u043c\u044b \u0440\u0435\u0448\u0430\u0435\u043c \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u044b \u0441\u043e \u0441\u043a\u043b\u043e\u043d\u0435\u043d\u0438\u0435\u043c \u0441\u043b\u043e\u0432 \u0434\u043b\u044f \u0437\u0430\u0434\u0430\u0447 seo-\u043e\u043f\u0442\u0438\u043c\u0438\u0437\u0430\u0446\u0438\u0438 \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e phpMorphy<\/span>"},"content":{"rendered":"<div><\/div>\n<div id=\"post-content-body\">\n<div>\n<div class=\"article-formatted-body article-formatted-body article-formatted-body_version-2\">\n<div xmlns=\"http:\/\/www.w3.org\/1999\/xhtml\">\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w780q1\/getpro\/habr\/upload_files\/80c\/d58\/bdb\/80cd58bdb6c6e0664c82fda2f806e7c5.jpeg\" width=\"1163\" height=\"802\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/80c\/d58\/bdb\/80cd58bdb6c6e0664c82fda2f806e7c5.jpeg\" data-blurred=\"true\"\/><figcaption><\/figcaption><\/figure>\n<p>\u041f\u0440\u0438\u0432\u0435\u0442, \u0434\u0440\u0443\u0437\u044c\u044f!<\/p>\n<p>\u041c\u044b \u0440\u0430\u0437\u0440\u0430\u0431\u0430\u0442\u044b\u0432\u0430\u0435\u043c \u043f\u043b\u0430\u0442\u0444\u043e\u0440\u043c\u0443 <a href=\"https:\/\/svoevagro.ru\/\"><strong>\u042f \u0432 \u0430\u0433\u0440\u043e<\/strong><\/a>. \u041f\u043b\u0430\u0442\u0444\u043e\u0440\u043c\u0430, \u043f\u043e\u043c\u0438\u043c\u043e \u043f\u0440\u043e\u0447\u0435\u0433\u043e, \u043f\u043e\u043c\u043e\u0433\u0430\u0435\u0442 \u043d\u0430\u0439\u0442\u0438 \u0432\u0430\u043a\u0430\u043d\u0441\u0438\u0438 \u0432 \u0441\u0444\u0435\u0440\u0435 \u0430\u0433\u0440\u043e.<\/p>\n<p>\u0415\u0441\u0442\u044c \u0443 \u043d\u0430\u0441 \u0437\u0430\u0434\u0430\u0447\u043a\u0430 &#8212; \u0433\u0435\u043d\u0435\u0440\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0443\u043d\u0438\u043a\u0430\u043b\u044c\u043d\u044b\u0435 \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u044b \u0441\u0430\u0439\u0442\u0430, \u0434\u0430 \u0442\u0430\u043a, \u0447\u0442\u043e\u0431\u044b \u0438 seo-\u0437\u0430\u0433\u043e\u043b\u043e\u0432\u043a\u0438 \u0434\u043b\u044f \u0438\u043d\u0434\u0435\u043a\u0441\u0430\u0446\u0438\u0438 \u043f\u043e\u0438\u0441\u043a\u043e\u0432\u0438\u043a\u0430\u043c\u0438 \u0442\u043e\u0436\u0435 \u0433\u0435\u043d\u0435\u0440\u0438\u0440\u043e\u0432\u0430\u043b\u0438\u0441\u044c \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438 \u043f\u043e\u0434 \u0440\u0430\u0437\u043d\u044b\u0435 \u0441\u0443\u0449\u043d\u043e\u0441\u0442\u0438 \u043f\u0440\u043e\u0435\u043a\u0442\u0430.<\/p>\n<p>\u0414\u043e\u043f\u0443\u0441\u0442\u0438\u043c, \u043d\u0430\u043c \u043d\u0443\u0436\u043d\u043e \u0433\u0435\u043d\u0435\u0440\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u044b \u0432\u0430\u043a\u0430\u043d\u0441\u0438\u0439, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0431\u044b\u043b\u0438 \u0431\u044b \u043f\u0440\u0438\u0432\u044f\u0437\u0430\u043d\u044b \u043a \u0433\u043e\u0440\u043e\u0434\u0443 \u0438\u043b\u0438 \u0440\u0435\u0433\u0438\u043e\u043d\u0443 \u0441\u0442\u0440\u0430\u043d\u044b. \u042d\u0442\u043e\u0442 \u0436\u0435 \u043f\u0440\u0438\u043c\u0435\u0440 \u043f\u043e\u0434\u0445\u043e\u0434\u0438\u0442 \u0438 \u0434\u043b\u044f \u0433\u0435\u043d\u0435\u0440\u0430\u0446\u0438\u0438 \u0441\u0442\u0440\u0430\u043d\u0438\u0446 \u0441\u0430\u0439\u0442\u0430 \u043a\u0430\u043a\u043e\u0433\u043e-\u043d\u0438\u0431\u0443\u0434\u044c \u0438\u043d\u0442\u0435\u0440\u043d\u0435\u0442 \u043c\u0430\u0433\u0430\u0437\u0438\u043d\u0430 \u0438\u043b\u0438 \u043c\u0430\u0440\u043a\u0435\u0442\u043f\u043b\u0435\u0439\u0441\u0430 \u043f\u0440\u043e\u0434\u0430\u044e\u0449\u0438\u0445 \u0442\u043e\u0432\u0430\u0440\u044b \u0438\u043b\u0438 \u0443\u0441\u043b\u0443\u0433\u0438.<\/p>\n<p>\u0412 \u043d\u0430\u0448\u0435\u043c \u0441\u043b\u0443\u0447\u0430\u0435, \u0443 \u043d\u0430\u0441 \u0435\u0441\u0442\u044c \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0435 <strong>\u0441\u0443\u0449\u043d\u043e\u0441\u0442\u0438<\/strong>:<\/p>\n<ol>\n<li>\n<p>\u041d\u0430\u0437\u0432\u0430\u043d\u0438\u0435 \u0432\u0430\u043a\u0430\u043d\u0441\u0438\u0438 \u0438\u043b\u0438 \u0442\u043e\u0432\u0430\u0440\u043d\u043e\u0439 \u043f\u043e\u0437\u0438\u0446\u0438\u0438;<\/p>\n<\/li>\n<li>\n<p>\u0420\u0435\u0433\u0438\u043e\u043d \u0441\u0442\u0440\u0430\u043d\u044b;<\/p>\n<\/li>\n<li>\n<p>\u0413\u043e\u0440\u043e\u0434.<\/p>\n<\/li>\n<\/ol>\n<p>\u041d\u0430 \u0432\u044b\u0445\u043e\u0434\u0435 \u043c\u044b \u0445\u043e\u0442\u0438\u043c \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u044c \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u043d\u043e \u0441\u0433\u0435\u043d\u0435\u0440\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0439 HTML \u043a\u043e\u043d\u0442\u0435\u043d\u0442, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0431\u044b \u0438\u043c\u0435\u043b \u0442\u0435\u043a\u0441\u0442 \u043e\u043f\u0438\u0441\u0430\u043d\u0438\u044f \u0432\u0430\u043a\u0430\u043d\u0441\u0438\u0438, \u043c\u0435\u0442\u0430\u0442\u0435\u0433\u0438 \u0438 seo-\u0437\u0430\u0433\u043e\u043b\u043e\u0432\u043a\u0438 \u0432 \u043a\u043e\u0434\u0435.<\/p>\n<p>\u0427\u0442\u043e \u043d\u0430\u043c \u043d\u0443\u0436\u043d\u043e \u043f\u043e <strong>SEO<\/strong>:<\/p>\n<ol>\n<li>\n<p><strong>title<\/strong> &#8212; \u0437\u0430\u0433\u043e\u043b\u043e\u0432\u043e\u043a;<\/p>\n<\/li>\n<li>\n<p><strong>h1<\/strong> &#8212; \u0437\u0430\u0433\u043e\u043b\u043e\u0432\u043e\u043a \u043f\u0435\u0440\u0432\u043e\u0433\u043e \u0443\u0440\u043e\u0432\u043d\u044f;<\/p>\n<\/li>\n<li>\n<p><strong>description<\/strong> &#8212; \u043e\u043f\u0438\u0441\u0430\u043d\u0438\u0435;<\/p>\n<\/li>\n<li>\n<p><strong>keywords<\/strong> &#8212; \u043a\u043b\u044e\u0447\u0435\u0432\u044b\u0435 \u0441\u043b\u043e\u0432\u0430.<\/p>\n<\/li>\n<\/ol>\n<p>\u0418\u0442\u0430\u043a, \u043f\u0440\u0438\u043c\u0435\u0440. \u0414\u043e\u043f\u0443\u0441\u0442\u0438\u043c, \u0443 \u043d\u0430\u0441 \u0435\u0441\u0442\u044c \u0432\u0430\u043a\u0430\u043d\u0441\u0438\u044f &#171;\u0413\u0435\u043d\u0435\u0442\u0438\u043a&#187;, \u043c\u044b \u0433\u0435\u043d\u0435\u0440\u0438\u0440\u0443\u0435\u043c \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u0443 \u0434\u043b\u044f \u0440\u0435\u0433\u0438\u043e\u043d\u0430 &#171;\u0411\u0440\u044f\u043d\u0441\u043a\u0430\u044f \u043e\u0431\u043b\u0430\u0441\u0442\u044c&#187;, \u0442\u043e \u0435\u0441\u0442\u044c \u043d\u0430 \u0432\u044b\u0445\u043e\u0434\u0435 \u043c\u044b \u0445\u043e\u0442\u0438\u043c \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u044c \u043d\u0430\u0431\u043e\u0440 \u0440\u0430\u0437\u043b\u0438\u0447\u043d\u044b\u0445 \u0432\u0430\u0440\u0438\u0430\u043d\u0442\u043e\u0432 \u043a\u043e\u043d\u0442\u0435\u043d\u0442\u0430, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043c\u044b \u043f\u0440\u0438\u043c\u0435\u043d\u0438\u043b\u0438 \u0431\u044b \u0432 \u0442\u0435\u043b\u0435 \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u044b \u0441\u0430\u0439\u0442\u0430, \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e, \u0438 \u0432 \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u044f\u0445 \u0438\u043b\u0438 \u043f\u0438\u0441\u044c\u043c\u0430\u0445 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f\u043c\/\u043f\u043e\u0434\u043f\u0438\u0441\u0447\u0438\u043a\u0430\u043c:<\/p>\n<p><em>\u0412\u0430\u043a\u0430\u043d\u0441\u0438\u044f \u0433\u0435\u043d\u0435\u0442\u0438\u043a\u0430 \u0432 \u0411\u0440\u044f\u043d\u0441\u043a\u043e\u0439 \u043e\u0431\u043b\u0430\u0441\u0442\u0438<br \/>\u041c\u044b \u043d\u0430\u0448\u043b\u0438 5 \u0432\u0430\u043a\u0430\u043d\u0441\u0438\u0439 \u0433\u0435\u043d\u0435\u0442\u0438\u043a\u0430 \u0432 \u0411\u0440\u044f\u043d\u0441\u043a\u043e\u0439 \u043e\u0431\u043b\u0430\u0441\u0442\u0438<br \/>\u0420\u0430\u0431\u043e\u0442\u0430 \u0433\u0435\u043d\u0435\u0442\u0438\u043a\u043e\u043c, 32 \u0432\u0430\u043a\u0430\u043d\u0441\u0438\u0438<br \/>\u041f\u043e\u043c\u043e\u0436\u0435\u043c \u0433\u0435\u043d\u0435\u0442\u0438\u043a\u0443 \u043d\u0430\u0439\u0442\u0438 \u0440\u0430\u0431\u043e\u0442\u0443 \u0432 \u0411\u0440\u044f\u043d\u0441\u043a\u043e\u0439 \u043e\u0431\u043b\u0430\u0441\u0442\u0438<br \/>35 \u0432\u0430\u043a\u0430\u043d\u0441\u0438\u0439 \u0433\u0435\u043d\u0435\u0442\u0438\u043a\u0430 \u0432 \u0411\u0440\u044f\u043d\u0441\u043a\u0435<br \/>\u041f\u0440\u0435\u0434\u043b\u043e\u0436\u0435\u043d\u0438\u044f \u0440\u0430\u0431\u043e\u0442\u044b \u0433\u0435\u043d\u0435\u0442\u0438\u043a\u043e\u043c \u0432 \u0421\u0435\u0432\u0441\u043a\u0435 \u0411\u0440\u044f\u043d\u0441\u043a\u043e\u0439 \u043e\u0431\u043b\u0430\u0441\u0442\u0438, 21 \u0443\u043d\u0438\u043a\u0430\u043b\u044c\u043d\u0430\u044f \u0432\u0430\u043a\u0430\u043d\u0441\u0438\u044f<\/em><\/p>\n<p>\u0414\u043b\u044f SEO \u043c\u044b \u0431\u044b \u0441\u0433\u0435\u043d\u0435\u0440\u0438\u0440\u043e\u0432\u0430\u043b\u0438:<\/p>\n<ol>\n<li>\n<p><strong>title<\/strong>: <em>\u0420\u0430\u0431\u043e\u0442\u0430 \u0433\u0435\u043d\u0435\u0442\u0438\u043a\u043e\u043c \u0432 \u0411\u0440\u044f\u043d\u0441\u043a\u043e\u0439 \u043e\u0431\u043b\u0430\u0441\u0442\u0438, 175 \u0443\u043d\u0438\u043a\u0430\u043b\u044c\u043d\u044b\u0445 \u0432\u0430\u043a\u0430\u043d\u0441\u0438\u0439;<\/em><\/p>\n<\/li>\n<li>\n<p><strong>h1<\/strong>: <em>\u0420\u0430\u0431\u043e\u0442\u0430 \u0433\u0435\u043d\u0435\u0442\u0438\u043a\u043e\u043c \u0432 \u0411\u0440\u044f\u043d\u0441\u043a\u043e\u0439 \u043e\u0431\u043b\u0430\u0441\u0442\u0438, 175 \u0432\u0430\u043a\u0430\u043d\u0441\u0438\u0439;<\/em><\/p>\n<\/li>\n<li>\n<p><strong>description<\/strong>: <em>\u0420\u0430\u0431\u043e\u0442\u0430 \u0432 \u0410\u041f\u041a. \u0421\u0432\u0435\u0436\u0438\u0435 \u0432\u0430\u043a\u0430\u043d\u0441\u0438\u0438 \u0433\u0435\u043d\u0435\u0442\u0438\u043a\u0430 \u0432 \u0411\u0440\u044f\u043d\u0441\u043a\u043e\u0439 \u043e\u0431\u043b\u0430\u0441\u0442\u0438 \u043e\u0442 \u043f\u0440\u044f\u043c\u044b\u0445 \u0440\u0430\u0431\u043e\u0442\u043e\u0434\u0430\u0442\u0435\u043b\u0435\u0439. \u041c\u044b \u0441\u043e\u0431\u0440\u0430\u043b\u0438 175 \u0443\u043d\u0438\u043a\u0430\u043b\u044c\u043d\u044b\u0445 \u0432\u0430\u043a\u0430\u043d\u0441\u0438\u0439;<\/em><\/p>\n<\/li>\n<li>\n<p><strong>keywords<\/strong>: <em>\u0440\u0430\u0431\u043e\u0442\u0430 \u0433\u0435\u043d\u0435\u0442\u0438\u043a\u043e\u043c, \u0432\u0430\u043a\u0430\u043d\u0441\u0438\u0438 \u0433\u0435\u043d\u0435\u0442\u0438\u043a\u0430, \u0432\u0430\u043a\u0430\u043d\u0441\u0438\u0438 \u0430\u0441\u0441\u0438\u0441\u0442\u0435\u043d\u0442\u0430 \u0433\u0435\u043d\u0435\u0442\u0438\u043a\u0430, \u0440\u0430\u0431\u043e\u0442\u0430 \u0430\u0441\u0441\u0438\u0441\u0442\u0435\u043d\u0442\u043e\u043c \u0433\u0435\u043d\u0435\u0442\u0438\u043a\u0430, \u0432\u0430\u043a\u0430\u043d\u0441\u0438\u0438 \u0433\u0435\u043d\u0435\u0442\u0438\u043a.<\/em><\/p>\n<\/li>\n<\/ol>\n<hr\/>\n<h2>\u041a\u0430\u043a \u044d\u0442\u043e \u0441\u0434\u0435\u043b\u0430\u043b\u0438 \u043c\u044b?<\/h2>\n<p>\u041d\u0430\u0448 \u043f\u0440\u043e\u0435\u043a\u0442 \u043d\u0430\u043f\u0438\u0441\u0430\u043d \u043d\u0430 Laravel (PHP), \u0442\u0430\u043a \u0447\u0442\u043e \u0432\u0441\u0435 \u043f\u0440\u0438\u043c\u0435\u0440\u044b \u0431\u0443\u0434\u0443\u0442 \u043e\u043f\u0438\u0441\u0430\u043d\u044b \u0434\u043b\u044f Laravel.<\/p>\n<p>\u041d\u0430 \u0425\u0430\u0431\u0440\u0435 \u0443\u0436\u0435 \u0443\u043f\u043e\u043c\u0438\u043d\u0430\u043b\u0441\u044f \u043e\u0447\u0435\u043d\u044c \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u043d\u044b\u0439 \u0438 \u043f\u043e\u043b\u0435\u0437\u043d\u044b\u0439 \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442 \u0434\u043b\u044f \u043c\u043e\u0440\u0444\u043e\u043b\u043e\u0433\u0438\u0447\u0435\u0441\u043a\u043e\u0433\u043e \u0440\u0430\u0437\u0431\u043e\u0440\u0430 <a href=\"http:\/\/phpmorphy.sourceforge.net\/dokuwiki\/download\"><strong>phpMorphy<\/strong><\/a>, \u043d\u043e \u0441 \u0412\u0430\u0448\u0435\u0433\u043e \u0440\u0430\u0437\u0440\u0435\u0448\u0435\u043d\u0438\u044f \u043c\u044b \u043e\u043f\u0438\u0448\u0435\u043c \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u0443\u044e \u0432\u044b\u0436\u0438\u043c\u043a\u0443 \u043f\u043e \u0431\u044b\u0441\u0442\u0440\u043e\u043c\u0443 \u0441\u0442\u0430\u0440\u0442\u0443. <\/p>\n<p>\u0421\u043a\u0430\u0447\u0430\u0442\u044c \u0438 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u044c phpMorphy \u043c\u043e\u0436\u043d\u043e, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u0438\u0437 \u044d\u0442\u0438\u0445 2\u0445 \u0438\u0441\u0442\u043e\u0447\u043d\u0438\u043a\u043e\u0432:<\/p>\n<ul>\n<li>\n<p>\u0421 \u0432\u044b\u0431\u043e\u0440\u043e\u043c \u0441\u043b\u043e\u0432\u0430\u0440\u0435\u0439: <a href=\"http:\/\/phpmorphy.sourceforge.net\/dokuwiki\/download\">http:\/\/phpmorphy.sourceforge.net\/dokuwiki\/download<\/a><\/p>\n<\/li>\n<li>\n<p>\u0421 \u043f\u0440\u0435\u0434\u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043b\u0435\u043d\u043d\u044b\u043c\u0438 \u0441\u043b\u043e\u0432\u0430\u0440\u044f\u043c\u0438 (ru, en, de, ua): <a href=\"https:\/\/github.com\/cijic\/phpmorphy\">https:\/\/github.com\/cijic\/phpmorphy<\/a><\/p>\n<\/li>\n<\/ul>\n<p>\u0414\u043b\u044f \u0443\u043f\u0440\u043e\u0449\u0435\u043d\u0438\u044f \u0440\u0430\u0431\u043e\u0442\u044b \u0441 phpMorphy \u043c\u044b \u0441\u043e\u0437\u0434\u0430\u043b\u0438 \u0441\u0432\u043e\u0439 Helper.<\/p>\n<details class=\"spoiler\">\n<summary>\u041a\u043e\u0434 \u043d\u0430\u0448\u0435\u0433\u043e Helper&#8217;\u0430 (\u043a\u0430\u043a \u0435\u0441\u0442\u044c)<\/summary>\n<div class=\"spoiler__content\">\n<pre><code class=\"php\">&lt;?php namespace {\u0441\u043a\u0440\u044b\u0442\u043e}\\PhpMorphy\\Helpers;  use phpMorphy; use phpMorphy_Exception; use Log;  require_once(base_path('{\u0441\u043a\u0440\u044b\u0442\u043e}\/phpmorphy\/common.php'));  class Morphy {     const MORPHY_PATH = '{\u0441\u043a\u0440\u044b\u0442\u043e}\/phpmorphy';      const MORPHY_SKEEP_WORD_END_WITH = ['\u043a\u0430\u0431\u0430\u0440\u0434\u0438\u043d\u043e', '\u043a\u0430\u0440\u0430\u0447\u0430\u0435\u0432\u043e', '\u0445\u0430\u043d\u0442\u044b', '\u044f\u043c\u0430\u043b\u043e']; \/\/\u041f\u0440\u043e\u043f\u0443\u0441\u043a\u0430\u0442\u044c \u0441\u043b\u043e\u0432\u0430, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0437\u0430\u043a\u0430\u043d\u0447\u0438\u0432\u0430\u044e\u0442\u0441\u044f \u043d\u0430 \u043e\u0434\u0438\u043d \u0438\u0437 \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u043e\u0432 \u043c\u0430\u0441\u0441\u0438\u0432\u0430     const MORPHY_SKEEP_WORD_DELIMS = ['-']; \/\/\u0420\u0430\u0437\u0434\u0435\u043b\u0438\u0442\u0435\u043b\u0438 \u043f\u0440\u0438 \u043d\u0430\u0445\u043e\u0436\u0434\u0435\u043d\u0438\u0438 \u043a\u043e\u0442\u043e\u0440\u044b\u0445 \u043f\u0440\u0435\u043e\u0431\u0440\u0430\u0437\u0443\u0435\u043c \u0444\u0440\u0430\u0437\u0443 \u043f\u043e \u043a\u0430\u0436\u0434\u043e\u043c\u0443 \u0441\u043b\u043e\u0432\u0443 \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u043e      \/**      * \u0421\u043e\u0437\u0434\u0430\u043d\u0438\u0435 \u043a\u043b\u0430\u0441\u0441\u0430 Morphy \u0441 \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0430\u043c\u0438      *      * @return phpMorphy|void      *\/     public static function getMorphy(){         try {             $dir = base_path(self::MORPHY_PATH) . '\/dicts';             $lang = 'ru_RU';             $opts = array(                 \/\/ storage type, follow types supported                 \/\/ PHPMORPHY_STORAGE_FILE - use file operations(fread, fseek) for dictionary access, this is very slow...                 \/\/ PHPMORPHY_STORAGE_SHM - load dictionary in shared memory(using shmop php extension), this is preferred mode                 \/\/ PHPMORPHY_STORAGE_MEM - load dict to memory each time when phpMorphy intialized, this useful when shmop ext. not activated. Speed same as for PHPMORPHY_STORAGE_SHM type                 'storage' => PHPMORPHY_STORAGE_MEM,                 'predict_by_suffix' => true,                 'predict_by_db' => true,                 'graminfo_as_text' => true,             );             return new phpMorphy($dir, $lang, $opts);         } catch(phpMorphy_Exception $e) {             log::error('Morphy::getMorphy(): Error occured while creating phpMorphy instance: ' . $e->getMessage());         }     }      \/**      * \u041f\u043e\u043b\u0443\u0447\u0435\u043d\u0438\u0435 \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0433\u043e \u0434\u043b\u044f \u0447\u0438\u0441\u043b\u043e\u0432\u043e\u0433\u043e \u043e\u0431\u043e\u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f      * \u041f\u0440\u0438\u043c\u0435\u0440: 3 \u0432\u0430\u043a\u0430\u043d\u0441\u0438\u0438, 5 \u0432\u0430\u043a\u0430\u043d\u0441\u0438\u0439, 1 \u0437\u0430\u044f\u0432\u043b\u0435\u043d\u0438\u0435      *      * @param $count      * @param string $word      * @param null $morphy      * @return string      *\/     public static function getMorphedCount($count, string $word, $morphy = null): string     {         if (empty($morphy)) $morphy = self::getMorphy();         $word = mb_strtoupper($word);         $one = $morphy->castFormByGramInfo($word, null, ['\u0415\u0414', '\u0418\u041c'], true)[0] ?? '';         $twoFour = $morphy->castFormByGramInfo($word, null, ['\u0415\u0414', '\u0420\u0414'], true)[0] ?? '';         $fiveZero = $morphy->castFormByGramInfo($word, null, ['\u041c\u041d', '\u0420\u0414'], true)[0] ?? '';         switch (substr($count, -1)) {             case '1': $countStr = $one; break;             case '2':             case '3':             case '4': $countStr = $twoFour; break;             case '5':             case '6':             case '7':             case '8':             case '9':             case '0':             default: $countStr = $fiveZero;         }         return mb_strtolower($countStr);     }      \/**      * \u041f\u0440\u0435\u043e\u0431\u0440\u0430\u0437\u043e\u0432\u0430\u043d\u0438\u0435 \u0441\u043b\u043e\u0432\u0430 \u043a \u0443\u043a\u0430\u0437\u0430\u043d\u043d\u043e\u043c\u0443 \u043f\u0430\u0434\u0435\u0436\u0443 \u0438 \u0447\u0438\u0441\u043b\u0435\u043d\u043d\u043e\u0441\u0442\u0438      *      * @param $morphy      * @param string $word      * @param array $gramInfo      * @return string      *\/     public static function getMorphed($morphy, string $word, array $gramInfo): string     {         try {             $delims = collect(self::MORPHY_SKEEP_WORD_DELIMS);              $word = str_replace(' - ', '-', $word);              $delimsFounded = $delims->filter(function ($delim) use ($word){ return mb_strpos($word, $delim) !== false; });              if ($delimsFounded->count() > 0){                 \/\/\u041f\u0440\u0435\u043e\u0431\u0440\u0430\u0437\u043e\u0432\u0430\u043d\u0438\u0435 \u0444\u0440\u0430\u0437\u044b, \u0434\u0435\u043b\u0430\u0435\u043c \u043a\u0430\u0436\u0434\u043e\u0435 \u0441\u043b\u043e\u0432\u043e \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u043e                 $resultWord = '';                 $delimsFounded->each(function ($delim) use ($word, &amp;$result, $morphy, $gramInfo, &amp;$resultWord){                     $result = [];                     collect(explode($delim, $word))->each(function ($word) use (&amp;$result, $morphy, $gramInfo){                         $result[] = self::isWordEndWithSkipArr($word) ? $word : ($morphy->castFormByGramInfo(mb_strtoupper($word), null, $gramInfo, true)[0]??'');                     });                     $resultWord = implode($delim, $result);                 });                 return mb_strtolower($resultWord);             } else {                 \/\/\u041f\u0440\u0435\u043e\u0431\u0440\u0430\u0437\u043e\u0432\u0430\u043d\u0438\u0435 \u0441\u043b\u043e\u0432\u0430                 return mb_strtolower($morphy->castFormByGramInfo(mb_strtoupper($word), null, $gramInfo, true)[0] ?? '');             }         } catch (\\Throwable $err) {             \\Illuminate\\Support\\Facades\\Log::error('Morphy::getMorphed(): EXCEPTION. $word: '.$word.' $gramInfo: '.json_encode($gramInfo).' '.$err->getMessage(), ['ERROR' => $err->getMessage(), 'TRACE' => $err->getTrace()]);             return '';         }     }      \/**      * \u041f\u0440\u043e\u0432\u0435\u0440\u043a\u0430, \u0437\u0430\u043a\u0430\u043d\u0447\u0438\u0432\u0430\u0435\u0442\u0441\u044f \u043b\u0438 \u0441\u043b\u043e\u0432\u043e \u043d\u0430 \u043e\u0434\u043d\u043e \u0438\u0437 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0439 \u043c\u0430\u0441\u0441\u0438\u0432\u0430      *      * @param $word      * @return bool      *\/     public static function isWordEndWithSkipArr($word){         return collect(self::MORPHY_SKEEP_WORD_END_WITH)->filter(function ($skipLetter) use ($word){                 return ends_with(mb_strtolower($word), mb_strtolower($skipLetter));             })->count() > 0;     }      \/**      * \u041f\u0440\u0438\u0432\u0435\u0441\u0442\u0438 \u043f\u0435\u0440\u0432\u0443\u044e \u0431\u0443\u043a\u0432\u0430 \u0441\u043b\u043e\u0432\u0430 \u043a \u0432\u0435\u0440\u0445\u043d\u0435\u043c\u0443 \u0440\u0435\u0433\u0438\u0441\u0442\u0440\u0443 \u0432 \u043a\u043e\u0434\u0438\u0440\u043e\u0432\u043a\u0435 UTF-8      *      * @param $text      * @return string      *\/     public static function mb_ucfirst($text): string     {         try {             $text = mb_strtolower($text);             return mb_strtoupper(mb_substr($text, 0, 1)) . mb_substr($text, 1);         } catch (\\Throwable $err) {             \\Illuminate\\Support\\Facades\\Log::error('Morphy::mb_ucfirst(): EXCEPTION. $text: '.$text.' '.$err->getMessage(), ['ERROR' => $err->getMessage(), 'TRACE' => $err->getTrace()]);             return '';         }     }      \/**      * \u041f\u0440\u0438\u0432\u0435\u0441\u0442\u0438 \u043f\u0435\u0440\u0432\u0443\u044e \u0431\u0443\u043a\u0432\u0443 \u043a\u0430\u0436\u0434\u043e\u0433\u043e \u0441\u043b\u043e\u0432\u0430 \u0432 \u0441\u0442\u0440\u043e\u043a\u0435 \u043a \u0432\u0435\u0440\u0445\u043d\u0435\u043c\u0443 \u0440\u0435\u0433\u0438\u0441\u0442\u0440\u0443 \u0432 \u043a\u043e\u0434\u0438\u0440\u043e\u0432\u043a\u0435 UTF-8      *      * @param $text      * @return string      *\/     public static function mb_ucwords($text): string     {         try {             $text = mb_strtolower($text);             $result = [];             collect(explode(' ', $text))->each(function ($word) use (&amp;$result) {                 $result[] = self::mb_ucfirst($word);             });             return implode(' ', $result);         } catch (\\Throwable $err) {             \\Illuminate\\Support\\Facades\\Log::error('Morphy::mb_ucwords(): EXCEPTION. $text: '.$text.' '.$err->getMessage(), ['ERROR' => $err->getMessage(), 'TRACE' => $err->getTrace()]);             return '';         }     }      public static function getMorphedRegionName($morphy, string $regionName, bool $addV = true)     {         \/\/\u0412 \u0440\u0435\u0441\u043f\u0443\u0431\u043b\u0438\u043a\u0435         if (mb_strpos($regionName, ' ') === false) return $regionName;          $regionName = mb_strtoupper(str_replace(' \u2014 ','-', $regionName));          $result = $regionName;         $regionArr = explode(' ', $regionName);          $v = $addV ? '\u0432 ' : '';          if (mb_strpos($regionName, '\u0420\u0415\u0421\u041f\u0423\u0411\u041b\u0418\u041a\u0410') !== false){             if (starts_with($regionName, '\u0420\u0415\u0421\u041f\u0423\u0411\u041b\u0418\u041a\u0410')){                 \/\/\u0420\u0435\u0441\u043f\u0443\u0431\u043b\u0438\u043a\u0430 \u041a\u0440\u044b\u043c -> \u0432 \u0440\u0435\u0441\u043f\u0443\u0431\u043b\u0438\u043a\u0435 \u041a\u0440\u044b\u043c                 $result = $v.'\u0440\u0435\u0441\u043f\u0443\u0431\u043b\u0438\u043a\u0435 '.Morphy::mb_ucfirst(mb_strtolower(str_replace('\u0420\u0415\u0421\u041f\u0423\u0411\u041b\u0418\u041a\u0410 ', '', $regionName)));             } else {                 \/\/\u0427\u0443\u0432\u0430\u0448\u0441\u043a\u0430\u044f \u0420\u0435\u0441\u043f\u0443\u0431\u043b\u0438\u043a\u0430 -> \u0432 \u0427\u0443\u0432\u0430\u0448\u0441\u043a\u043e\u0439 \u0440\u0435\u0441\u043f\u0443\u0431\u043b\u0438\u043a\u0435                 $result = $v.Morphy::mb_ucfirst(Morphy::getMorphed($morphy, $regionArr[0], ['\u0415\u0414', '\u0416\u0420', '\u0420\u0414'])).' \u0440\u0435\u0441\u043f\u0443\u0431\u043b\u0438\u043a\u0435';             }          } elseif (mb_strpos($regionName, '\u041a\u0420\u0410\u0419') !== false){             \/\/\u0410\u043b\u0442\u0430\u0439\u0441\u043a\u0438\u0439 \u043a\u0440\u0430\u0439 -> \u0432 \u0410\u043b\u0442\u0430\u0439\u0441\u043a\u043e\u043c \u043a\u0440\u0430\u0435             $result = $v.Morphy::mb_ucfirst(Morphy::getMorphed($morphy, $regionArr[0], ['\u0415\u0414', '\u041c\u0420', '\u041f\u0420'])).' \u043a\u0440\u0430\u0435';         } elseif (mb_strpos($regionName, '\u0410\u0412\u0422\u041e\u041d\u041e\u041c\u041d\u0410\u042f \u041e\u0411\u041b\u0410\u0421\u0422\u042c') !== false){             \/\/\u0432 \u0415\u0432\u0440\u0435\u0439\u0441\u043a\u043e\u0439 \u0430\u0432\u0442\u043e\u043d\u043e\u043c\u043d\u043e\u0439 \u043e\u0431\u043b\u0430\u0441\u0442\u0438             $result = $v.Morphy::mb_ucfirst(Morphy::getMorphed($morphy, $regionArr[0], ['\u0415\u0414', '\u0416\u0420', '\u0420\u0414'])).' \u0430\u0432\u0442\u043e\u043d\u043e\u043c\u043d\u043e\u0439 \u043e\u0431\u043b\u0430\u0441\u0442\u0438';         } elseif (mb_strpos($regionName, '\u041e\u0411\u041b\u0410\u0421\u0422\u042c') !== false){             \/\/\u0432 \u0410\u0440\u0445\u0430\u043d\u0433\u0435\u043b\u044c\u0441\u043a\u043e\u0439 \u043e\u0431\u043b\u0430\u0441\u0442\u0438             $result = $v.Morphy::mb_ucfirst(Morphy::getMorphed($morphy, $regionArr[0], ['\u0415\u0414', '\u0416\u0420', '\u0420\u0414'])).' \u043e\u0431\u043b\u0430\u0441\u0442\u0438';         } elseif (mb_strpos($regionName, '\u0410\u0412\u0422\u041e\u041d\u041e\u041c\u041d\u042b\u0419 \u041e\u041a\u0420\u0423\u0413') !== false){             \/\/\u0432 \u0425\u0430\u043d\u0442\u044b-\u041c\u0430\u043d\u0441\u0438\u0439\u0441\u043a\u043e\u043c \u0430\u0432\u0442\u043e\u043d\u043e\u043c\u043d\u043e\u043c \u043e\u043a\u0440\u0443\u0433\u0435             $result = $v.Morphy::mb_ucfirst(Morphy::getMorphed($morphy, $regionArr[0], ['\u0415\u0414', '\u041c\u0420', '\u041f\u0420'])).' \u0430\u0432\u0442\u043e\u043d\u043e\u043c\u043d\u043e\u043c \u043e\u043a\u0440\u0443\u0433\u0435';         }          return $result;     } } <\/code><\/pre>\n<\/p>\n<\/div>\n<\/details>\n<p>\u0427\u0442\u043e \u0435\u0441\u0442\u044c \u0432 Helper&#8217;\u0435:<\/p>\n<ol>\n<li>\n<p><strong>getMorphy()<\/strong> &#8212; \u0441\u043e\u0437\u0434\u0430\u0435\u0442 \u043a\u043b\u0430\u0441\u0441 phpMorphy \u0441 \u043f\u0440\u0435\u0434\u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043b\u0435\u043d\u043d\u044b\u043c\u0438 \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0430\u043c\u0438;<\/p>\n<\/li>\n<li>\n<p><strong>getMorphedCount($count, <em>string <\/em>$word, $morphy = <em>null<\/em>)<\/strong> &#8212; \u0441\u043a\u043b\u043e\u043d\u044f\u0435\u0442 \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0435 \u0434\u043b\u044f \u0447\u0438\u0441\u043b\u043e\u0432\u043e\u0433\u043e \u043e\u0442\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u044f. \u041f\u0440\u0438\u043c\u0435\u0440: 5 \u0432\u0430\u043a\u0430\u043d\u0441\u0438\u0439, 101 \u0440\u0443\u0434\u043e\u043a\u043e\u043f.<\/p>\n<\/li>\n<li>\n<p><strong>getMorphed($morphy, string $word, array $gramInfo)<\/strong> &#8212; \u043f\u0440\u0438\u043c\u0435\u043d\u044f\u0435\u0442 \u043a \u0441\u043b\u043e\u0432\u0443 \u0438\u043b\u0438 \u0444\u0440\u0430\u0437\u0435 \u0443\u043a\u0430\u0437\u0430\u043d\u043d\u044b\u0435 \u043f\u0440\u0430\u0432\u0438\u043b\u0430 \u043f\u0440\u0435\u043e\u0431\u0440\u0430\u0437\u043e\u0432\u0430\u043d\u0438\u044f<\/p>\n<\/li>\n<li>\n<p><strong>isWordEndWithSkipArr($word)<\/strong> &#8212; \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f \u0434\u043b\u044f \u043f\u0440\u043e\u043f\u0443\u0441\u043a\u0430 \u0441\u043b\u043e\u0432-\u0438\u0441\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0439, \u043d\u0430\u043c \u044d\u0442\u043e \u043d\u0443\u0436\u043d\u043e \u0434\u043b\u044f \u0440\u0435\u0433\u0438\u043e\u043d\u043e\u0432<\/p>\n<\/li>\n<li>\n<p><strong>mb_ucfirst($text)<\/strong> &#8212; \u0434\u0435\u043b\u0430\u0435\u0442 \u043f\u0435\u0440\u0432\u0443\u044e \u0431\u0443\u043a\u0432\u0443 \u043f\u0435\u0440\u0432\u043e\u0433\u043e \u0441\u043b\u043e\u0432\u0430 \u0432 \u0441\u0442\u0440\u043e\u043a\u0435 \u0437\u0430\u0433\u043b\u0430\u0432\u043d\u043e\u0439, \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 \u043a\u043e\u0440\u0440\u0435\u043a\u0442\u043d\u043e \u0441 \u043a\u0438\u0440\u0438\u043b\u043b\u0438\u0446\u0435\u0439 \u0438 \u0440\u0430\u0437\u0434\u0435\u043b\u0438\u0442\u0435\u043b\u044f\u043c\u0438 \u0432 \u0441\u0442\u0440\u043e\u043a\u0435, \u0432 \u043e\u0442\u043b\u0438\u0447\u0438\u0438 \u043e\u0442 \u0448\u0442\u0430\u0442\u043d\u043e\u0433\u043e \u0441\u0440\u0435\u0434\u0441\u0442\u0432\u0430. \u0418\u043c\u044f \u043c\u0435\u0442\u043e\u0434\u0430 \u0441\u043f\u0435\u0446\u0438\u0430\u043b\u044c\u043d\u043e \u0441\u0434\u0435\u043b\u0430\u043d\u043e \u043c\u0430\u043a\u0441\u0438\u043c\u0430\u043b\u044c\u043d\u043e \u043f\u0440\u0438\u0431\u043b\u0438\u0436\u0435\u043d\u043d\u044b\u043c \u043a \u0448\u0442\u0430\u0442\u043d\u043e\u043c\u0443.<\/p>\n<\/li>\n<li>\n<p><strong>mb_ucwords($text)<\/strong> &#8212; \u0442\u043e \u0436\u0435 \u0441\u0430\u043c\u043e\u0435, \u0447\u0442\u043e \u0438 \u043f\u0440\u0435\u0434\u044b\u0434\u0443\u0449\u0438\u0439 \u043c\u0435\u0442\u043e\u0434, \u0442\u043e\u043b\u044c\u043a\u043e \u0434\u0435\u043b\u0430\u0435\u0442 \u043f\u0435\u0440\u0432\u0443\u044e \u0431\u0443\u043a\u0432\u0443 \u0437\u0430\u0433\u043b\u0430\u0432\u043d\u043e\u0439 \u0432 \u043a\u0430\u0436\u0434\u043e\u043c \u0441\u043b\u043e\u0432\u0435 \u0441\u0442\u0440\u043e\u043a\u0438<\/p>\n<\/li>\n<li>\n<p><strong>getMorphedRegionName($morphy, <em>string <\/em>$regionName, <em>bool <\/em>$addV = <em>true<\/em>)<\/strong> &#8212; \u043f\u0440\u0438\u0432\u043e\u0434\u0438\u0442 \u0440\u0435\u0433\u0438\u043e\u043d \u043a \u043d\u0443\u0436\u043d\u043e\u043c\u0443 \u0441\u043a\u043b\u043e\u043d\u0435\u043d\u0438\u044e. \u041f\u0440\u0438\u043c\u0435\u0440: &#171;\u0432 \u041a\u0440\u0430\u0441\u043d\u043e\u0434\u0430\u0440\u0441\u043a\u043e\u043c \u043a\u0440\u0430\u0435&#187;.<\/p>\n<\/li>\n<\/ol>\n<p>\u0412\u0441\u044f \u043c\u0430\u0433\u0438\u044f \u043f\u0440\u043e\u0438\u0441\u0445\u043e\u0434\u0438\u0442 \u0432 \u043c\u0435\u0442\u043e\u0434\u0435 phpMorthy->castFormByGramInfo()<\/p>\n<pre><code class=\"php\">castFormByGramInfo($word, $partOfSpeech, $grammems, $returnOnlyWord = false, $callback = null, $type = self::NORMAL)  \u0414\u043b\u044f \u0442\u0435\u043a\u0443\u0449\u0435\u0439 \u0437\u0430\u0434\u0430\u0447\u0438 \u043c\u044b \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c \u044d\u0442\u043e\u0442 \u043c\u0435\u0442\u043e\u0434 \u0442\u0430\u043a:  $morphy->castFormByGramInfo(mb_strtoupper($word), null, $gramInfo, true)<\/code><\/pre>\n<p>\u041c\u0435\u0442\u043e\u0434 <strong>castFormByGramInfo()<\/strong> \u043e\u0442\u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 \u043d\u0435\u043a\u043e\u0440\u0440\u0435\u043a\u0442\u043d\u043e, \u0435\u0441\u043b\u0438 \u043f\u043e\u043b\u0443\u0447\u0438\u0442 \u043d\u0430 \u0432\u0445\u043e\u0434\u0435 \u0441\u043b\u043e\u0432\u043e \u0438\u043b\u0438 \u0444\u0440\u0430\u0437\u0443 \u043d\u0435 \u0432 \u0444\u043e\u0440\u043c\u0430\u0442\u0435 \u0437\u0430\u0433\u043b\u0430\u0432\u043d\u044b\u0445 \u0431\u0443\u043a\u0432 (UPPER_CASE), \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u0431\u044b\u043b \u0441\u043e\u0437\u0434\u0430\u043d \u043c\u0435\u0442\u043e\u0434 mb_strtoupper(). \u041f\u043e\u0432\u0442\u043e\u0440\u044e\u0441\u044c, \u0448\u0442\u0430\u0442\u043d\u044b\u0439 \u043c\u0435\u0442\u043e\u0434 \u043f\u0440\u0438\u0432\u0435\u0434\u0435\u043d\u0438\u044f \u043a\u043e \u0432\u0441\u0435\u043c \u0437\u0430\u0433\u043b\u0430\u0432\u043d\u044b\u043c \u0431\u0443\u043a\u0432\u0430\u043c \u043f\u043b\u043e\u0445\u043e \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 \u0441 \u043a\u0438\u0440\u0438\u043b\u043b\u0438\u0446\u0435\u0439 \u0432 \u043a\u0443\u043f\u0435 \u0441 \u0440\u0430\u0437\u0434\u0435\u043b\u0438\u0442\u0435\u043b\u044f\u043c\u0438, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u043c\u044b \u0441\u043e\u0437\u0434\u0430\u043b\u0438 \u0441\u0432\u043e\u0439 \u043c\u0435\u0442\u043e\u0434.<\/p>\n<p><strong>$gramInfo<\/strong> &#8212; \u044d\u0442\u043e \u043f\u0440\u0430\u0432\u0438\u043b\u0430 \u043f\u0440\u0438\u0432\u0435\u0434\u0435\u043d\u0438\u044f, \u043c\u0430\u0441\u0441\u0438\u0432.<\/p>\n<p>\u041c\u044b \u043f\u0440\u0438\u043c\u0435\u043d\u044f\u0435\u043c \u043f\u0440\u0430\u0432\u0438\u043b\u0430 \u0432\u0438\u0434\u0430:<\/p>\n<pre><code class=\"php\">[{\u041a\u041e\u0414_\u0427\u0418\u0421\u041b\u0415\u041d\u041d\u041e\u0421\u0422\u0418}, {\u041a\u041e\u0414_\u0420\u041e\u0414\u0410}, {\u041a\u041e\u0414_\u041f\u0410\u0414\u0415\u0416\u0410}]  \u041f\u0440\u0438\u043c\u0435\u0440:  ['\u0415\u0414', '\u0416\u0420', '\u0420\u0414']<\/code><\/pre>\n<p>\u041f\u043e\u0434\u0440\u043e\u0431\u043d\u043e \u043a\u043e\u0434\u044b \u043e\u043f\u0438\u0441\u0430\u043d\u044b \u0432 \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430\u0446\u0438\u0438 phpMorphy: <a href=\"http:\/\/phpmorphy.sourceforge.net\/dokuwiki\/manual-graminfo\">http:\/\/phpmorphy.sourceforge.net\/dokuwiki\/manual-graminfo<\/a><\/p>\n<p>\u041f\u0440\u0438\u043c\u0435\u0440: [&#8216;\u0415\u0414&#8217;, &#8216;\u0416\u0420&#8217;, &#8216;\u0420\u0414&#8217;] &#8212; \u0415\u0434\u0438\u043d\u0441\u0442\u0432\u0435\u043d\u043d\u043e\u0435 \u0447\u0438\u0441\u043b\u043e, \u0436\u0435\u043d\u0441\u043a\u0438\u0439 \u0440\u043e\u0434, \u0440\u043e\u0434\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0439 \u043f\u0430\u0434\u0435\u0436<\/p>\n<p>\u041f\u0440\u0438\u043c\u0435\u043d\u0438\u0432 \u0434\u0430\u043d\u043d\u044b\u0435 \u043f\u0440\u0430\u0432\u0438\u043b\u0430 \u043a \u0441\u043b\u043e\u0432\u0443 &#171;\u0427\u0443\u0432\u0430\u0448\u0441\u043a\u0438\u0439&#187;, \u043c\u044b \u043f\u043e\u043b\u0443\u0447\u0438\u043c &#171;\u0427\u0443\u0432\u0430\u0448\u0441\u043a\u043e\u0439&#187;.<\/p>\n<p>\u0412\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u0438 phpMorphy \u043f\u0440\u0438 \u0434\u043e\u043b\u0436\u043d\u043e\u043c \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0438 \u043f\u043e\u0440\u0430\u0436\u0430\u044e\u0442.<\/p>\n<p>\u0415\u0449\u0435 \u043f\u0440\u0438\u043c\u0435\u0440:<\/p>\n<pre><code class=\"php\">return '\u0420\u0430\u0431\u043e\u0442\u0430 '.Morphy::getMorphed($morphy, $name, ['\u0415\u0414', '\u0422\u0412']);<\/code><\/pre>\n<p>\u0414\u0430\u043d\u043d\u044b\u0439 \u043a\u043e\u0434 \u0432\u0435\u0440\u043d\u0435\u0442 \u0432\u0430\u043a\u0430\u043d\u0441\u0438\u044e \u0432 \u0442\u0432\u043e\u0440\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u043c \u043f\u0430\u0434\u0435\u0436\u0435, &#171;\u0420\u0430\u0431\u043e\u0442\u0430 \u0433\u0435\u043d\u0435\u0442\u0438\u043a\u043e\u043c&#187;.<\/p>\n<p>\u0415\u0441\u043b\u0438 \u0412\u0430\u043c \u0441\u043b\u043e\u0436\u043d\u043e \u043f\u043e\u0434\u043e\u0431\u0440\u0430\u0442\u044c \u043f\u0440\u0430\u0432\u0438\u043b\u0430 \u0434\u043b\u044f \u0412\u0430\u0448\u0435\u0433\u043e \u0441\u043b\u0443\u0447\u0430\u044f, \u043c\u043e\u0436\u043d\u043e \u0432\u043e\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c\u0441\u044f \u043c\u0435\u0442\u043e\u0434\u043e\u043c phpMorphy:<\/p>\n<pre><code class=\"php\">$morphy->getAllFormsWithGramInfo('\u0422\u0415\u0421\u0422', true)<\/code><\/pre>\n<h4>\u0414\u0430\u043d\u043d\u044b\u0439 \u043c\u0435\u0442\u043e\u0434 \u0432\u044b\u0434\u0430\u0441\u0442 \u043c\u0430\u0441\u0441\u0438\u0432\u043e\u043c \u0432\u0441\u0435 \u0432\u0430\u0440\u0438\u0430\u043d\u0442\u044b \u0441\u043b\u043e\u0432 \u043d\u0430 \u043e\u0441\u043d\u043e\u0432\u0435 \u0412\u0430\u0448\u0435\u0433\u043e \u043f\u0440\u0438\u043c\u0435\u0440\u0430 \u0438 \u043f\u043e\u043a\u0430\u0436\u0435\u0442 \u043a\u0430\u043a\u0438\u0435 \u043f\u0440\u0430\u0432\u0438\u043b\u0430 \u043f\u0440\u0438\u0432\u0435\u043b\u0438 \u043a \u043a\u0430\u0436\u0434\u043e\u0439 \u0444\u043e\u0440\u043c\u0435 \u0441\u043b\u043e\u0432\u0430.<\/h4>\n<p>\u0422\u0430\u043a\u0436\u0435 phpMorphy \u0443\u043c\u0435\u0435\u0442 \u043f\u0440\u0438\u0432\u043e\u0434\u0438\u0442\u044c \u0441\u043b\u043e\u0432\u0430 \u043f\u043e \u043e\u0431\u0440\u0430\u0437\u0446\u0443:<\/p>\n<pre><code>$morphy->castFormByPattern('\u0414\u0418\u0412\u0410\u041d', '\u0421\u0422\u041e\u041b\u0410\u041c\u0418', null, true)<\/code><\/pre>\n<p>\u0422\u0430\u043a \u043c\u044b \u043f\u043e\u043b\u0443\u0447\u0438\u043c \u0441\u043b\u043e\u0432\u043e &#171;\u0414\u0418\u0412\u0410\u041d\u0410\u041c\u0418&#187; \u043f\u043e \u043e\u0431\u0440\u0430\u0437\u0446\u0443 \u0432 \u0432\u0438\u0434\u0435 \u0441\u043b\u043e\u0432\u0430 &#171;\u0421\u0422\u041e\u041b\u0410\u041c\u0418&#187;.<\/p>\n<p>\u041f\u0440\u0430\u043a\u0442\u0438\u0447\u0435\u0441\u043a\u0438 \u0432\u043e \u0432\u0441\u0435\u0445 \u043c\u0435\u0442\u043e\u0434\u0430\u0445 Helper&#8217;\u0430 \u043c\u044b \u043f\u0435\u0440\u0435\u0434\u0430\u0435\u0442 \u0437\u0430\u0440\u0430\u043d\u0435\u0435 \u0441\u043e\u0437\u0434\u0430\u043d\u043d\u044b\u0439 \u044d\u043a\u0437\u0435\u043c\u043f\u043b\u044f\u0440 phpMorphy \u0432 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u043e\u0439 $morphy, \u0447\u0442\u043e\u0431\u044b \u043d\u0435 \u0441\u043e\u0437\u0434\u0430\u0432\u0430\u0442\u044c \u0435\u0433\u043e \u043f\u0440\u0438 \u043a\u0430\u0436\u0434\u043e\u043c \u043e\u0431\u0440\u0430\u0449\u0435\u043d\u0438\u0438 \u043a Helper&#8217;\u0443, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440 \u043f\u0440\u0438 \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0435 \u043a\u043e\u043b\u043b\u0435\u043a\u0446\u0438\u0438 \u0434\u0430\u043d\u043d\u044b\u0445 (\u0433\u0435\u043d\u0435\u0440\u0430\u0446\u0438\u0438 \u0441\u0442\u0440\u0430\u043d\u0438\u0446).<\/p>\n<details class=\"spoiler\">\n<summary>\u041f\u0440\u0438\u043c\u0435\u0440 \u043c\u0435\u0442\u043e\u0434\u0430 \u0433\u0435\u043d\u0435\u0440\u0430\u0446\u0438\u0438 SEO \u0434\u0430\u043d\u043d\u044b\u0445<\/summary>\n<div class=\"spoiler__content\">\n<pre><code class=\"php\">     \/**      * \u0413\u0435\u043d\u0435\u0440\u0438\u043c SOE \u0434\u0430\u043d\u043d\u044b\u0435 \u0434\u043b\u044f \u0433\u0440\u0443\u043f\u043f\u044b \u0432\u0430\u043a\u0430\u043d\u0441\u0438\u0439      *      * @return array      *\/     public function getSeoDataForGroup($morphy, $count, $groupName, $regionName): array     {         \/\/ \u0425\u043e\u0442\u0438\u043c \u043d\u0430 \u0432\u044b\u0445\u043e\u0434\u0435:         \/\/ title: \u0420\u0430\u0431\u043e\u0442\u0430 \u0431\u0438\u043e\u0438\u043d\u0436\u0435\u043d\u0435\u0440\u043e\u043c \u0432 \u0420\u043e\u0441\u0441\u0438\u0438, 175 \u0443\u043d\u0438\u043a\u0430\u043b\u044c\u043d\u044b\u0445 \u0432\u0430\u043a\u0430\u043d\u0441\u0438\u0439         \/\/ h1: \u0420\u0430\u0431\u043e\u0442\u0430 \u0431\u0438\u043e\u0438\u043d\u0436\u0435\u043d\u0435\u0440\u043e\u043c \u0432 \u0420\u043e\u0441\u0441\u0438\u0438, 175 \u0432\u0430\u043a\u0430\u043d\u0441\u0438\u0439         \/\/ description: \u0420\u0430\u0431\u043e\u0442\u0430 \u0432 \u0410\u041f\u041a. \u0421\u0432\u0435\u0436\u0438\u0435 \u0432\u0430\u043a\u0430\u043d\u0441\u0438\u0438 \u0431\u0438\u043e\u0438\u043d\u0436\u0435\u043d\u0435\u0440\u0430 \u0432 \u0420\u043e\u0441\u0441\u0438\u0438 \u043e\u0442 \u043f\u0440\u044f\u043c\u044b\u0445 \u0440\u0430\u0431\u043e\u0442\u043e\u0434\u0430\u0442\u0435\u043b\u0435\u0439. \u041c\u044b \u0441\u043e\u0431\u0440\u0430\u043b\u0438 175 \u0443\u043d\u0438\u043a\u0430\u043b\u044c\u043d\u044b\u0445 \u0432\u0430\u043a\u0430\u043d\u0441\u0438\u0439.         \/\/ keywords: \u0440\u0430\u0431\u043e\u0442\u0430 \u0431\u0438\u043e\u0438\u043d\u0436\u0435\u043d\u0435\u0440\u043e\u043c, \u0432\u0430\u043a\u0430\u043d\u0441\u0438\u0438 \u0431\u0438\u043e\u0438\u043d\u0436\u0435\u043d\u0435\u0440\u0430, \u0432\u0430\u043a\u0430\u043d\u0441\u0438\u0438 \u0430\u0441\u0441\u0438\u0441\u0442\u0435\u043d\u0442\u0430 \u0431\u0438\u043e\u0438\u043d\u0436\u0435\u043d\u0435\u0440\u0430, \u0440\u0430\u0431\u043e\u0442\u0430 \u0430\u0441\u0441\u0438\u0441\u0442\u0435\u043d\u0442\u043e\u043c \u0431\u0438\u043e\u0438\u043d\u0436\u0435\u043d\u0435\u0440\u0430, \u0432\u0430\u043a\u0430\u043d\u0441\u0438\u0438 \u0431\u0438\u043e\u0438\u043d\u0436\u0435\u043d\u0435\u0440          $groupName = mb_strtolower($groupName);         $regionName = mb_strtolower($regionName);          $groupNameTV = Morphy::getMorphed($morphy, $groupName, ['\u0415\u0414', '\u0422\u0412']); \/\/\u043a\u0435\u043c - \u0431\u0438\u043e\u0438\u043d\u0436\u0435\u043d\u0435\u0440\u043e\u043c - \u0422\u0432\u043e\u0440\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0439 \u043f\u0430\u0434\u0435\u0436         $groupNameVN = Morphy::getMorphed($morphy, $groupName, ['\u0415\u0414', '\u0412\u041d']); \/\/\u043a\u043e\u0433\u043e - \u0431\u0438\u043e\u0438\u043d\u0436\u0435\u043d\u0435\u0440\u0430 - \u0412\u0438\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0439 \u043f\u0430\u0434\u0435\u0436          $regionNameV = Morphy::getMorphedRegionName($morphy, $regionName);          $countStr = Morphy::getMorphedCount($count, '\u0432\u0430\u043a\u0430\u043d\u0441\u0438\u044f', $morphy);          $titlePart = \"\u0420\u0430\u0431\u043e\u0442\u0430 $groupNameTV $regionNameV, $count\"; \/\/\u0420\u0430\u0431\u043e\u0442\u0430 \u0431\u0438\u043e\u0438\u043d\u0436\u0435\u043d\u0435\u0440\u043e\u043c \u0432 \u0420\u043e\u0441\u0441\u0438\u0438, 175         $descripton = \"\u0420\u0430\u0431\u043e\u0442\u0430 \u0432 \u0410\u041f\u041a. \u0421\u0432\u0435\u0436\u0438\u0435 \u0432\u0430\u043a\u0430\u043d\u0441\u0438\u0438 $groupNameVN $regionNameV \u043e\u0442 \u043f\u0440\u044f\u043c\u044b\u0445 \u0440\u0430\u0431\u043e\u0442\u043e\u0434\u0430\u0442\u0435\u043b\u0435\u0439. \u041c\u044b \u0441\u043e\u0431\u0440\u0430\u043b\u0438 $count \u0443\u043d\u0438\u043a\u0430\u043b\u044c\u043d\u044b\u0445 $countStr.\";         $keywords = \"\u0440\u0430\u0431\u043e\u0442\u0430 $groupNameTV, \u0432\u0430\u043a\u0430\u043d\u0441\u0438\u0438 $groupNameVN, \u0432\u0430\u043a\u0430\u043d\u0441\u0438\u0438 \u0430\u0441\u0441\u0438\u0441\u0442\u0435\u043d\u0442\u0430 $groupNameVN, \u0440\u0430\u0431\u043e\u0442\u0430 \u0430\u0441\u0441\u0438\u0441\u0442\u0435\u043d\u0442\u043e\u043c $groupNameVN, \u0432\u0430\u043a\u0430\u043d\u0441\u0438\u0438 $groupName\";           return [             'seo_title'         => \"$titlePart \u0443\u043d\u0438\u043a\u0430\u043b\u044c\u043d\u044b\u0445 $countStr\",             'seo_h1'            => \"$titlePart $countStr\",             'seo_description'   => $descripton,             'seo_keywords'      => $keywords         ];     }<\/code><\/pre>\n<\/p>\n<\/div>\n<\/details>\n<p>\u0414\u0430\u043b\u0435\u0435, \u043f\u043e\u0441\u043b\u0435 \u0433\u0435\u043d\u0435\u0440\u0430\u0446\u0438\u0438 \u043a\u043e\u043d\u0442\u0435\u043d\u0442\u0430 \u0441\u0442\u0440\u0430\u043d\u0438\u0446 \u0438 SEO-\u0437\u0430\u0433\u043e\u043b\u043e\u0432\u043a\u043e\u0432, \u0434\u043b\u044f \u043a\u0430\u0436\u0434\u043e\u0439 \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u044b \u043c\u044b \u0441\u043e\u0445\u0440\u0430\u043d\u044f\u0435\u043c \u0437\u0430\u043f\u0438\u0441\u044c \u0432 \u0441\u043f\u0435\u0446\u0438\u0430\u043b\u044c\u043d\u0443\u044e \u0442\u0430\u0431\u043b\u0438\u0447\u043a\u0443 \u0431\u0430\u0437\u044b \u0434\u0430\u043d\u043d\u044b\u0445, \u0441 \u0433\u0435\u043d\u0435\u0440\u0430\u0446\u0438\u0435\u0439 \u0443\u043d\u0438\u043a\u0430\u043b\u044c\u043d\u043e\u0433\u043e \u043f\u0443\u0442\u0438 \u043a \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u0435 \u0441\u0430\u0439\u0442\u0430 (url).<\/p>\n<p>\u041c\u044b \u043d\u0430\u0441\u0442\u0440\u043e\u0438\u043b\u0438 \u043d\u0430\u0448 \u0432\u0435\u0431 \u0441\u0435\u0440\u0432\u0435\u0440 \u0442\u0430\u043a\u0438\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c, \u0447\u0442\u043e \u043f\u0440\u0438 \u0437\u0430\u043f\u0440\u043e\u0441\u0435 sitemap \u043f\u043e\u0438\u0441\u043a\u043e\u0432\u0438\u043a\u043e\u043c, \u043e\u043d \u0433\u0435\u043d\u0435\u0440\u0438\u0440\u0443\u0435\u0442\u0441\u044f \u043d\u0430 \u043e\u0441\u043d\u043e\u0432\u0435 \u0434\u0430\u043d\u043d\u044b\u0445 \u0432\u044b\u0448\u0435\u043e\u043f\u0438\u0441\u0430\u043d\u043d\u043e\u0439 \u0442\u0430\u0431\u043b\u0438\u0446\u0435 \u0411\u0414. \u0422\u0430\u043a\u0438\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c, \u0432\u0441\u0435 \u0441\u0433\u0435\u043d\u0435\u0440\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0435 \u0434\u0430\u043d\u043d\u044b\u0435 \u0438\u043d\u0434\u0435\u043a\u0441\u0438\u0440\u0443\u044e\u0442\u0441\u044f \u043f\u043e\u0438\u0441\u043a\u043e\u0432\u0438\u043a\u0430\u043c\u0438.<\/p>\n<hr\/>\n<h2>\u0417\u0430\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435<\/h2>\n<p>\u0411\u043b\u0430\u0433\u043e\u0434\u0430\u0440\u044f phpMorphy \u0412\u044b \u043c\u043e\u0436\u0435\u0442\u0435 \u0433\u0435\u043d\u0435\u0440\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u043f\u0440\u0430\u043a\u0442\u0438\u0447\u0435\u0441\u043a\u0438 \u043b\u044e\u0431\u043e\u0439 \u043a\u043e\u043d\u0442\u0435\u043d\u0442 \u0438 \u043a\u043e\u0440\u0440\u0435\u043a\u0442\u043d\u044b\u0435 SEO-\u0437\u0430\u0433\u043e\u043b\u043e\u0432\u043a\u0438. \u0414\u0430\u043d\u043d\u044b\u0439 \u043f\u043e\u0434\u0445\u043e\u0434 \u0442\u0430\u043a\u0436\u0435 \u043f\u0440\u0438\u043c\u0435\u043d\u0438\u043c \u0438 \u0434\u043b\u044f \u0433\u0435\u043d\u0435\u0440\u0430\u0446\u0438\u0438 \u043c\u0435\u0442\u0430\u0434\u0430\u043d\u043d\u044b\u0445.<\/p>\n<p>\u0412 \u0431\u0443\u0434\u0443\u0449\u0435\u043c \u043c\u044b \u043f\u043b\u0430\u043d\u0438\u0440\u0443\u0435\u043c \u0440\u0435\u0430\u043b\u0438\u0437\u043e\u0432\u0430\u0442\u044c \u0433\u0440\u0430\u043c\u043e\u0442\u043d\u043e\u0435 \u0441\u043a\u043b\u043e\u043d\u0435\u043d\u0438\u0435 \u0444\u0440\u0430\u0437, \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u044b \u043e\u043f\u0443\u0431\u043b\u0438\u043a\u0443\u0435\u043c<u>\u043e\u043c<\/u> (\u0448\u0443\u0442\u043a\u0430) \u0432 \u043d\u043e\u0432\u043e\u0439 \u043f\u0443\u0431\u043b\u0438\u043a\u0430\u0446\u0438\u0438.<\/p>\n<p>\u041e\u0447\u0435\u043d\u044c \u043d\u0430\u0434\u0435\u0435\u043c\u0441\u044f, \u0447\u0442\u043e \u043a\u043e\u043c\u0443-\u043d\u0438\u0431\u0443\u0434\u044c \u043f\u043e\u043c\u043e\u0433\u043b\u0438 \u0434\u0430\u043d\u043d\u043e\u0439 \u0441\u0442\u0430\u0442\u044c\u0435\u0439.<\/p>\n<p>\u0421 \u0443\u0432\u0430\u0436\u0435\u043d\u0438\u0435\u043c \u0438 \u0441\u043f\u0430\u0441\u0438\u0431\u043e \u0437\u0430 \u0432\u043d\u0438\u043c\u0430\u043d\u0438\u0435!<\/p>\n<p>\u0410\u043b\u0435\u043a\u0441\u0430\u043d\u0434\u0440 \u041a\u043e\u0440\u0430\u0431\u0435\u043b\u044c\u043d\u0438\u043a\u043e\u0432, \u0420\u043e\u0441\u0441\u0435\u043b\u044c\u0445\u043e\u0437\u0431\u0430\u043d\u043a.<\/p>\n<\/p>\n<\/div>\n<\/div>\n<\/div>\n<div class=\"v-portal\" style=\"display:none;\"><\/div>\n<\/div>\n<p> <!----> <!----><br \/> \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\/company\/rshb\/blog\/688330\/\"> https:\/\/habr.com\/ru\/company\/rshb\/blog\/688330\/<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<div><\/div>\n<div id=\"post-content-body\">\n<div>\n<div class=\"article-formatted-body article-formatted-body article-formatted-body_version-2\">\n<div xmlns=\"http:\/\/www.w3.org\/1999\/xhtml\">\n<figure class=\"full-width\"><figcaption><\/figcaption><\/figure>\n<p>\u041f\u0440\u0438\u0432\u0435\u0442, \u0434\u0440\u0443\u0437\u044c\u044f!<\/p>\n<p>\u041c\u044b \u0440\u0430\u0437\u0440\u0430\u0431\u0430\u0442\u044b\u0432\u0430\u0435\u043c \u043f\u043b\u0430\u0442\u0444\u043e\u0440\u043c\u0443 <a href=\"https:\/\/svoevagro.ru\/\"><strong>\u042f \u0432 \u0430\u0433\u0440\u043e<\/strong><\/a>. \u041f\u043b\u0430\u0442\u0444\u043e\u0440\u043c\u0430, \u043f\u043e\u043c\u0438\u043c\u043e \u043f\u0440\u043e\u0447\u0435\u0433\u043e, \u043f\u043e\u043c\u043e\u0433\u0430\u0435\u0442 \u043d\u0430\u0439\u0442\u0438 \u0432\u0430\u043a\u0430\u043d\u0441\u0438\u0438 \u0432 \u0441\u0444\u0435\u0440\u0435 \u0430\u0433\u0440\u043e.<\/p>\n<p>\u0415\u0441\u0442\u044c \u0443 \u043d\u0430\u0441 \u0437\u0430\u0434\u0430\u0447\u043a\u0430 &#8212; \u0433\u0435\u043d\u0435\u0440\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0443\u043d\u0438\u043a\u0430\u043b\u044c\u043d\u044b\u0435 \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u044b \u0441\u0430\u0439\u0442\u0430, \u0434\u0430 \u0442\u0430\u043a, \u0447\u0442\u043e\u0431\u044b \u0438 seo-\u0437\u0430\u0433\u043e\u043b\u043e\u0432\u043a\u0438 \u0434\u043b\u044f \u0438\u043d\u0434\u0435\u043a\u0441\u0430\u0446\u0438\u0438 \u043f\u043e\u0438\u0441\u043a\u043e\u0432\u0438\u043a\u0430\u043c\u0438 \u0442\u043e\u0436\u0435 \u0433\u0435\u043d\u0435\u0440\u0438\u0440\u043e\u0432\u0430\u043b\u0438\u0441\u044c \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438 \u043f\u043e\u0434 \u0440\u0430\u0437\u043d\u044b\u0435 \u0441\u0443\u0449\u043d\u043e\u0441\u0442\u0438 \u043f\u0440\u043e\u0435\u043a\u0442\u0430.<\/p>\n<p>\u0414\u043e\u043f\u0443\u0441\u0442\u0438\u043c, \u043d\u0430\u043c \u043d\u0443\u0436\u043d\u043e \u0433\u0435\u043d\u0435\u0440\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u044b \u0432\u0430\u043a\u0430\u043d\u0441\u0438\u0439, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0431\u044b\u043b\u0438 \u0431\u044b \u043f\u0440\u0438\u0432\u044f\u0437\u0430\u043d\u044b \u043a \u0433\u043e\u0440\u043e\u0434\u0443 \u0438\u043b\u0438 \u0440\u0435\u0433\u0438\u043e\u043d\u0443 \u0441\u0442\u0440\u0430\u043d\u044b. \u042d\u0442\u043e\u0442 \u0436\u0435 \u043f\u0440\u0438\u043c\u0435\u0440 \u043f\u043e\u0434\u0445\u043e\u0434\u0438\u0442 \u0438 \u0434\u043b\u044f \u0433\u0435\u043d\u0435\u0440\u0430\u0446\u0438\u0438 \u0441\u0442\u0440\u0430\u043d\u0438\u0446 \u0441\u0430\u0439\u0442\u0430 \u043a\u0430\u043a\u043e\u0433\u043e-\u043d\u0438\u0431\u0443\u0434\u044c \u0438\u043d\u0442\u0435\u0440\u043d\u0435\u0442 \u043c\u0430\u0433\u0430\u0437\u0438\u043d\u0430 \u0438\u043b\u0438 \u043c\u0430\u0440\u043a\u0435\u0442\u043f\u043b\u0435\u0439\u0441\u0430 \u043f\u0440\u043e\u0434\u0430\u044e\u0449\u0438\u0445 \u0442\u043e\u0432\u0430\u0440\u044b \u0438\u043b\u0438 \u0443\u0441\u043b\u0443\u0433\u0438.<\/p>\n<p>\u0412 \u043d\u0430\u0448\u0435\u043c \u0441\u043b\u0443\u0447\u0430\u0435, \u0443 \u043d\u0430\u0441 \u0435\u0441\u0442\u044c \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0435 <strong>\u0441\u0443\u0449\u043d\u043e\u0441\u0442\u0438<\/strong>:<\/p>\n<ol>\n<li>\n<p>\u041d\u0430\u0437\u0432\u0430\u043d\u0438\u0435 \u0432\u0430\u043a\u0430\u043d\u0441\u0438\u0438 \u0438\u043b\u0438 \u0442\u043e\u0432\u0430\u0440\u043d\u043e\u0439 \u043f\u043e\u0437\u0438\u0446\u0438\u0438;<\/p>\n<\/li>\n<li>\n<p>\u0420\u0435\u0433\u0438\u043e\u043d \u0441\u0442\u0440\u0430\u043d\u044b;<\/p>\n<\/li>\n<li>\n<p>\u0413\u043e\u0440\u043e\u0434.<\/p>\n<\/li>\n<\/ol>\n<p>\u041d\u0430 \u0432\u044b\u0445\u043e\u0434\u0435 \u043c\u044b \u0445\u043e\u0442\u0438\u043c \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u044c \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u043d\u043e \u0441\u0433\u0435\u043d\u0435\u0440\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0439 HTML \u043a\u043e\u043d\u0442\u0435\u043d\u0442, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0431\u044b \u0438\u043c\u0435\u043b \u0442\u0435\u043a\u0441\u0442 \u043e\u043f\u0438\u0441\u0430\u043d\u0438\u044f \u0432\u0430\u043a\u0430\u043d\u0441\u0438\u0438, \u043c\u0435\u0442\u0430\u0442\u0435\u0433\u0438 \u0438 seo-\u0437\u0430\u0433\u043e\u043b\u043e\u0432\u043a\u0438 \u0432 \u043a\u043e\u0434\u0435.<\/p>\n<p>\u0427\u0442\u043e \u043d\u0430\u043c \u043d\u0443\u0436\u043d\u043e \u043f\u043e <strong>SEO<\/strong>:<\/p>\n<ol>\n<li>\n<p><strong>title<\/strong> &#8212; \u0437\u0430\u0433\u043e\u043b\u043e\u0432\u043e\u043a;<\/p>\n<\/li>\n<li>\n<p><strong>h1<\/strong> &#8212; \u0437\u0430\u0433\u043e\u043b\u043e\u0432\u043e\u043a \u043f\u0435\u0440\u0432\u043e\u0433\u043e \u0443\u0440\u043e\u0432\u043d\u044f;<\/p>\n<\/li>\n<li>\n<p><strong>description<\/strong> &#8212; \u043e\u043f\u0438\u0441\u0430\u043d\u0438\u0435;<\/p>\n<\/li>\n<li>\n<p><strong>keywords<\/strong> &#8212; \u043a\u043b\u044e\u0447\u0435\u0432\u044b\u0435 \u0441\u043b\u043e\u0432\u0430.<\/p>\n<\/li>\n<\/ol>\n<p>\u0418\u0442\u0430\u043a, \u043f\u0440\u0438\u043c\u0435\u0440. \u0414\u043e\u043f\u0443\u0441\u0442\u0438\u043c, \u0443 \u043d\u0430\u0441 \u0435\u0441\u0442\u044c \u0432\u0430\u043a\u0430\u043d\u0441\u0438\u044f &#171;\u0413\u0435\u043d\u0435\u0442\u0438\u043a&#187;, \u043c\u044b \u0433\u0435\u043d\u0435\u0440\u0438\u0440\u0443\u0435\u043c \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u0443 \u0434\u043b\u044f \u0440\u0435\u0433\u0438\u043e\u043d\u0430 &#171;\u0411\u0440\u044f\u043d\u0441\u043a\u0430\u044f \u043e\u0431\u043b\u0430\u0441\u0442\u044c&#187;, \u0442\u043e \u0435\u0441\u0442\u044c \u043d\u0430 \u0432\u044b\u0445\u043e\u0434\u0435 \u043c\u044b \u0445\u043e\u0442\u0438\u043c \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u044c \u043d\u0430\u0431\u043e\u0440 \u0440\u0430\u0437\u043b\u0438\u0447\u043d\u044b\u0445 \u0432\u0430\u0440\u0438\u0430\u043d\u0442\u043e\u0432 \u043a\u043e\u043d\u0442\u0435\u043d\u0442\u0430, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043c\u044b \u043f\u0440\u0438\u043c\u0435\u043d\u0438\u043b\u0438 \u0431\u044b \u0432 \u0442\u0435\u043b\u0435 \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u044b \u0441\u0430\u0439\u0442\u0430, \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e, \u0438 \u0432 \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u044f\u0445 \u0438\u043b\u0438 \u043f\u0438\u0441\u044c\u043c\u0430\u0445 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f\u043c\/\u043f\u043e\u0434\u043f\u0438\u0441\u0447\u0438\u043a\u0430\u043c:<\/p>\n<p><em>\u0412\u0430\u043a\u0430\u043d\u0441\u0438\u044f \u0433\u0435\u043d\u0435\u0442\u0438\u043a\u0430 \u0432 \u0411\u0440\u044f\u043d\u0441\u043a\u043e\u0439 \u043e\u0431\u043b\u0430\u0441\u0442\u0438<br \/>\u041c\u044b \u043d\u0430\u0448\u043b\u0438 5 \u0432\u0430\u043a\u0430\u043d\u0441\u0438\u0439 \u0433\u0435\u043d\u0435\u0442\u0438\u043a\u0430 \u0432 \u0411\u0440\u044f\u043d\u0441\u043a\u043e\u0439 \u043e\u0431\u043b\u0430\u0441\u0442\u0438<br \/>\u0420\u0430\u0431\u043e\u0442\u0430 \u0433\u0435\u043d\u0435\u0442\u0438\u043a\u043e\u043c, 32 \u0432\u0430\u043a\u0430\u043d\u0441\u0438\u0438<br \/>\u041f\u043e\u043c\u043e\u0436\u0435\u043c \u0433\u0435\u043d\u0435\u0442\u0438\u043a\u0443 \u043d\u0430\u0439\u0442\u0438 \u0440\u0430\u0431\u043e\u0442\u0443 \u0432 \u0411\u0440\u044f\u043d\u0441\u043a\u043e\u0439 \u043e\u0431\u043b\u0430\u0441\u0442\u0438<br \/>35 \u0432\u0430\u043a\u0430\u043d\u0441\u0438\u0439 \u0433\u0435\u043d\u0435\u0442\u0438\u043a\u0430 \u0432 \u0411\u0440\u044f\u043d\u0441\u043a\u0435<br \/>\u041f\u0440\u0435\u0434\u043b\u043e\u0436\u0435\u043d\u0438\u044f \u0440\u0430\u0431\u043e\u0442\u044b \u0433\u0435\u043d\u0435\u0442\u0438\u043a\u043e\u043c \u0432 \u0421\u0435\u0432\u0441\u043a\u0435 \u0411\u0440\u044f\u043d\u0441\u043a\u043e\u0439 \u043e\u0431\u043b\u0430\u0441\u0442\u0438, 21 \u0443\u043d\u0438\u043a\u0430\u043b\u044c\u043d\u0430\u044f \u0432\u0430\u043a\u0430\u043d\u0441\u0438\u044f<\/em><\/p>\n<p>\u0414\u043b\u044f SEO \u043c\u044b \u0431\u044b \u0441\u0433\u0435\u043d\u0435\u0440\u0438\u0440\u043e\u0432\u0430\u043b\u0438:<\/p>\n<ol>\n<li>\n<p><strong>title<\/strong>: <em>\u0420\u0430\u0431\u043e\u0442\u0430 \u0433\u0435\u043d\u0435\u0442\u0438\u043a\u043e\u043c \u0432 \u0411\u0440\u044f\u043d\u0441\u043a\u043e\u0439 \u043e\u0431\u043b\u0430\u0441\u0442\u0438, 175 \u0443\u043d\u0438\u043a\u0430\u043b\u044c\u043d\u044b\u0445 \u0432\u0430\u043a\u0430\u043d\u0441\u0438\u0439;<\/em><\/p>\n<\/li>\n<li>\n<p><strong>h1<\/strong>: <em>\u0420\u0430\u0431\u043e\u0442\u0430 \u0433\u0435\u043d\u0435\u0442\u0438\u043a\u043e\u043c \u0432 \u0411\u0440\u044f\u043d\u0441\u043a\u043e\u0439 \u043e\u0431\u043b\u0430\u0441\u0442\u0438, 175 \u0432\u0430\u043a\u0430\u043d\u0441\u0438\u0439;<\/em><\/p>\n<\/li>\n<li>\n<p><strong>description<\/strong>: <em>\u0420\u0430\u0431\u043e\u0442\u0430 \u0432 \u0410\u041f\u041a. \u0421\u0432\u0435\u0436\u0438\u0435 \u0432\u0430\u043a\u0430\u043d\u0441\u0438\u0438 \u0433\u0435\u043d\u0435\u0442\u0438\u043a\u0430 \u0432 \u0411\u0440\u044f\u043d\u0441\u043a\u043e\u0439 \u043e\u0431\u043b\u0430\u0441\u0442\u0438 \u043e\u0442 \u043f\u0440\u044f\u043c\u044b\u0445 \u0440\u0430\u0431\u043e\u0442\u043e\u0434\u0430\u0442\u0435\u043b\u0435\u0439. \u041c\u044b \u0441\u043e\u0431\u0440\u0430\u043b\u0438 175 \u0443\u043d\u0438\u043a\u0430\u043b\u044c\u043d\u044b\u0445 \u0432\u0430\u043a\u0430\u043d\u0441\u0438\u0439;<\/em><\/p>\n<\/li>\n<li>\n<p><strong>keywords<\/strong>: <em>\u0440\u0430\u0431\u043e\u0442\u0430 \u0433\u0435\u043d\u0435\u0442\u0438\u043a\u043e\u043c, \u0432\u0430\u043a\u0430\u043d\u0441\u0438\u0438 \u0433\u0435\u043d\u0435\u0442\u0438\u043a\u0430, \u0432\u0430\u043a\u0430\u043d\u0441\u0438\u0438 \u0430\u0441\u0441\u0438\u0441\u0442\u0435\u043d\u0442\u0430 \u0433\u0435\u043d\u0435\u0442\u0438\u043a\u0430, \u0440\u0430\u0431\u043e\u0442\u0430 \u0430\u0441\u0441\u0438\u0441\u0442\u0435\u043d\u0442\u043e\u043c \u0433\u0435\u043d\u0435\u0442\u0438\u043a\u0430, \u0432\u0430\u043a\u0430\u043d\u0441\u0438\u0438 \u0433\u0435\u043d\u0435\u0442\u0438\u043a.<\/em><\/p>\n<\/li>\n<\/ol>\n<hr\/>\n<h2>\u041a\u0430\u043a \u044d\u0442\u043e \u0441\u0434\u0435\u043b\u0430\u043b\u0438 \u043c\u044b?<\/h2>\n<p>\u041d\u0430\u0448 \u043f\u0440\u043e\u0435\u043a\u0442 \u043d\u0430\u043f\u0438\u0441\u0430\u043d \u043d\u0430 Laravel (PHP), \u0442\u0430\u043a \u0447\u0442\u043e \u0432\u0441\u0435 \u043f\u0440\u0438\u043c\u0435\u0440\u044b \u0431\u0443\u0434\u0443\u0442 \u043e\u043f\u0438\u0441\u0430\u043d\u044b \u0434\u043b\u044f Laravel.<\/p>\n<p>\u041d\u0430 \u0425\u0430\u0431\u0440\u0435 \u0443\u0436\u0435 \u0443\u043f\u043e\u043c\u0438\u043d\u0430\u043b\u0441\u044f \u043e\u0447\u0435\u043d\u044c \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u043d\u044b\u0439 \u0438 \u043f\u043e\u043b\u0435\u0437\u043d\u044b\u0439 \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442 \u0434\u043b\u044f \u043c\u043e\u0440\u0444\u043e\u043b\u043e\u0433\u0438\u0447\u0435\u0441\u043a\u043e\u0433\u043e \u0440\u0430\u0437\u0431\u043e\u0440\u0430 <a href=\"http:\/\/phpmorphy.sourceforge.net\/dokuwiki\/download\"><strong>phpMorphy<\/strong><\/a>, \u043d\u043e \u0441 \u0412\u0430\u0448\u0435\u0433\u043e \u0440\u0430\u0437\u0440\u0435\u0448\u0435\u043d\u0438\u044f \u043c\u044b \u043e\u043f\u0438\u0448\u0435\u043c \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u0443\u044e \u0432\u044b\u0436\u0438\u043c\u043a\u0443 \u043f\u043e \u0431\u044b\u0441\u0442\u0440\u043e\u043c\u0443 \u0441\u0442\u0430\u0440\u0442\u0443. <\/p>\n<p>\u0421\u043a\u0430\u0447\u0430\u0442\u044c \u0438 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u044c phpMorphy \u043c\u043e\u0436\u043d\u043e, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u0438\u0437 \u044d\u0442\u0438\u0445 2\u0445 \u0438\u0441\u0442\u043e\u0447\u043d\u0438\u043a\u043e\u0432:<\/p>\n<ul>\n<li>\n<p>\u0421 \u0432\u044b\u0431\u043e\u0440\u043e\u043c \u0441\u043b\u043e\u0432\u0430\u0440\u0435\u0439: <a href=\"http:\/\/phpmorphy.sourceforge.net\/dokuwiki\/download\">http:\/\/phpmorphy.sourceforge.net\/dokuwiki\/download<\/a><\/p>\n<\/li>\n<li>\n<p>\u0421 \u043f\u0440\u0435\u0434\u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043b\u0435\u043d\u043d\u044b\u043c\u0438 \u0441\u043b\u043e\u0432\u0430\u0440\u044f\u043c\u0438 (ru, en, de, ua): <a href=\"https:\/\/github.com\/cijic\/phpmorphy\">https:\/\/github.com\/cijic\/phpmorphy<\/a><\/p>\n<\/li>\n<\/ul>\n<p>\u0414\u043b\u044f \u0443\u043f\u0440\u043e\u0449\u0435\u043d\u0438\u044f \u0440\u0430\u0431\u043e\u0442\u044b \u0441 phpMorphy \u043c\u044b \u0441\u043e\u0437\u0434\u0430\u043b\u0438 \u0441\u0432\u043e\u0439 Helper.<\/p>\n<details class=\"spoiler\">\n<summary>\u041a\u043e\u0434 \u043d\u0430\u0448\u0435\u0433\u043e Helper&#8217;\u0430 (\u043a\u0430\u043a \u0435\u0441\u0442\u044c)<\/summary>\n<div class=\"spoiler__content\">\n<pre><code class=\"php\">&lt;?php namespace {\u0441\u043a\u0440\u044b\u0442\u043e}\\PhpMorphy\\Helpers;  use phpMorphy; use phpMorphy_Exception; use Log;  require_once(base_path('{\u0441\u043a\u0440\u044b\u0442\u043e}\/phpmorphy\/common.php'));  class Morphy {     const MORPHY_PATH = '{\u0441\u043a\u0440\u044b\u0442\u043e}\/phpmorphy';      const MORPHY_SKEEP_WORD_END_WITH = ['\u043a\u0430\u0431\u0430\u0440\u0434\u0438\u043d\u043e', '\u043a\u0430\u0440\u0430\u0447\u0430\u0435\u0432\u043e', '\u0445\u0430\u043d\u0442\u044b', '\u044f\u043c\u0430\u043b\u043e']; \/\/\u041f\u0440\u043e\u043f\u0443\u0441\u043a\u0430\u0442\u044c \u0441\u043b\u043e\u0432\u0430, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0437\u0430\u043a\u0430\u043d\u0447\u0438\u0432\u0430\u044e\u0442\u0441\u044f \u043d\u0430 \u043e\u0434\u0438\u043d \u0438\u0437 \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u043e\u0432 \u043c\u0430\u0441\u0441\u0438\u0432\u0430     const MORPHY_SKEEP_WORD_DELIMS = ['-']; \/\/\u0420\u0430\u0437\u0434\u0435\u043b\u0438\u0442\u0435\u043b\u0438 \u043f\u0440\u0438 \u043d\u0430\u0445\u043e\u0436\u0434\u0435\u043d\u0438\u0438 \u043a\u043e\u0442\u043e\u0440\u044b\u0445 \u043f\u0440\u0435\u043e\u0431\u0440\u0430\u0437\u0443\u0435\u043c \u0444\u0440\u0430\u0437\u0443 \u043f\u043e \u043a\u0430\u0436\u0434\u043e\u043c\u0443 \u0441\u043b\u043e\u0432\u0443 \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u043e      \/**      * \u0421\u043e\u0437\u0434\u0430\u043d\u0438\u0435 \u043a\u043b\u0430\u0441\u0441\u0430 Morphy \u0441 \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0430\u043c\u0438      *      * @return phpMorphy|void      *\/     public static function getMorphy(){         try {             $dir = base_path(self::MORPHY_PATH) . '\/dicts';             $lang = 'ru_RU';             $opts = array(                 \/\/ storage type, follow types supported                 \/\/ PHPMORPHY_STORAGE_FILE - use file operations(fread, fseek) for dictionary access, this is very slow...                 \/\/ PHPMORPHY_STORAGE_SHM - load dictionary in shared memory(using shmop php extension), this is preferred mode                 \/\/ PHPMORPHY_STORAGE_MEM - load dict to memory each time when phpMorphy intialized, this useful when shmop ext. not activated. Speed same as for PHPMORPHY_STORAGE_SHM type                 'storage' => PHPMORPHY_STORAGE_MEM,                 'predict_by_suffix' => true,                 'predict_by_db' => true,                 'graminfo_as_text' => true,             );             return new phpMorphy($dir, $lang, $opts);         } catch(phpMorphy_Exception $e) {             log::error('Morphy::getMorphy(): Error occured while creating phpMorphy instance: ' . $e->getMessage());         }     }      \/**      * \u041f\u043e\u043b\u0443\u0447\u0435\u043d\u0438\u0435 \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0433\u043e \u0434\u043b\u044f \u0447\u0438\u0441\u043b\u043e\u0432\u043e\u0433\u043e \u043e\u0431\u043e\u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f      * \u041f\u0440\u0438\u043c\u0435\u0440: 3 \u0432\u0430\u043a\u0430\u043d\u0441\u0438\u0438, 5 \u0432\u0430\u043a\u0430\u043d\u0441\u0438\u0439, 1 \u0437\u0430\u044f\u0432\u043b\u0435\u043d\u0438\u0435      *      * @param $count      * @param string $word      * @param null $morphy      * @return string      *\/     public static function getMorphedCount($count, string $word, $morphy = null): string     {         if (empty($morphy)) $morphy = self::getMorphy();         $word = mb_strtoupper($word);         $one = $morphy->castFormByGramInfo($word, null, ['\u0415\u0414', '\u0418\u041c'], true)[0] ?? '';         $twoFour = $morphy->castFormByGramInfo($word, null, ['\u0415\u0414', '\u0420\u0414'], true)[0] ?? '';         $fiveZero = $morphy->castFormByGramInfo($word, null, ['\u041c\u041d', '\u0420\u0414'], true)[0] ?? '';         switch (substr($count, -1)) {             case '1': $countStr = $one; break;             case '2':             case '3':             case '4': $countStr = $twoFour; break;             case '5':             case '6':             case '7':             case '8':             case '9':             case '0':             default: $countStr = $fiveZero;         }         return mb_strtolower($countStr);     }      \/**      * \u041f\u0440\u0435\u043e\u0431\u0440\u0430\u0437\u043e\u0432\u0430\u043d\u0438\u0435 \u0441\u043b\u043e\u0432\u0430 \u043a \u0443\u043a\u0430\u0437\u0430\u043d\u043d\u043e\u043c\u0443 \u043f\u0430\u0434\u0435\u0436\u0443 \u0438 \u0447\u0438\u0441\u043b\u0435\u043d\u043d\u043e\u0441\u0442\u0438      *      * @param $morphy      * @param string $word      * @param array $gramInfo      * @return string      *\/     public static function getMorphed($morphy, string $word, array $gramInfo): string     {         try {             $delims = collect(self::MORPHY_SKEEP_WORD_DELIMS);              $word = str_replace(' - ', '-', $word);              $delimsFounded = $delims->filter(function ($delim) use ($word){ return mb_strpos($word, $delim) !== false; });              if ($delimsFounded->count() > 0){                 \/\/\u041f\u0440\u0435\u043e\u0431\u0440\u0430\u0437\u043e\u0432\u0430\u043d\u0438\u0435 \u0444\u0440\u0430\u0437\u044b, \u0434\u0435\u043b\u0430\u0435\u043c \u043a\u0430\u0436\u0434\u043e\u0435 \u0441\u043b\u043e\u0432\u043e \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u043e                 $resultWord = '';                 $delimsFounded->each(function ($delim) use ($word, &amp;$result, $morphy, $gramInfo, &amp;$resultWord){                     $result = [];                     collect(explode($delim, $word))->each(function ($word) use (&amp;$result, $morphy, $gramInfo){                         $result[] = self::isWordEndWithSkipArr($word) ? $word : ($morphy->castFormByGramInfo(mb_strtoupper($word), null, $gramInfo, true)[0]??'');                     });                     $resultWord = implode($delim, $result);                 });                 return mb_strtolower($resultWord);             } else {                 \/\/\u041f\u0440\u0435\u043e\u0431\u0440\u0430\u0437\u043e\u0432\u0430\u043d\u0438\u0435 \u0441\u043b\u043e\u0432\u0430                 return mb_strtolower($morphy->castFormByGramInfo(mb_strtoupper($word), null, $gramInfo, true)[0] ?? '');             }         } catch (\\Throwable $err) {             \\Illuminate\\Support\\Facades\\Log::error('Morphy::getMorphed(): EXCEPTION. $word: '.$word.' $gramInfo: '.json_encode($gramInfo).' '.$err->getMessage(), ['ERROR' => $err->getMessage(), 'TRACE' => $err->getTrace()]);             return '';         }     }      \/**      * \u041f\u0440\u043e\u0432\u0435\u0440\u043a\u0430, \u0437\u0430\u043a\u0430\u043d\u0447\u0438\u0432\u0430\u0435\u0442\u0441\u044f \u043b\u0438 \u0441\u043b\u043e\u0432\u043e \u043d\u0430 \u043e\u0434\u043d\u043e \u0438\u0437 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0439 \u043c\u0430\u0441\u0441\u0438\u0432\u0430      *      * @param $word      * @return bool      *\/     public static function isWordEndWithSkipArr($word){         return collect(self::MORPHY_SKEEP_WORD_END_WITH)->filter(function ($skipLetter) use ($word){                 return ends_with(mb_strtolower($word), mb_strtolower($skipLetter));             })->count() > 0;     }      \/**      * \u041f\u0440\u0438\u0432\u0435\u0441\u0442\u0438 \u043f\u0435\u0440\u0432\u0443\u044e \u0431\u0443\u043a\u0432\u0430 \u0441\u043b\u043e\u0432\u0430 \u043a \u0432\u0435\u0440\u0445\u043d\u0435\u043c\u0443 \u0440\u0435\u0433\u0438\u0441\u0442\u0440\u0443 \u0432 \u043a\u043e\u0434\u0438\u0440\u043e\u0432\u043a\u0435 UTF-8      *      * @param $text      * @return string      *\/     public static function mb_ucfirst($text): string     {         try {             $text = mb_strtolower($text);             return mb_strtoupper(mb_substr($text, 0, 1)) . mb_substr($text, 1);         } catch (\\Throwable $err) {             \\Illuminate\\Support\\Facades\\Log::error('Morphy::mb_ucfirst(): EXCEPTION. $text: '.$text.' '.$err->getMessage(), ['ERROR' => $err->getMessage(), 'TRACE' => $err->getTrace()]);             return '';         }     }      \/**      * \u041f\u0440\u0438\u0432\u0435\u0441\u0442\u0438 \u043f\u0435\u0440\u0432\u0443\u044e \u0431\u0443\u043a\u0432\u0443 \u043a\u0430\u0436\u0434\u043e\u0433\u043e \u0441\u043b\u043e\u0432\u0430 \u0432 \u0441\u0442\u0440\u043e\u043a\u0435 \u043a \u0432\u0435\u0440\u0445\u043d\u0435\u043c\u0443 \u0440\u0435\u0433\u0438\u0441\u0442\u0440\u0443 \u0432 \u043a\u043e\u0434\u0438\u0440\u043e\u0432\u043a\u0435 UTF-8      *      * @param $text      * @return string      *\/     public static function mb_ucwords($text): string     {         try {             $text = mb_strtolower($text);             $result = [];             collect(explode(' ', $text))->each(function ($word) use (&amp;$result) {                 $result[] = self::mb_ucfirst($word);             });             return implode(' ', $result);         } catch (\\Throwable $err) {             \\Illuminate\\Support\\Facades\\Log::error('Morphy::mb_ucwords(): EXCEPTION. $text: '.$text.' '.$err->getMessage(), ['ERROR' => $err->getMessage(), 'TRACE' => $err->getTrace()]);             return '';         }     }      public static function getMorphedRegionName($morphy, string $regionName, bool $addV = true)     {         \/\/\u0412 \u0440\u0435\u0441\u043f\u0443\u0431\u043b\u0438\u043a\u0435         if (mb_strpos($regionName, ' ') === false) return $regionName;          $regionName = mb_strtoupper(str_replace(' \u2014 ','-', $regionName));          $result = $regionName;         $regionArr = explode(' ', $regionName);          $v = $addV ? '\u0432 ' : '';          if (mb_strpos($regionName, '\u0420\u0415\u0421\u041f\u0423\u0411\u041b\u0418\u041a\u0410') !== false){             if (starts_with($regionName, '\u0420\u0415\u0421\u041f\u0423\u0411\u041b\u0418\u041a\u0410')){                 \/\/\u0420\u0435\u0441\u043f\u0443\u0431\u043b\u0438\u043a\u0430 \u041a\u0440\u044b\u043c -> \u0432 \u0440\u0435\u0441\u043f\u0443\u0431\u043b\u0438\u043a\u0435 \u041a\u0440\u044b\u043c                 $result = $v.'\u0440\u0435\u0441\u043f\u0443\u0431\u043b\u0438\u043a\u0435 '.Morphy::mb_ucfirst(mb_strtolower(str_replace('\u0420\u0415\u0421\u041f\u0423\u0411\u041b\u0418\u041a\u0410 ', '', $regionName)));             } else {                 \/\/\u0427\u0443\u0432\u0430\u0448\u0441\u043a\u0430\u044f \u0420\u0435\u0441\u043f\u0443\u0431\u043b\u0438\u043a\u0430 -> \u0432 \u0427\u0443\u0432\u0430\u0448\u0441\u043a\u043e\u0439 \u0440\u0435\u0441\u043f\u0443\u0431\u043b\u0438\u043a\u0435                 $result = $v.Morphy::mb_ucfirst(Morphy::getMorphed($morphy, $regionArr[0], ['\u0415\u0414', '\u0416\u0420', '\u0420\u0414'])).' \u0440\u0435\u0441\u043f\u0443\u0431\u043b\u0438\u043a\u0435';             }          } elseif (mb_strpos($regionName, '\u041a\u0420\u0410\u0419') !== false){             \/\/\u0410\u043b\u0442\u0430\u0439\u0441\u043a\u0438\u0439 \u043a\u0440\u0430\u0439 -> \u0432 \u0410\u043b\u0442\u0430\u0439\u0441\u043a\u043e\u043c \u043a\u0440\u0430\u0435             $result =<\/code><\/pre>\n<\/div>\n<\/details>\n<\/div>\n<\/div>\n<\/div>\n<\/div>\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-338398","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/338398","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=338398"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/338398\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=338398"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=338398"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=338398"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}