{"id":27162,"date":"2017-10-22T13:38:54","date_gmt":"2017-10-22T10:38:54","guid":{"rendered":"http:\/\/kamil-abzalov.com\/tutorials\/php-oop-classes-inheritance\/"},"modified":"2020-04-10T23:46:47","modified_gmt":"2020-04-10T20:46:47","slug":"php-oop-classes-inheritance","status":"publish","type":"post","link":"https:\/\/kamil-abzalov.com\/en\/tutorials\/php\/php-oop-classes-inheritance\/","title":{"rendered":"PHP. OOP. Classes inheritance"},"content":{"rendered":"<p>[et_pb_section fb_built=&#8221;1&#8243; fullwidth=&#8221;on&#8221; _builder_version=&#8221;3.22&#8243;][et_pb_fullwidth_header title=&#8221;PHP. OOP. Classes inheritance&#8221; _builder_version=&#8221;3.16&#8243; button_one_text_size__hover_enabled=&#8221;off&#8221; button_two_text_size__hover_enabled=&#8221;off&#8221; button_one_text_color__hover_enabled=&#8221;off&#8221; button_two_text_color__hover_enabled=&#8221;off&#8221; button_one_border_width__hover_enabled=&#8221;off&#8221; button_two_border_width__hover_enabled=&#8221;off&#8221; button_one_border_color__hover_enabled=&#8221;off&#8221; button_two_border_color__hover_enabled=&#8221;off&#8221; button_one_border_radius__hover_enabled=&#8221;off&#8221; button_two_border_radius__hover_enabled=&#8221;off&#8221; button_one_letter_spacing__hover_enabled=&#8221;off&#8221; button_two_letter_spacing__hover_enabled=&#8221;off&#8221; button_one_bg_color__hover_enabled=&#8221;off&#8221; button_two_bg_color__hover_enabled=&#8221;off&#8221;][\/et_pb_fullwidth_header][\/et_pb_section][et_pb_section fb_built=&#8221;1&#8243; admin_label=&#8221;section&#8221; _builder_version=&#8221;3.22&#8243;][et_pb_row admin_label=&#8221;row&#8221; _builder_version=&#8221;3.25&#8243; background_size=&#8221;initial&#8221; background_position=&#8221;top_left&#8221; background_repeat=&#8221;repeat&#8221; custom_padding=&#8221;0px|||&#8221;][et_pb_column type=&#8221;4_4&#8243; _builder_version=&#8221;3.25&#8243; custom_padding=&#8221;|||&#8221; custom_padding__hover=&#8221;|||&#8221;][et_pb_dcsbcm_divi_breadcrumbs_module homebreadcrumbtext=&#8221;Home&#8221; hide_currentbreadcrumb=&#8221;off&#8221; _builder_version=&#8221;4.4.2&#8243; custom_padding=&#8221;0px|||&#8221; hover_enabled=&#8221;0&#8243; fontsbreadcrumbs_font_size_tablet=&#8221;51&#8243; fontsbreadcrumbs_line_height_tablet=&#8221;2&#8243; fontsseperator_font_size_tablet=&#8221;51&#8243; fontsseperator_line_height_tablet=&#8221;2&#8243; fontsbreadcrumblinks_font_size_tablet=&#8221;51&#8243; fontsbreadcrumblinks_line_height_tablet=&#8221;2&#8243;][\/et_pb_dcsbcm_divi_breadcrumbs_module][et_pb_text _builder_version=&#8221;3.27.4&#8243; border_style=&#8221;solid&#8221;]In this lesson we&#8217;ll continue to learn OOP in PHP. I recommend you to watch <a href=\"https:\/\/kamil-abzalov.com\/en\/tutorials\/php-tuts\/php-intro-to-oop-classes-objects-constructors\/\" target=\"_blank\" rel=\"noopener noreferrer\">last lesson<\/a> for your understanding of toda topic. Today we&#8217;ll discuss classes inheritance. Inheritance in php oop is one of the basic and key concept. Two others are encapsulation and polymorphism. We also will learn it today.<br \/>\n[\/et_pb_text][et_pb_video src=&#8221;https:\/\/youtu.be\/LbuJsspcyFk&#8221; _builder_version=&#8221;3.0.83&#8243;][\/et_pb_video][et_pb_text _builder_version=&#8221;3.27.4&#8243; border_style=&#8221;solid&#8221;]Let&#8217;s begin from theory &#8211; tha basics concepts of oop in php are encapsulation, inheritance and polymorphism.<\/p>\n<p><strong>Encapsulation\u00a0<\/strong>is capability object or class to hide its internal implementation. They only give user public methods &#8211; interface of class. For example in real life you don&#8217;t ask yourself how computer saves your data. Because you have got &#8220;ready to use&#8221; tools &#8211; keyboard, mouse and other, which are interface between you and computer. In oop this interface is classes methods.<\/p>\n<p><strong>Inheritance,\u00a0<\/strong>I am sure, is clear from the title. Class can inherit properties and methods from another class. For example, we inherited a lot from our parents.<\/p>\n<p><strong>Polymorphism\u00a0<\/strong>is connected wth inheritance. It is object capability to redefine methods of parent classes. For example, in code below we redefined setName() method.<\/p>\n<p>I would like to notice several important things:<br \/>\ntry to follow the rule &#8220;one class in one file&#8221;, don&#8217;t define several classes in one file.<br \/>\nIn child class you can call parent constructor, using <strong>parent::\u00a0<\/strong>keyword.<\/p>\n<p>Last, I recommned you to read &lt;a href=&#8221;http:\/\/php.net\/manual\/en\/language.oop5.php&#8221; target=&#8221;_blank&#8221;&gt;oop php chapter.&lt;\/a&gt;. I think, this chapter is described with difficult style, you need write some other articles with php\u00a0 oop topic.<br \/>\n[\/et_pb_text][et_pb_dmb_code_snippet title=&#8221;Code lesson&#8221; code=&#8221;PD9waHAKCi8qCioqINCd0LDRgdC70LXQtNC+0LLQsNC90LjQtSDQutC70LDRgdGB0L7QsiAo0L3QsNGB0LvQtdC00L7QstCw0YLRjCDQvNC+0LbQvdC+INGC0L7Qu9GM0LrQviDQvtC00LjQvSDQutC70LDRgdGBKQoqKiDQldGB0YLRjCDQvdC10LPQu9Cw0YHQvdC+0LUg0YLRgNC10LHQvtCy0LDQvdC40LUgLSAi0L7QtNC40L0g0LrQu9Cw0YHRgSAtINC+0LTQuNC9INGE0LDQudC7IgoqKiDQn9C10YDQtdC+0L\/RgNC10LTQtdC70LXQvdC40LUg0YHQstC+0LnRgdGC0LIg0Lgg0LzQtdGC0L7QtNC+0LIKKiog0J\/QtdGA0LXQvtC\/0YDQtdC00LXQu9C10L3QuNC1INC4INC\/0L7RgNGP0LTQvtC6INCy0YvQt9C+0LLQsCDQutC+0L3RgdGC0YDRg9C60YLQvtGA0LAKKiog0JTQtdGB0YLRgNGD0LrRgtC+0YDRiyAtINCy0YvQt9GL0LLQsNGO0YLRgdGPINC\/0L7RgdC70LUg0L7QutC+0L3Rh9Cw0L3QuNGPINGA0LDQsdC+0YLRiyDRgdC60YDQuNC\/0YLQsCwg0LjQu9C4INC10YHQu9C4INC90LAg0L7QsdGK0LXQutGCINCx0L7Qu9GM0YjQtQoqKi8KCmNsYXNzIE1hbiB7CgogICA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igka2FtaWwpOwplY2hvICI8YnI+IjsKCiRrYW1pbC0+c2V0TmFtZSgi0JrQsNC80LjQu9GMIik7CgpwcmludF9yKCRrYW1pbCk7CmVjaG8gIjxicj4iOwo=&#8221; admin_label=&#8221;\u041a\u043e\u0434 \u0443\u0440\u043e\u043a\u0430&#8221; style=&#8221;docco&#8221; linenums=&#8221;on&#8221; usetabwidth=&#8221;on&#8221; tabwidth=&#8221;4&#8243; _builder_version=&#8221;4.4.2&#8243; hover_enabled=&#8221;0&#8243;]PD9waHAKCi8qCioqINCd0LDRgdC70LXQtNC+0LLQsNC90LjQtSDQutC70LDRgdGB0L7QsiAo0L3QsNGB0LvQtdC00L7QstCw0YLRjCDQvNC+0LbQvdC+INGC0L7Qu9GM0LrQviDQvtC00LjQvSDQutC70LDRgdGBKQoqKiDQldGB0YLRjCDQvdC10LPQu9Cw0YHQvdC+0LUg0YLRgNC10LHQvtCy0LDQvdC40LUgLSAi0L7QtNC40L0g0LrQu9Cw0YHRgSAtINC+0LTQuNC9INGE0LDQudC7IgoqKiDQn9C10YDQtdC+0L\/RgNC10LTQtdC70LXQvdC40LUg0YHQstC+0LnRgdGC0LIg0Lgg0LzQtdGC0L7QtNC+0LIKKiog0J\/QtdGA0LXQvtC\/0YDQtdC00LXQu9C10L3QuNC1INC4INC\/0L7RgNGP0LTQvtC6INCy0YvQt9C+0LLQsCDQutC+0L3RgdGC0YDRg9C60YLQvtGA0LAKKiog0JTQtdGB0YLRgNGD0LrRgtC+0YDRiyAtINCy0YvQt9GL0LLQsNGO0YLRgdGPINC\/0L7RgdC70LUg0L7QutC+0L3Rh9Cw0L3QuNGPINGA0LDQsdC+0YLRiyDRgdC60YDQuNC\/0YLQsCwg0LjQu9C4INC10YHQu9C4INC90LAg0L7QsdGK0LXQutGCINCx0L7Qu9GM0YjQtQoqKi8KCmNsYXNzIE1hbiB7CgogICAgcHVibGljICRuYW1lOwogICAgcHVibGljICRhZ2UgPSAyNzsKCiAgICBwdWJsaWMgZn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LjQu9GMIik7CgpwcmludF9yKCRrYW1pbCk7CmVjaG8gIjxicj4iOwo=[\/et_pb_dmb_code_snippet][et_pb_comments _builder_version=&#8221;4.4.2&#8243; custom_margin=&#8221;30px||||false|false&#8221; hover_enabled=&#8221;0&#8243;][\/et_pb_comments][\/et_pb_column][\/et_pb_row][\/et_pb_section]<\/p>\n","protected":false},"excerpt":{"rendered":"<p>In this lesson we&#8217;ll continue to learn OOP in PHP. I recommend you to watch last lesson for your understanding of toda topic. Today we&#8217;ll discuss classes inheritance. Inheritance in php oop is one of the basic and key concept. Two others are encapsulation and polymorphism. We also will learn it today. Let&#8217;s begin from [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_et_pb_use_builder":"on","_et_pb_old_content":"","_et_gb_content_width":"","footnotes":""},"categories":[273,219],"tags":[240],"class_list":["post-27162","post","type-post","status-publish","format-standard","hentry","category-php","category-tutorials","tag-php-en"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.4 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>PHP. OOP. Classes inheritance - Kamil Abzalov&#039;s blog<\/title>\n<meta name=\"description\" content=\"Today we will discuss php classes inheritance in OOP paradigm. The key concept of inheritance is there are parent classes and child classes\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/kamil-abzalov.com\/videouroki\/php\/php-oop-classes-inheritance\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"PHP. OOP. Classes inheritance - Kamil Abzalov&#039;s blog\" \/>\n<meta property=\"og:description\" content=\"Today we will discuss php classes inheritance in OOP paradigm. The key concept of inheritance is there are parent classes and child classes\" \/>\n<meta property=\"og:url\" content=\"https:\/\/kamil-abzalov.com\/videouroki\/php\/php-oop-classes-inheritance\/\" \/>\n<meta property=\"og:site_name\" content=\"\u0441\u0430\u0439\u0442 \u041a\u0430\u043c\u0438\u043b\u044f \u0410\u0431\u0437\u0430\u043b\u043e\u0432\u0430\" \/>\n<meta property=\"article:author\" content=\"https:\/\/www.facebook.com\/kamabzalov\" \/>\n<meta property=\"article:published_time\" content=\"2017-10-22T10:38:54+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2020-04-10T20:46:47+00:00\" \/>\n<meta name=\"author\" content=\"Kamil&#039; Abzalov\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:title\" content=\"PHP. OOP. Classes inheritance\" \/>\n<meta name=\"twitter:description\" content=\"Today we will discuss php classes inheritance in OOP paradigm. The key concept of inheritance is there are parent classes and child classes\" \/>\n<meta name=\"twitter:creator\" content=\"@kamabzalov\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Kamil&#039; Abzalov\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"5 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/kamil-abzalov.com\\\/videouroki\\\/php\\\/php-oop-classes-inheritance\\\/#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/kamil-abzalov.com\\\/videouroki\\\/php\\\/php-oop-classes-inheritance\\\/\"},\"author\":{\"name\":\"Kamil' Abzalov\",\"@id\":\"https:\\\/\\\/kamil-abzalov.com\\\/#\\\/schema\\\/person\\\/9c53360f21b83306ba40c2231573c600\"},\"headline\":\"PHP. OOP. Classes inheritance\",\"datePublished\":\"2017-10-22T10:38:54+00:00\",\"dateModified\":\"2020-04-10T20:46:47+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/kamil-abzalov.com\\\/videouroki\\\/php\\\/php-oop-classes-inheritance\\\/\"},\"wordCount\":1081,\"commentCount\":0,\"keywords\":[\"php\"],\"articleSection\":[\"PHP\",\"Tutorials\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\\\/\\\/kamil-abzalov.com\\\/videouroki\\\/php\\\/php-oop-classes-inheritance\\\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/kamil-abzalov.com\\\/videouroki\\\/php\\\/php-oop-classes-inheritance\\\/\",\"url\":\"https:\\\/\\\/kamil-abzalov.com\\\/videouroki\\\/php\\\/php-oop-classes-inheritance\\\/\",\"name\":\"PHP. OOP. Classes inheritance - Kamil Abzalov's blog\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/kamil-abzalov.com\\\/#website\"},\"datePublished\":\"2017-10-22T10:38:54+00:00\",\"dateModified\":\"2020-04-10T20:46:47+00:00\",\"author\":{\"@id\":\"https:\\\/\\\/kamil-abzalov.com\\\/#\\\/schema\\\/person\\\/9c53360f21b83306ba40c2231573c600\"},\"description\":\"Today we will discuss php classes inheritance in OOP paradigm. The key concept of inheritance is there are parent classes and child classes\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/kamil-abzalov.com\\\/videouroki\\\/php\\\/php-oop-classes-inheritance\\\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/kamil-abzalov.com\\\/videouroki\\\/php\\\/php-oop-classes-inheritance\\\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/kamil-abzalov.com\\\/videouroki\\\/php\\\/php-oop-classes-inheritance\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"\u0413\u043b\u0430\u0432\u043d\u0430\u044f \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u0430\",\"item\":\"https:\\\/\\\/kamil-abzalov.com\\\/en\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"PHP. OOP. Classes inheritance\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/kamil-abzalov.com\\\/#website\",\"url\":\"https:\\\/\\\/kamil-abzalov.com\\\/\",\"name\":\"\u0441\u0430\u0439\u0442 \u041a\u0430\u043c\u0438\u043b\u044f \u0410\u0431\u0437\u0430\u043b\u043e\u0432\u0430\",\"description\":\"\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/kamil-abzalov.com\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/kamil-abzalov.com\\\/#\\\/schema\\\/person\\\/9c53360f21b83306ba40c2231573c600\",\"name\":\"Kamil' Abzalov\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/3ad2daebcb3a4d03f8573b49054a003cd26a151ecc58ccfccc75b823131d1ead?s=96&d=mm&r=g\",\"url\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/3ad2daebcb3a4d03f8573b49054a003cd26a151ecc58ccfccc75b823131d1ead?s=96&d=mm&r=g\",\"contentUrl\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/3ad2daebcb3a4d03f8573b49054a003cd26a151ecc58ccfccc75b823131d1ead?s=96&d=mm&r=g\",\"caption\":\"Kamil' Abzalov\"},\"sameAs\":[\"https:\\\/\\\/kamil-abzalov.com\\\/\",\"https:\\\/\\\/www.facebook.com\\\/kamabzalov\",\"https:\\\/\\\/www.linkedin.com\\\/in\\\/kamabzalov\",\"https:\\\/\\\/x.com\\\/kamabzalov\",\"https:\\\/\\\/www.youtube.com\\\/user\\\/kamabzalov\"]}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"PHP. OOP. Classes inheritance - Kamil Abzalov's blog","description":"Today we will discuss php classes inheritance in OOP paradigm. The key concept of inheritance is there are parent classes and child classes","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/kamil-abzalov.com\/videouroki\/php\/php-oop-classes-inheritance\/","og_locale":"en_US","og_type":"article","og_title":"PHP. OOP. Classes inheritance - Kamil Abzalov's blog","og_description":"Today we will discuss php classes inheritance in OOP paradigm. The key concept of inheritance is there are parent classes and child classes","og_url":"https:\/\/kamil-abzalov.com\/videouroki\/php\/php-oop-classes-inheritance\/","og_site_name":"\u0441\u0430\u0439\u0442 \u041a\u0430\u043c\u0438\u043b\u044f \u0410\u0431\u0437\u0430\u043b\u043e\u0432\u0430","article_author":"https:\/\/www.facebook.com\/kamabzalov","article_published_time":"2017-10-22T10:38:54+00:00","article_modified_time":"2020-04-10T20:46:47+00:00","author":"Kamil' Abzalov","twitter_card":"summary_large_image","twitter_title":"PHP. OOP. Classes inheritance","twitter_description":"Today we will discuss php classes inheritance in OOP paradigm. The key concept of inheritance is there are parent classes and child classes","twitter_creator":"@kamabzalov","twitter_misc":{"Written by":"Kamil' Abzalov","Est. reading time":"5 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/kamil-abzalov.com\/videouroki\/php\/php-oop-classes-inheritance\/#article","isPartOf":{"@id":"https:\/\/kamil-abzalov.com\/videouroki\/php\/php-oop-classes-inheritance\/"},"author":{"name":"Kamil' Abzalov","@id":"https:\/\/kamil-abzalov.com\/#\/schema\/person\/9c53360f21b83306ba40c2231573c600"},"headline":"PHP. OOP. Classes inheritance","datePublished":"2017-10-22T10:38:54+00:00","dateModified":"2020-04-10T20:46:47+00:00","mainEntityOfPage":{"@id":"https:\/\/kamil-abzalov.com\/videouroki\/php\/php-oop-classes-inheritance\/"},"wordCount":1081,"commentCount":0,"keywords":["php"],"articleSection":["PHP","Tutorials"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/kamil-abzalov.com\/videouroki\/php\/php-oop-classes-inheritance\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/kamil-abzalov.com\/videouroki\/php\/php-oop-classes-inheritance\/","url":"https:\/\/kamil-abzalov.com\/videouroki\/php\/php-oop-classes-inheritance\/","name":"PHP. OOP. Classes inheritance - Kamil Abzalov's blog","isPartOf":{"@id":"https:\/\/kamil-abzalov.com\/#website"},"datePublished":"2017-10-22T10:38:54+00:00","dateModified":"2020-04-10T20:46:47+00:00","author":{"@id":"https:\/\/kamil-abzalov.com\/#\/schema\/person\/9c53360f21b83306ba40c2231573c600"},"description":"Today we will discuss php classes inheritance in OOP paradigm. The key concept of inheritance is there are parent classes and child classes","breadcrumb":{"@id":"https:\/\/kamil-abzalov.com\/videouroki\/php\/php-oop-classes-inheritance\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/kamil-abzalov.com\/videouroki\/php\/php-oop-classes-inheritance\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/kamil-abzalov.com\/videouroki\/php\/php-oop-classes-inheritance\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"\u0413\u043b\u0430\u0432\u043d\u0430\u044f \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u0430","item":"https:\/\/kamil-abzalov.com\/en\/"},{"@type":"ListItem","position":2,"name":"PHP. OOP. Classes inheritance"}]},{"@type":"WebSite","@id":"https:\/\/kamil-abzalov.com\/#website","url":"https:\/\/kamil-abzalov.com\/","name":"\u0441\u0430\u0439\u0442 \u041a\u0430\u043c\u0438\u043b\u044f \u0410\u0431\u0437\u0430\u043b\u043e\u0432\u0430","description":"","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/kamil-abzalov.com\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Person","@id":"https:\/\/kamil-abzalov.com\/#\/schema\/person\/9c53360f21b83306ba40c2231573c600","name":"Kamil' Abzalov","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/secure.gravatar.com\/avatar\/3ad2daebcb3a4d03f8573b49054a003cd26a151ecc58ccfccc75b823131d1ead?s=96&d=mm&r=g","url":"https:\/\/secure.gravatar.com\/avatar\/3ad2daebcb3a4d03f8573b49054a003cd26a151ecc58ccfccc75b823131d1ead?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/3ad2daebcb3a4d03f8573b49054a003cd26a151ecc58ccfccc75b823131d1ead?s=96&d=mm&r=g","caption":"Kamil' Abzalov"},"sameAs":["https:\/\/kamil-abzalov.com\/","https:\/\/www.facebook.com\/kamabzalov","https:\/\/www.linkedin.com\/in\/kamabzalov","https:\/\/x.com\/kamabzalov","https:\/\/www.youtube.com\/user\/kamabzalov"]}]}},"_links":{"self":[{"href":"https:\/\/kamil-abzalov.com\/en\/wp-json\/wp\/v2\/posts\/27162","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/kamil-abzalov.com\/en\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/kamil-abzalov.com\/en\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/kamil-abzalov.com\/en\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/kamil-abzalov.com\/en\/wp-json\/wp\/v2\/comments?post=27162"}],"version-history":[{"count":11,"href":"https:\/\/kamil-abzalov.com\/en\/wp-json\/wp\/v2\/posts\/27162\/revisions"}],"predecessor-version":[{"id":31946,"href":"https:\/\/kamil-abzalov.com\/en\/wp-json\/wp\/v2\/posts\/27162\/revisions\/31946"}],"wp:attachment":[{"href":"https:\/\/kamil-abzalov.com\/en\/wp-json\/wp\/v2\/media?parent=27162"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/kamil-abzalov.com\/en\/wp-json\/wp\/v2\/categories?post=27162"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/kamil-abzalov.com\/en\/wp-json\/wp\/v2\/tags?post=27162"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}