{"id":629,"date":"2020-05-23T12:47:05","date_gmt":"2020-05-23T09:47:05","guid":{"rendered":"https:\/\/ek.oa.edu.ua\/Kukhta\/test3\/?p=629"},"modified":"2020-05-25T08:54:57","modified_gmt":"2020-05-25T05:54:57","slug":"interfejsy","status":"publish","type":"post","link":"https:\/\/ithub.oa.edu.ua\/webdev\/php\/interfejsy\/","title":{"rendered":"\u0406\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441\u0438"},"content":{"rendered":"<p>\u0417 \u0434\u043e\u043f\u043e\u043c\u043e\u0433\u043e\u044e \u0456\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441\u0456\u0432 \u043c\u043e\u0436\u043d\u0430 \u043e\u043f\u0438\u0441\u0430\u0442\u0438 \u043c\u0435\u0442\u043e\u0434\u0438, \u044f\u043a\u0456 \u043f\u043e\u0432\u0438\u043d\u043d\u0456 \u0431\u0443\u0442\u0438 \u0440\u0435\u0430\u043b\u0456\u0437\u043e\u0432\u0430\u043d\u0456 \u0432 \u043a\u043b\u0430\u0441\u0456 \u0431\u0435\u0437 \u043d\u0435\u043e\u0431\u0445\u0456\u0434\u043d\u043e\u0441\u0442\u0456 \u043e\u043f\u0438\u0441\u0443 \u0457\u0445 \u0444\u0443\u043d\u043a\u0446\u0456\u043e\u043d\u0430\u043b\u0443.<\/p>\n<p>\u0406\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441\u0438 \u043e\u0433\u043e\u043b\u043e\u0448\u0443\u044e\u0442\u044c\u0441\u044f \u0442\u0430\u043a \u0441\u0430\u043c\u043e, \u044f\u043a \u0456 \u0437\u0432\u0438\u0447\u0430\u0439\u043d\u0456 \u043a\u043b\u0430\u0441\u0438, \u0430\u043b\u0435 \u0437 \u0432\u0438\u043a\u043e\u0440\u0438\u0441\u0442\u0430\u043d\u043d\u044f\u043c \u043a\u043b\u044e\u0447\u043e\u0432\u043e\u0433\u043e \u0441\u043b\u043e\u0432\u0430 interface. \u0422\u0456\u043b\u0430 \u043c\u0435\u0442\u043e\u0434\u0456\u0432 \u0456\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441\u0456\u0432 \u043f\u043e\u0432\u0438\u043d\u043d\u0456 \u0431\u0443\u0442\u0438 \u043f\u043e\u0440\u043e\u0436\u043d\u0456\u043c\u0438.<\/p>\n<p>\u041c\u0435\u0442\u043e\u0434\u0438, \u0432\u0441\u0435\u0440\u0435\u0434\u0438\u043d\u0456 \u0456\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441\u0443, \u043f\u043e\u0432\u0438\u043d\u043d\u0456 \u0431\u0443\u0442\u0438 \u0432\u0438\u0437\u043d\u0430\u0447\u0435\u043d\u0456 \u044f\u043a \u043f\u0443\u0431\u043b\u0456\u0447\u043d\u0456.<\/p>\n<p>\u041f\u0440\u0438\u043a\u043b\u0430\u0434 \u043e\u043f\u0438\u0441\u0443 \u0456\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441\u0443:<\/p>\n<pre class=\"prettyprint linenums\">&lt;?php\r\n\/\/ \u041e\u0433\u043e\u043b\u043e\u0441\u0438\u043c\u043e \u0456\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441 'CarTemplate'\r\ninterface CarTemplate\r\n{\r\n\u00a0 \u00a0 \u00a0public function getId(); \/\/ \u043e\u0442\u0440\u0438\u043c\u0430\u0442\u0438 id \u0430\u0432\u0442\u043e\u043c\u043e\u0431\u0456\u043b\u044f\r\n\u00a0 \u00a0 \u00a0public function getName(); \/\/ \u043e\u0442\u0440\u0438\u043c\u0430\u0442\u0438 \u043d\u0430\u0437\u0432\u0443\r\n\u00a0 \u00a0 \u00a0public function add(); \/\/ \u0434\u043e\u0434\u0430\u0442\u0438 \u043d\u043e\u0432\u0438\u0439 \u0430\u0432\u0442\u043e\u043c\u043e\u0431\u0456\u043b\u044c\r\n}\r\n?&gt;<\/pre>\n<p>\u0414\u043b\u044f \u0440\u0435\u0430\u043b\u0456\u0437\u0430\u0446\u0456\u0457 \u0456\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441\u0443 \u0432\u0438\u043a\u043e\u0440\u0438\u0441\u0442\u043e\u0432\u0443\u0454\u0442\u044c\u0441\u044f \u043e\u043f\u0435\u0440\u0430\u0442\u043e\u0440 <strong>implements<\/strong>. \u041a\u043b\u0430\u0441 \u043f\u043e\u0432\u0438\u043d\u0435\u043d \u0440\u0435\u0430\u043b\u0456\u0437\u0443\u0432\u0430\u0442\u0438 \u0432\u0441\u0456 \u043c\u0435\u0442\u043e\u0434\u0438, \u043e\u043f\u0438\u0441\u0430\u043d\u0456 \u0432 \u0456\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441\u0456; \u0456\u043d\u0430\u043a\u0448\u0435 \u0441\u0442\u0430\u043d\u0435\u0442\u044c\u0441\u044f \u0444\u0430\u0442\u0430\u043b\u044c\u043d\u0430 \u043f\u043e\u043c\u0438\u043b\u043a\u0430. \u042f\u043a\u0449\u043e \u043f\u043e\u0442\u0440\u0456\u0431\u043d\u043e, \u0442\u043e \u043a\u043b\u0430\u0441\u0438 \u043c\u043e\u0436\u0443\u0442\u044c \u0440\u0435\u0430\u043b\u0456\u0437\u043e\u0432\u0443\u0432\u0430\u0442\u0438 \u0431\u0456\u043b\u044c\u0448\u0435 \u043e\u0434\u043d\u043e\u0433\u043e \u0456\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441\u0443, \u0440\u0435\u0430\u043b\u0456\u0437\u043e\u0432\u0430\u043d\u0456 \u0456\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441\u0438 \u043f\u043e\u0432\u0438\u043d\u043d\u0456 \u0440\u043e\u0437\u0434\u0456\u043b\u044f\u0442\u0438\u0441\u044f \u043a\u043e\u043c\u043e\u044e.<\/p>\n<p>\u041f\u0440\u0438\u043a\u043b\u0430\u0434:<\/p>\n<pre class=\"prettyprint linenums\">&lt;?php\r\n\/\/ \u041e\u0433\u043e\u043b\u043e\u0441\u0438\u043c\u043e \u0456\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441 'CarTemplate'\r\nclass Audi implements CarTemplate {\r\n\u00a0 \u00a0 \u00a0function getId() {\r\n\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 return \"1-ATHD98\";\r\n\u00a0 \u00a0 \u00a0}\r\n\r\n\u00a0 \u00a0 \u00a0function getName() {\r\n\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 return \"Audi\";\r\n\u00a0 \u00a0 \u00a0}\r\n\r\n\u00a0 \u00a0 \u00a0function add() {\r\n\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \/\/ \r\n\u00a0 \u00a0 \u00a0}\r\n}\r\n\r\n\r\nclass Bmw implements CarTemplate {\r\n\u00a0 \u00a0 \u00a0function getId() {\r\n\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 return \"2-HHFY14\";\r\n\u00a0 \u00a0 \u00a0}\r\n\r\n\u00a0 \u00a0 \u00a0function getName() {\r\n\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 return \"BMW\";\r\n\u00a0 \u00a0 \u00a0}\r\n\r\n\u00a0 \u00a0 \u00a0function add() {\r\n\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \/\/ \r\n\u00a0 \u00a0 \u00a0}\r\n\r\n}\r\n<span class=\"hljs-preprocessor\">?&gt;<\/span><\/pre>\n<p>\u0414\u0443\u043c\u0430\u044e, \u0441\u0443\u0442\u044c \u0437\u0440\u043e\u0437\u0443\u043c\u0456\u043b\u0430.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u0417 \u0434\u043e\u043f\u043e\u043c\u043e\u0433\u043e\u044e \u0456\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441\u0456\u0432 \u043c\u043e\u0436\u043d\u0430 \u043e\u043f\u0438\u0441\u0430\u0442\u0438 \u043c\u0435\u0442\u043e\u0434\u0438, \u044f\u043a\u0456 \u043f\u043e\u0432\u0438\u043d\u043d\u0456 \u0431\u0443\u0442\u0438 \u0440\u0435\u0430\u043b\u0456\u0437\u043e\u0432\u0430\u043d\u0456 \u0432 \u043a\u043b\u0430\u0441\u0456 \u0431\u0435\u0437 \u043d\u0435\u043e\u0431\u0445\u0456\u0434\u043d\u043e\u0441\u0442\u0456 \u043e\u043f\u0438\u0441\u0443 \u0457\u0445 \u0444\u0443\u043d\u043a\u0446\u0456\u043e\u043d\u0430\u043b\u0443. \u0406\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441\u0438 \u043e\u0433\u043e\u043b\u043e\u0448\u0443\u044e\u0442\u044c\u0441\u044f \u0442\u0430\u043a \u0441\u0430\u043c\u043e, \u044f\u043a \u0456 \u0437\u0432\u0438\u0447\u0430\u0439\u043d\u0456 \u043a\u043b\u0430\u0441\u0438, \u0430\u043b\u0435 \u0437 \u0432\u0438\u043a\u043e\u0440\u0438\u0441\u0442\u0430\u043d\u043d\u044f\u043c \u043a\u043b\u044e\u0447\u043e\u0432\u043e\u0433\u043e \u0441\u043b\u043e\u0432\u0430 interface. \u0422\u0456\u043b\u0430 \u043c\u0435\u0442\u043e\u0434\u0456\u0432 \u0456\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441\u0456\u0432 \u043f\u043e\u0432\u0438\u043d\u043d\u0456 \u0431\u0443\u0442\u0438 \u043f\u043e\u0440\u043e\u0436\u043d\u0456\u043c\u0438. \u041c\u0435\u0442\u043e\u0434\u0438, \u0432\u0441\u0435\u0440\u0435\u0434\u0438\u043d\u0456 \u0456\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441\u0443, \u043f\u043e\u0432\u0438\u043d\u043d\u0456 \u0431\u0443\u0442\u0438 \u0432\u0438\u0437\u043d\u0430\u0447\u0435\u043d\u0456 \u044f\u043a \u043f\u0443\u0431\u043b\u0456\u0447\u043d\u0456. \u041f\u0440\u0438\u043a\u043b\u0430\u0434 \u043e\u043f\u0438\u0441\u0443 \u0456\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441\u0443: &lt;?php \/\/ \u041e\u0433\u043e\u043b\u043e\u0441\u0438\u043c\u043e \u0456\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441 &#8216;CarTemplate&#8217; interface CarTemplate [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[22],"tags":[],"class_list":["post-629","post","type-post","status-publish","format-standard","hentry","category-oop"],"_links":{"self":[{"href":"https:\/\/ithub.oa.edu.ua\/webdev\/php\/wp-json\/wp\/v2\/posts\/629","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/ithub.oa.edu.ua\/webdev\/php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/ithub.oa.edu.ua\/webdev\/php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/ithub.oa.edu.ua\/webdev\/php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/ithub.oa.edu.ua\/webdev\/php\/wp-json\/wp\/v2\/comments?post=629"}],"version-history":[{"count":2,"href":"https:\/\/ithub.oa.edu.ua\/webdev\/php\/wp-json\/wp\/v2\/posts\/629\/revisions"}],"predecessor-version":[{"id":681,"href":"https:\/\/ithub.oa.edu.ua\/webdev\/php\/wp-json\/wp\/v2\/posts\/629\/revisions\/681"}],"wp:attachment":[{"href":"https:\/\/ithub.oa.edu.ua\/webdev\/php\/wp-json\/wp\/v2\/media?parent=629"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/ithub.oa.edu.ua\/webdev\/php\/wp-json\/wp\/v2\/categories?post=629"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/ithub.oa.edu.ua\/webdev\/php\/wp-json\/wp\/v2\/tags?post=629"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}