{"id":92896,"date":"2017-08-19T16:44:22","date_gmt":"2017-08-19T16:44:22","guid":{"rendered":"https:\/\/webkul.com\/blog\/?p=92896"},"modified":"2024-03-06T09:50:10","modified_gmt":"2024-03-06T09:50:10","slug":"magento2-object-pool-pattern","status":"publish","type":"post","link":"https:\/\/webkul.com\/blog\/magento2-object-pool-pattern\/","title":{"rendered":"Magento2 Object Pool Pattern"},"content":{"rendered":"\n<h1 class=\"wp-block-heading\">Introduction<\/h1>\n\n\n\n<p>Magento2 introduced us with many design patterns, I have also discussed some of them in my previous articles:<\/p>\n\n\n\n<figure class=\"wp-block-embed is-type-photo is-provider-webkul-blog wp-block-embed-webkul-blog\"><div class=\"wp-block-embed__wrapper\">\nhttps:\/\/webkul.com\/blog\/dependency-injection\/\n<\/div><\/figure>\n\n\n\n<figure class=\"wp-block-embed is-type-photo is-provider-webkul-blog wp-block-embed-webkul-blog\"><div class=\"wp-block-embed__wrapper\">\nhttps:\/\/webkul.com\/blog\/magento2-repository-design-pattern\/\n<\/div><\/figure>\n\n\n\n<figure class=\"wp-block-embed is-type-photo is-provider-webkul-blog wp-block-embed-webkul-blog\"><div class=\"wp-block-embed__wrapper\">\nhttps:\/\/webkul.com\/blog\/magento2-service-contract\/\n<\/div><\/figure>\n\n\n\n<figure class=\"wp-block-embed is-type-photo is-provider-webkul-blog wp-block-embed-webkul-blog\"><div class=\"wp-block-embed__wrapper\">\nhttps:\/\/webkul.com\/blog\/magento2-proxy-design-pattern-code-generation\/\n<\/div><\/figure>\n\n\n\n<p>Today we will be discussing another design pattern Object Pool Design pattern and how it is used in magento2.<\/p>\n\n\n\n<p>Object pools are set of&nbsp;objects that you don&#8217;t need to create or destroy, these objects are automatically available in your code pool, so you just need to use them.<\/p>\n\n\n\n<p><strong>What is the need of Object Pool?<\/strong><\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>you don&#8217;t need to create or destroy objects, they will be available by default.<\/li>\n\n\n\n<li>objects will not be loaded at the time of class loading, they will be only loaded when it will be demanded.<\/li>\n\n\n\n<li>object pools are very useful&nbsp;where you want to allow other modules to add there your own data, without having to make any changes in the core files, like config providers of the payment methods in magento2.<\/li>\n<\/ul>\n\n\n\n<p><strong>Let&#8217;s take an example of payment methods config provider:<\/strong><\/p>\n\n\n\n<p>If you are building a payment method, you need to write some knockout js code to make it available on the checkout page, we have already a blog on this:<\/p>\n\n\n\n<figure class=\"wp-block-embed is-type-photo is-provider-webkul-blog wp-block-embed-webkul-blog\"><div class=\"wp-block-embed__wrapper\">\nhttps:\/\/webkul.com\/blog\/create-custom-payment-method-magento2\/\n<\/div><\/figure>\n\n\n\n<p>And as most of you know, whom are working on magento2, you cannot mix knockout js templates with php\u00a0since they are pure js and html\u00a0files, so how to get the payment method configuration on the checkout page, since there can be many payment methods that are built by different vendors, so how Magento will know, what data they all want to use in their\u00a0payment method, since checkout page is same for all the methods it is pure knockout based, to resolve this issue magento2\u00a0uses object pool pattern here, now lets see how, below in magento2 checkout module class vendor\/magento\/module-checkout\/Model\/CompositeConfigProvider.php:<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\">&lt;?php\n\/**\n * Copyright \u00a9 Magento, Inc. All rights reserved.\n * See COPYING.txt for license details.\n *\/\nnamespace Magento\\Checkout\\Model;\n\n\/**\n * Composite checkout configuration provider.\n *\n * @see \\Magento\\Checkout\\Model\\ConfigProviderInterface\n * @api\n * @since 100.0.2\n *\/\nclass CompositeConfigProvider implements ConfigProviderInterface\n{\n    \/**\n     * @var ConfigProviderInterface&#091;]\n     *\/\n    private $configProviders;\n\n    \/**\n     * @param ConfigProviderInterface&#091;] $configProviders\n     * @codeCoverageIgnore\n     *\/\n    public function __construct(\n        array $configProviders\n    ) {\n        $this-&gt;configProviders = $configProviders;\n    }\n\n    \/**\n     * {@inheritdoc}\n     *\/\n    public function getConfig()\n    {\n        $config = &#091;];\n        foreach ($this-&gt;configProviders as $configProvider) {\n            $config = array_merge_recursive($config, $configProvider-&gt;getConfig());\n        }\n        return $config;\n    }\n}<\/pre>\n\n\n\n<p>The above class is responsible to provide all the payment methods configurations to checkout page, when you will see the get config method it iterate through this property $this->configProviders, basically this is an array of objects, it \u00a0iterates\u00a0through all the objects and calls the getConfig method, and getConfig\u00a0method probably returns an array and all these arrays are merged together and returned to the checkout view, where it is converted in json and set to a window scoped javascript variable so it can be accessed on whole checkout page. You can check this in this file\u00a0vendor\/magento\/module-checkout\/view\/frontend\/templates\/onepage.phtml, \u00a0but that&#8217;s not our concern, we still have a doubt about $this->configProviders, I am creating a payment method how do I am going to add my configuration object in this property, if you are working on magento2 you will all know using di.xml\u00a0file, lets see the frontend di.xml\u00a0file of checkout module:<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\">&lt;type name=&quot;Magento\\Checkout\\Model\\CompositeConfigProvider&quot;&gt;\n        &lt;arguments&gt;\n            &lt;argument name=&quot;configProviders&quot; xsi:type=&quot;array&quot;&gt;\n                &lt;item name=&quot;checkout_default_config_provider&quot; xsi:type=&quot;object&quot;&gt;Magento\\Checkout\\Model\\DefaultConfigProvider&lt;\/item&gt;\n            &lt;\/argument&gt;\n        &lt;\/arguments&gt;\n&lt;\/type&gt;<\/pre>\n\n\n\n<p>you can see in the above xml&nbsp; there is a default checkout config provider, which will be added to the configProviders&nbsp;property of the&nbsp;CompositeConfigProvider class at the time of class instantiation, similarly any configuration you want to add at checkout page, simply create a frontend di.xml&nbsp;file and and the above type declaration and add your item in the configProviders array.<\/p>\n\n\n\n<p>This is one example of object pool and its benifits, magento2 uses a lot of object pools, you might be seeing and using this for a long time without knowing how it works, but may be now you can understand.<\/p>\n\n\n\n<p>Let me know if you have any doubts in the above explanation, Thanks \ud83d\ude42<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Introduction Magento2 introduced us with many design patterns, I have also discussed some of them in my previous articles: Today we will be discussing another design pattern Object Pool Design pattern and how it is used in magento2. Object pools are set of&nbsp;objects that you don&#8217;t need to create or destroy, these objects are automatically <a href=\"https:\/\/webkul.com\/blog\/magento2-object-pool-pattern\/\">[&#8230;]<\/a><\/p>\n","protected":false},"author":33,"featured_media":70261,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[302,13],"tags":[],"class_list":["post-92896","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-magento2","category-php"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v24.5 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>Magento2 Object Pool Pattern - Webkul Blog<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/webkul.com\/blog\/magento2-object-pool-pattern\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Magento2 Object Pool Pattern - Webkul Blog\" \/>\n<meta property=\"og:description\" content=\"Introduction Magento2 introduced us with many design patterns, I have also discussed some of them in my previous articles: Today we will be discussing another design pattern Object Pool Design pattern and how it is used in magento2. Object pools are set of&nbsp;objects that you don&#8217;t need to create or destroy, these objects are automatically [...]\" \/>\n<meta property=\"og:url\" content=\"https:\/\/webkul.com\/blog\/magento2-object-pool-pattern\/\" \/>\n<meta property=\"og:site_name\" content=\"Webkul Blog\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/webkul\/\" \/>\n<meta property=\"article:published_time\" content=\"2017-08-19T16:44:22+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2024-03-06T09:50:10+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2017\/01\/Magneto-Code-Snippet.png\" \/>\n\t<meta property=\"og:image:width\" content=\"825\" \/>\n\t<meta property=\"og:image:height\" content=\"260\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/png\" \/>\n<meta name=\"author\" content=\"Ashutosh Srivastava\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@webkul\" \/>\n<meta name=\"twitter:site\" content=\"@webkul\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Ashutosh Srivastava\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"3 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/webkul.com\/blog\/magento2-object-pool-pattern\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/webkul.com\/blog\/magento2-object-pool-pattern\/\"},\"author\":{\"name\":\"Ashutosh Srivastava\",\"@id\":\"https:\/\/webkul.com\/blog\/#\/schema\/person\/5555025750ec4e4df34fadc78b083970\"},\"headline\":\"Magento2 Object Pool Pattern\",\"datePublished\":\"2017-08-19T16:44:22+00:00\",\"dateModified\":\"2024-03-06T09:50:10+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/webkul.com\/blog\/magento2-object-pool-pattern\/\"},\"wordCount\":610,\"commentCount\":1,\"publisher\":{\"@id\":\"https:\/\/webkul.com\/blog\/#organization\"},\"image\":{\"@id\":\"https:\/\/webkul.com\/blog\/magento2-object-pool-pattern\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2017\/01\/Magneto-Code-Snippet.png\",\"articleSection\":[\"Magento2\",\"php\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\/\/webkul.com\/blog\/magento2-object-pool-pattern\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/webkul.com\/blog\/magento2-object-pool-pattern\/\",\"url\":\"https:\/\/webkul.com\/blog\/magento2-object-pool-pattern\/\",\"name\":\"Magento2 Object Pool Pattern - Webkul Blog\",\"isPartOf\":{\"@id\":\"https:\/\/webkul.com\/blog\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/webkul.com\/blog\/magento2-object-pool-pattern\/#primaryimage\"},\"image\":{\"@id\":\"https:\/\/webkul.com\/blog\/magento2-object-pool-pattern\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2017\/01\/Magneto-Code-Snippet.png\",\"datePublished\":\"2017-08-19T16:44:22+00:00\",\"dateModified\":\"2024-03-06T09:50:10+00:00\",\"breadcrumb\":{\"@id\":\"https:\/\/webkul.com\/blog\/magento2-object-pool-pattern\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/webkul.com\/blog\/magento2-object-pool-pattern\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/webkul.com\/blog\/magento2-object-pool-pattern\/#primaryimage\",\"url\":\"https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2017\/01\/Magneto-Code-Snippet.png\",\"contentUrl\":\"https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2017\/01\/Magneto-Code-Snippet.png\",\"width\":825,\"height\":260},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/webkul.com\/blog\/magento2-object-pool-pattern\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/webkul.com\/blog\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Magento2 Object Pool Pattern\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/webkul.com\/blog\/#website\",\"url\":\"https:\/\/webkul.com\/blog\/\",\"name\":\"Webkul Blog\",\"description\":\"\",\"publisher\":{\"@id\":\"https:\/\/webkul.com\/blog\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/webkul.com\/blog\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\/\/webkul.com\/blog\/#organization\",\"name\":\"WebKul Software Private Limited\",\"url\":\"https:\/\/webkul.com\/blog\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/webkul.com\/blog\/#\/schema\/logo\/image\/\",\"url\":\"https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2021\/08\/webkul-logo-accent-sq.png\",\"contentUrl\":\"https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2021\/08\/webkul-logo-accent-sq.png\",\"width\":380,\"height\":380,\"caption\":\"WebKul Software Private Limited\"},\"image\":{\"@id\":\"https:\/\/webkul.com\/blog\/#\/schema\/logo\/image\/\"},\"sameAs\":[\"https:\/\/www.facebook.com\/webkul\/\",\"https:\/\/x.com\/webkul\",\"https:\/\/www.instagram.com\/webkul\/\",\"https:\/\/www.linkedin.com\/company\/webkul\",\"https:\/\/www.youtube.com\/user\/webkul\/\"]},{\"@type\":\"Person\",\"@id\":\"https:\/\/webkul.com\/blog\/#\/schema\/person\/5555025750ec4e4df34fadc78b083970\",\"name\":\"Ashutosh Srivastava\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/webkul.com\/blog\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/2f5312e6903909ffeb33aa5eb38e1c0bed8f498f92144f5f84065adf7e8708a6?s=96&d=https%3A%2F%2Fcdnblog.webkul.com%2Fblog%2Fwp-content%2Fuploads%2F2019%2F10%2Fmike.png&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/2f5312e6903909ffeb33aa5eb38e1c0bed8f498f92144f5f84065adf7e8708a6?s=96&d=https%3A%2F%2Fcdnblog.webkul.com%2Fblog%2Fwp-content%2Fuploads%2F2019%2F10%2Fmike.png&r=g\",\"caption\":\"Ashutosh Srivastava\"},\"sameAs\":[\"http:\/\/webkul.com\"],\"url\":\"https:\/\/webkul.com\/blog\/author\/ashutosh\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Magento2 Object Pool Pattern - Webkul Blog","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:\/\/webkul.com\/blog\/magento2-object-pool-pattern\/","og_locale":"en_US","og_type":"article","og_title":"Magento2 Object Pool Pattern - Webkul Blog","og_description":"Introduction Magento2 introduced us with many design patterns, I have also discussed some of them in my previous articles: Today we will be discussing another design pattern Object Pool Design pattern and how it is used in magento2. Object pools are set of&nbsp;objects that you don&#8217;t need to create or destroy, these objects are automatically [...]","og_url":"https:\/\/webkul.com\/blog\/magento2-object-pool-pattern\/","og_site_name":"Webkul Blog","article_publisher":"https:\/\/www.facebook.com\/webkul\/","article_published_time":"2017-08-19T16:44:22+00:00","article_modified_time":"2024-03-06T09:50:10+00:00","og_image":[{"width":825,"height":260,"url":"https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2017\/01\/Magneto-Code-Snippet.png","type":"image\/png"}],"author":"Ashutosh Srivastava","twitter_card":"summary_large_image","twitter_creator":"@webkul","twitter_site":"@webkul","twitter_misc":{"Written by":"Ashutosh Srivastava","Est. reading time":"3 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/webkul.com\/blog\/magento2-object-pool-pattern\/#article","isPartOf":{"@id":"https:\/\/webkul.com\/blog\/magento2-object-pool-pattern\/"},"author":{"name":"Ashutosh Srivastava","@id":"https:\/\/webkul.com\/blog\/#\/schema\/person\/5555025750ec4e4df34fadc78b083970"},"headline":"Magento2 Object Pool Pattern","datePublished":"2017-08-19T16:44:22+00:00","dateModified":"2024-03-06T09:50:10+00:00","mainEntityOfPage":{"@id":"https:\/\/webkul.com\/blog\/magento2-object-pool-pattern\/"},"wordCount":610,"commentCount":1,"publisher":{"@id":"https:\/\/webkul.com\/blog\/#organization"},"image":{"@id":"https:\/\/webkul.com\/blog\/magento2-object-pool-pattern\/#primaryimage"},"thumbnailUrl":"https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2017\/01\/Magneto-Code-Snippet.png","articleSection":["Magento2","php"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/webkul.com\/blog\/magento2-object-pool-pattern\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/webkul.com\/blog\/magento2-object-pool-pattern\/","url":"https:\/\/webkul.com\/blog\/magento2-object-pool-pattern\/","name":"Magento2 Object Pool Pattern - Webkul Blog","isPartOf":{"@id":"https:\/\/webkul.com\/blog\/#website"},"primaryImageOfPage":{"@id":"https:\/\/webkul.com\/blog\/magento2-object-pool-pattern\/#primaryimage"},"image":{"@id":"https:\/\/webkul.com\/blog\/magento2-object-pool-pattern\/#primaryimage"},"thumbnailUrl":"https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2017\/01\/Magneto-Code-Snippet.png","datePublished":"2017-08-19T16:44:22+00:00","dateModified":"2024-03-06T09:50:10+00:00","breadcrumb":{"@id":"https:\/\/webkul.com\/blog\/magento2-object-pool-pattern\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/webkul.com\/blog\/magento2-object-pool-pattern\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/webkul.com\/blog\/magento2-object-pool-pattern\/#primaryimage","url":"https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2017\/01\/Magneto-Code-Snippet.png","contentUrl":"https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2017\/01\/Magneto-Code-Snippet.png","width":825,"height":260},{"@type":"BreadcrumbList","@id":"https:\/\/webkul.com\/blog\/magento2-object-pool-pattern\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/webkul.com\/blog\/"},{"@type":"ListItem","position":2,"name":"Magento2 Object Pool Pattern"}]},{"@type":"WebSite","@id":"https:\/\/webkul.com\/blog\/#website","url":"https:\/\/webkul.com\/blog\/","name":"Webkul Blog","description":"","publisher":{"@id":"https:\/\/webkul.com\/blog\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/webkul.com\/blog\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/webkul.com\/blog\/#organization","name":"WebKul Software Private Limited","url":"https:\/\/webkul.com\/blog\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/webkul.com\/blog\/#\/schema\/logo\/image\/","url":"https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2021\/08\/webkul-logo-accent-sq.png","contentUrl":"https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2021\/08\/webkul-logo-accent-sq.png","width":380,"height":380,"caption":"WebKul Software Private Limited"},"image":{"@id":"https:\/\/webkul.com\/blog\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/www.facebook.com\/webkul\/","https:\/\/x.com\/webkul","https:\/\/www.instagram.com\/webkul\/","https:\/\/www.linkedin.com\/company\/webkul","https:\/\/www.youtube.com\/user\/webkul\/"]},{"@type":"Person","@id":"https:\/\/webkul.com\/blog\/#\/schema\/person\/5555025750ec4e4df34fadc78b083970","name":"Ashutosh Srivastava","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/webkul.com\/blog\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/2f5312e6903909ffeb33aa5eb38e1c0bed8f498f92144f5f84065adf7e8708a6?s=96&d=https%3A%2F%2Fcdnblog.webkul.com%2Fblog%2Fwp-content%2Fuploads%2F2019%2F10%2Fmike.png&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/2f5312e6903909ffeb33aa5eb38e1c0bed8f498f92144f5f84065adf7e8708a6?s=96&d=https%3A%2F%2Fcdnblog.webkul.com%2Fblog%2Fwp-content%2Fuploads%2F2019%2F10%2Fmike.png&r=g","caption":"Ashutosh Srivastava"},"sameAs":["http:\/\/webkul.com"],"url":"https:\/\/webkul.com\/blog\/author\/ashutosh\/"}]}},"amp_enabled":true,"_links":{"self":[{"href":"https:\/\/webkul.com\/blog\/wp-json\/wp\/v2\/posts\/92896","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/webkul.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/webkul.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/webkul.com\/blog\/wp-json\/wp\/v2\/users\/33"}],"replies":[{"embeddable":true,"href":"https:\/\/webkul.com\/blog\/wp-json\/wp\/v2\/comments?post=92896"}],"version-history":[{"count":8,"href":"https:\/\/webkul.com\/blog\/wp-json\/wp\/v2\/posts\/92896\/revisions"}],"predecessor-version":[{"id":426256,"href":"https:\/\/webkul.com\/blog\/wp-json\/wp\/v2\/posts\/92896\/revisions\/426256"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/webkul.com\/blog\/wp-json\/wp\/v2\/media\/70261"}],"wp:attachment":[{"href":"https:\/\/webkul.com\/blog\/wp-json\/wp\/v2\/media?parent=92896"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/webkul.com\/blog\/wp-json\/wp\/v2\/categories?post=92896"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/webkul.com\/blog\/wp-json\/wp\/v2\/tags?post=92896"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}