<br />
<b>Deprecated</b>:  YoastSEO_Vendor\Symfony\Component\DependencyInjection\Container::__construct(): Implicitly marking parameter $parameterBag as nullable is deprecated, the explicit nullable type must be used instead in <b>/home/nubelus/sharedove/adisjugo/wp-content/plugins/wordpress-seo/vendor_prefixed/symfony/dependency-injection/Container.php</b> on line <b>60</b><br />
<br />
<b>Deprecated</b>:  YoastSEO_Vendor\League\OAuth2\Client\Provider\AbstractProvider::authorize(): Implicitly marking parameter $redirectHandler as nullable is deprecated, the explicit nullable type must be used instead in <b>/home/nubelus/sharedove/adisjugo/wp-content/plugins/wordpress-seo/vendor_prefixed/league/oauth2-client/src/Provider/AbstractProvider.php</b> on line <b>416</b><br />
<br />
<b>Deprecated</b>:  YoastSEO_Vendor\GuzzleHttp\Client::getConfig(): Implicitly marking parameter $option as nullable is deprecated, the explicit nullable type must be used instead in <b>/home/nubelus/sharedove/adisjugo/wp-content/plugins/wordpress-seo/vendor_prefixed/guzzlehttp/guzzle/src/Client.php</b> on line <b>181</b><br />
<br />
<b>Deprecated</b>:  YoastSEO_Vendor\GuzzleHttp\ClientInterface::getConfig(): Implicitly marking parameter $option as nullable is deprecated, the explicit nullable type must be used instead in <b>/home/nubelus/sharedove/adisjugo/wp-content/plugins/wordpress-seo/vendor_prefixed/guzzlehttp/guzzle/src/ClientInterface.php</b> on line <b>77</b><br />
{"id":667,"date":"2011-11-07T23:14:19","date_gmt":"2011-11-07T22:14:19","guid":{"rendered":"https:\/\/blog.sharedove.com\/adisjugo\/index.php\/2011\/11\/07\/spcontext-games-without-the-borders-creating-a-neat-contexthelper-class\/"},"modified":"2011-11-07T23:14:19","modified_gmt":"2011-11-07T22:14:19","slug":"spcontext-games-without-the-borders-creating-a-neat-contexthelper-class","status":"publish","type":"post","link":"https:\/\/blog.sharedove.com\/adisjugo\/index.php\/2011\/11\/07\/spcontext-games-without-the-borders-creating-a-neat-contexthelper-class\/","title":{"rendered":"SPContext Games (without the borders): Creating a neat ContextHelper class"},"content":{"rendered":"<p>Does somebody of you guys from Europe remembers the obscure TV show called &#8220;<a href=\"http:\/\/en.wikipedia.org\/wiki\/Jeux_Sans_Fronti%C3%A8res\">Games without the borders<\/a>&#8220;, aired at the end of 1970s \u2013 beginning of 1980s in most European countries. There were bunch of people, from different European nations, dressed in the obscure costumes, doing some ridiculous things just to get some points. I was a kid back then \u2013 6 or 7 years old \u2013 but I remember the show very well. It was a family event.<\/p>\n<p>And I remember it every single time I need to work with the SPContext object. Remember: doing ridiculous things in the obscure environment? Exactly.<\/p>\n<p>So, let&#8217;s talk about the SPContext.<\/p>\n<p><!--more--><\/p>\n<p>It is actually nothing else but a derivate of a well known HttpContext. Microsoft words: &#8220;<a href=\"http:\/\/msdn.microsoft.com\/en-us\/library\/microsoft.sharepoint.spcontext.aspx\">Represents the context of an HTTP request in Microsoft SharePoint Foundation<\/a>&#8220;. For the most of the times, you just use it in the SharePoint front end, to know where exactly you are \u2013 to retrieve the current SPSite, SPWeb, SPList, SPListItem&#8230; whatsoever object, which is currently of interest to you.<\/p>\n<h3>The Problem<\/h3>\n<p>Well, there we see already a few tricks and drawbacks. SharePoint front end? Yes, SharePoint front end. We know our SPContext in our web parts and application pages.<\/p>\n<p>But, we don&#8217;t want to talk to our SharePoint Data from our web parts. We just don&#8217;t want. It&#8217;s not a nice thing to do, and we don&#8217;t do that. Our data access layer needs a SPContext, not our front end.<\/p>\n<p>Since it takes some time to initialize the data we have in SPContext \u2013 waking up a SPWeb could take some seconds \u2013 it would be nice thing if we could pass our SPContext from the front end, to the SharePoint data access layer. We can, nothing stops us to do that \u2013 we will see in one of the next articles of this architecture series how to do that \u2013 but that is actually not an issue. That is straight forward.<\/p>\n<p>You remember the last article in the Sharedove SharePoint architecture series, the one which where we described <a href=\"https:\/\/blog.sharedove.com\/adisjugo\/index.php\/2011\/11\/02\/developing-windows-8-metro-style-applications-for-sharepoint\/\">creating a Windows 8 Metro Client that consumes SharePoint data<\/a>. Well, we don&#8217;t have a SPContext there. As we have said, we have it only in the SharePoint front end components.<\/p>\n<p><a href=\"https:\/\/blog.sharedove.com\/adisjugo\/wp-content\/uploads\/2011\/11\/SPContext-games.png\"><img loading=\"lazy\" decoding=\"async\" style=\"background-image: none; padding-left: 0px; padding-right: 0px; display: inline; padding-top: 0px; border: 0px;\" title=\"SPContext games\" src=\"https:\/\/blog.sharedove.com\/adisjugo\/wp-content\/uploads\/2011\/11\/SPContext-games_thumb.png\" alt=\"SPContext games\" width=\"578\" height=\"409\" border=\"0\" \/><\/a><\/p>\n<p>If we look at this schema, we clearly see two paths from which the SharePoint data are accessed: one is through the SharePoint UI (front end) layer \u2013 this is where we have SPContext, and the other one is through the Service Layer, which is used by all other front ends for our data. We don&#8217;t have our context there. The orange marked components and arrows.<\/p>\n<p>Well, we want to use the same SharePoint data access layer for both cases \u2013 it would be a waste of time to write a data logic twice. This means, we need to create our own context objects \u2013 SPSite and SPWeb.<\/p>\n<p>But, there is another issue here, which need to discussed, even before we created a SPWeb: how to get rid of it. Yes, we need to dispose SPWeb and SPSite objects manually. .NET will not do it for us. But \u2013 not if we use the SPWeb which we have received from the SharePoint UI (web parts). If we dispose that one, we have just put our SharePoint to sleep. So we need to differentiate: if we come from SharePoint UI \u2013 no disposing. If we come from any other place \u2013 we must dispose it. This does not make the things easy, does it.<\/p>\n<h3>The solution<\/h3>\n<p>Let&#8217;s look at our SharePoint Data Access Layer project (the code can be downloaded from the <a href=\"http:\/\/sharedove.codeplex.com\/\">Sharedove Architecture Project CodePlex site<\/a>). We will create a ContextHelper class, which will help us in handling all the tasks related to the SPContext issues.<\/p>\n<p>In each public method in out data layer class, we will first create a ContextHelper class, and pass a context object to it \u2013 ContextHelper constructor requires some context object to be passed. The context object will be of a type &#8220;object&#8221;, but we will actually expect a SPContext object (if coming from the SharePoint UI), or a string object (if we are creating the object manually).<\/p>\n<p>If we pass a string, we will establish a connection that it will be in format {site};{web}, means, site and web separated by a semicolon. That will be enough info for us to create a SPSite and SPWeb<\/p>\n<p>In the <strong>ContextHelper constructor<\/strong> itself, we will determine which type of object did we pass. If it was a SPContext, we will just assign SPSite and SPWeb objects from the context to the member variables, which are then exposed as public properties from the <strong>ContextHelper<\/strong> objects.<\/p>\n<p><strong>ContextTypes<\/strong> enumeration is used to remember what context did we use.<\/p>\n<pre class=\"brush: csharp; title: Code sample:; notranslate\" title=\"Code sample:\">\n\/\/\/ &lt;summary&gt;\n        \/\/\/ Initialize the Context Helper class - check the type of the passed context, and, if necessary, instantiate SPWeb\n        \/\/\/ &lt;\/summary&gt;\n        \/\/\/ &lt;param name=&quot;context&quot;&gt;Context object which we have received&lt;\/param&gt;\n        public ContextHelper(object context)\n        {\n            m_ContextType = ContextTypes.Unknown;\n\n            if (context is SPWeb)\n            {\n                m_ContextType = ContextTypes.Spcontext;\n                m_Web = context as SPWeb;\n                m_Site = m_Web.Site;\n            }\n            else if (context is string)\n            {\n                m_ContextType = ContextTypes.Initialize;\n                CreateContext(context as string);\n            }\n        }\n<\/pre>\n<p>But, if we have passed the string as a context object, we need to create our SPSite and SPWeb ourselves:<\/p>\n<pre class=\"brush: csharp; title: Code sample:; notranslate\" title=\"Code sample:\">\n\/\/\/ &lt;summary&gt;\n        \/\/\/ Initialize the Context Helper class - check the type of the passed context, and, if necessary, instantiate SPWeb\n        \/\/\/ &lt;\/summary&gt;\n        \/\/\/ &lt;param name=&quot;context&quot;&gt;Context object which we have received&lt;\/param&gt;\n        public ContextHelper(object context)\n        {\n            m_ContextType = ContextTypes.Unknown;\n\n            if (context is SPWeb)\n            {\n                m_ContextType = ContextTypes.Spcontext;\n                m_Web = context as SPWeb;\n                m_Site = m_Web.Site;\n            }\n            else if (context is string)\n            {\n                m_ContextType = ContextTypes.Initialize;\n                CreateContext(context as string);\n            }\n        }\n<\/pre>\n<p>We notice here, that we are creating SPSite and SPWeb without using the &#8220;<span style=\"font-family: Courier New;\">using<\/span>&#8221; block, which would do the SPSite\/SPweb disposal for us. The reason is very simple \u2013 we need our SPSite and SPWeb, we must use it in our data access layer methods. And get rid of it afterwards. This means that we need a <strong>DisposeContext<\/strong> method in our <strong>ContextHelper<\/strong> class, which will be called at the end of the each Data Access Layer method, to dispose SPSite and SPWeb, if they need to be disposed:<\/p>\n<pre class=\"brush: csharp; title: Code sample:; notranslate\" title=\"Code sample:\">\n\/\/\/ &lt;summary&gt;\n        \/\/\/ Dispose context\n        \/\/\/ &lt;\/summary&gt;\n        internal void DisposeContext()\n        {\n            \/\/\n            \/\/Dispose the context if it was initialized manually (not passed from the Front End)\n            if (m_ContextType == ContextTypes.Initialize)\n            {\n                try\n                {\n                    \/\/\n                    \/\/dispose web and site\n                    if (m_Web != null)\n                        m_Web.Dispose();\n\n                    if (m_Site != null)\n                        m_Site.Dispose();\n\n\n                }\n                catch (Exception ex)\n                {\n                    throw new ApplicationException(&quot;Could not dispose the context&quot;, ex);\n                }\n\n            }\n        }\n<\/pre>\n<p>And then \u2013 what if an exception has been thrown between SPSite\/SPWeb creation through the <strong>ContextHelper<\/strong> class, and SPSIte\/SPWeb disposal through the <strong>DisposeContext<\/strong> method? Does this mean that these object would remain in memory, consuming it without any need? This is why we will create a <strong>ContextHelper destructor<\/strong> method, which will be created always when our ContextHelper class is disposed, where we ensure that out SPSite and SPWeb objects are non existing when at the moment.<\/p>\n<pre class=\"brush: csharp; title: Code sample:; notranslate\" title=\"Code sample:\">\n\/\/\/ &lt;summary&gt;\n        \/\/\/ When disposing ContextHelper, look in the destructor if the SPWeb is disposed - if it should be disposed at all. \n        \/\/\/ Dispose it if it isn&#039;t \n        \/\/\/ &lt;\/summary&gt;\n        ~ContextHelper()\n        {\n            DisposeContext();\n        }\n<\/pre>\n<p>The legitimate question would be \u2013 why do we need to call the DisposeContext method manually then, from our methods, when the SPSite\/SPWeb will be disposed anyway through the destructor \u2013 well, because it is a nice thing to do. It makes us aware of what is actually going on there.<\/p>\n<p>Last, but not the least \u2013 we started speaking about SPContext, and ended up creating SPSite and SPWeb. Well, these are two most common objects you actually need from the SPContext, which cover 95% of the needs, but if you really need a whole SPContext object created, just remember that it is a derivate of HttpContext. And since we already have a SPWeb object created above, it is not a difficult task to derive the SPContext:<\/p>\n<pre class=\"brush: csharp; title: Code sample:; notranslate\" title=\"Code sample:\">\n\/\/\/ &lt;summary&gt;\n        \/\/\/ Sets the current SPContext, based on the SPWeb value, if not present. Since the SPContext is based on the HttpContext, \n        \/\/\/ it is current Http Context that we will actually be setting\n        \/\/\/ &lt;\/summary&gt;\n        private void setCurrentSpContext()\n        {\n            \/\/\n            \/\/ Ensure HttpContext.Current\n            if (HttpContext.Current == null)\n            {\n                HttpRequest request = new HttpRequest(&quot;&quot;, m_Web.Url, &quot;&quot;);\n                HttpContext.Current = new HttpContext(request, new HttpResponse(TextWriter.Null));\n            }\n\n            \/\/\n            \/\/ SPContext is based on SPControl.GetContextWeb()\n            if (HttpContext.Current.Items&#x5B;&quot;HttpHandlerSPWeb&quot;] == null)\n            {\n                HttpContext.Current.Items&#x5B;&quot;HttpHandlerSPWeb&quot;] = m_Web;\n            }\n        }\n<\/pre>\n<p>Well, this makes the whole story working, both for web parts, Windows 8 Metro clients. Another myth about SharePoint being &#8220;<em>different<\/em>&#8220;, and &#8220;<em>needs to access the data from the UI<\/em>&#8221; broken. There is a data access layer, implemented in a clean way, which enables us to access the SharePoint data from wherever we come, exactly as we have wanted it.<\/p>\n<p>The whole source code, as always, at <a href=\"http:\/\/sharedove.codeplex.com\">http:\/\/sharedove.codeplex.com<\/a><\/p>\n<div class=\"fb-background-color\">\n\t\t\t  <div \n\t\t\t  \tclass = \"fb-comments\" \n\t\t\t  \tdata-href = \"https:\/\/blog.sharedove.com\/adisjugo\/index.php\/2011\/11\/07\/spcontext-games-without-the-borders-creating-a-neat-contexthelper-class\/\"\n\t\t\t  \tdata-numposts = \"59\"\n\t\t\t  \tdata-lazy = \"true\"\n\t\t\t\tdata-colorscheme = \"light\"\n\t\t\t\tdata-order-by = \"time\"\n\t\t\t\tdata-mobile=true>\n\t\t\t  <\/div><\/div>\n\t\t  <style>\n\t\t    .fb-background-color {\n\t\t\t\tbackground:  !important;\n\t\t\t}\n\t\t\t.fb_iframe_widget_fluid_desktop iframe {\n\t\t\t    width: 100% !important;\n\t\t\t}\n\t\t  <\/style>\n\t\t  ","protected":false},"excerpt":{"rendered":"<p>Does somebody of you guys from Europe remembers the obscure TV show called &#8220;Games without the borders&#8220;, aired at the end of 1970s \u2013 beginning of 1980s in most European countries. There were bunch of people, from different European nations, dressed in the obscure costumes, doing some ridiculous things just to get some points. I [&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":"","_et_pb_old_content":"","_et_gb_content_width":"","footnotes":""},"categories":[10,11],"tags":[54,55],"class_list":["post-667","post","type-post","status-publish","format-standard","hentry","category-architecture","category-development","tag-server-object-model","tag-sharepoint"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v25.4 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>SPContext Games (without the borders): Creating a neat ContextHelper class - Adis Jugo 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:\/\/blog.sharedove.com\/adisjugo\/index.php\/2011\/11\/07\/spcontext-games-without-the-borders-creating-a-neat-contexthelper-class\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"SPContext Games (without the borders): Creating a neat ContextHelper class - Adis Jugo blog\" \/>\n<meta property=\"og:description\" content=\"Does somebody of you guys from Europe remembers the obscure TV show called &#8220;Games without the borders&#8220;, aired at the end of 1970s \u2013 beginning of 1980s in most European countries. There were bunch of people, from different European nations, dressed in the obscure costumes, doing some ridiculous things just to get some points. I [&hellip;]\" \/>\n<meta property=\"og:url\" content=\"https:\/\/blog.sharedove.com\/adisjugo\/index.php\/2011\/11\/07\/spcontext-games-without-the-borders-creating-a-neat-contexthelper-class\/\" \/>\n<meta property=\"og:site_name\" content=\"Adis Jugo blog\" \/>\n<meta property=\"article:published_time\" content=\"2011-11-07T22:14:19+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/blog.sharedove.com\/adisjugo\/wp-content\/uploads\/2011\/11\/SPContext-games_thumb.png\" \/>\n<meta name=\"author\" content=\"adis.jugo\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"adis.jugo\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"7 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/blog.sharedove.com\/adisjugo\/index.php\/2011\/11\/07\/spcontext-games-without-the-borders-creating-a-neat-contexthelper-class\/\",\"url\":\"https:\/\/blog.sharedove.com\/adisjugo\/index.php\/2011\/11\/07\/spcontext-games-without-the-borders-creating-a-neat-contexthelper-class\/\",\"name\":\"SPContext Games (without the borders): Creating a neat ContextHelper class - Adis Jugo blog\",\"isPartOf\":{\"@id\":\"https:\/\/blog.sharedove.com\/adisjugo\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/blog.sharedove.com\/adisjugo\/index.php\/2011\/11\/07\/spcontext-games-without-the-borders-creating-a-neat-contexthelper-class\/#primaryimage\"},\"image\":{\"@id\":\"https:\/\/blog.sharedove.com\/adisjugo\/index.php\/2011\/11\/07\/spcontext-games-without-the-borders-creating-a-neat-contexthelper-class\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/blog.sharedove.com\/adisjugo\/wp-content\/uploads\/2011\/11\/SPContext-games_thumb.png\",\"datePublished\":\"2011-11-07T22:14:19+00:00\",\"author\":{\"@id\":\"https:\/\/blog.sharedove.com\/adisjugo\/#\/schema\/person\/a5ca63552094ce9d5a0440f3a1ac9a4c\"},\"breadcrumb\":{\"@id\":\"https:\/\/blog.sharedove.com\/adisjugo\/index.php\/2011\/11\/07\/spcontext-games-without-the-borders-creating-a-neat-contexthelper-class\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/blog.sharedove.com\/adisjugo\/index.php\/2011\/11\/07\/spcontext-games-without-the-borders-creating-a-neat-contexthelper-class\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/blog.sharedove.com\/adisjugo\/index.php\/2011\/11\/07\/spcontext-games-without-the-borders-creating-a-neat-contexthelper-class\/#primaryimage\",\"url\":\"https:\/\/blog.sharedove.com\/adisjugo\/wp-content\/uploads\/2011\/11\/SPContext-games_thumb.png\",\"contentUrl\":\"https:\/\/blog.sharedove.com\/adisjugo\/wp-content\/uploads\/2011\/11\/SPContext-games_thumb.png\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/blog.sharedove.com\/adisjugo\/index.php\/2011\/11\/07\/spcontext-games-without-the-borders-creating-a-neat-contexthelper-class\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/blog.sharedove.com\/adisjugo\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"SPContext Games (without the borders): Creating a neat ContextHelper class\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/blog.sharedove.com\/adisjugo\/#website\",\"url\":\"https:\/\/blog.sharedove.com\/adisjugo\/\",\"name\":\"Adis Jugo blog\",\"description\":\"The Southern Side\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/blog.sharedove.com\/adisjugo\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Person\",\"@id\":\"https:\/\/blog.sharedove.com\/adisjugo\/#\/schema\/person\/a5ca63552094ce9d5a0440f3a1ac9a4c\",\"name\":\"adis.jugo\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/blog.sharedove.com\/adisjugo\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/cc5a23cf1bd0b9d8401c9dd65c6c141041ec0c6e37eedbb511779e4a40a198fd?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/cc5a23cf1bd0b9d8401c9dd65c6c141041ec0c6e37eedbb511779e4a40a198fd?s=96&d=mm&r=g\",\"caption\":\"adis.jugo\"},\"url\":\"https:\/\/blog.sharedove.com\/adisjugo\/index.php\/author\/adisjugo\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"SPContext Games (without the borders): Creating a neat ContextHelper class - Adis Jugo 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:\/\/blog.sharedove.com\/adisjugo\/index.php\/2011\/11\/07\/spcontext-games-without-the-borders-creating-a-neat-contexthelper-class\/","og_locale":"en_US","og_type":"article","og_title":"SPContext Games (without the borders): Creating a neat ContextHelper class - Adis Jugo blog","og_description":"Does somebody of you guys from Europe remembers the obscure TV show called &#8220;Games without the borders&#8220;, aired at the end of 1970s \u2013 beginning of 1980s in most European countries. There were bunch of people, from different European nations, dressed in the obscure costumes, doing some ridiculous things just to get some points. I [&hellip;]","og_url":"https:\/\/blog.sharedove.com\/adisjugo\/index.php\/2011\/11\/07\/spcontext-games-without-the-borders-creating-a-neat-contexthelper-class\/","og_site_name":"Adis Jugo blog","article_published_time":"2011-11-07T22:14:19+00:00","og_image":[{"url":"https:\/\/blog.sharedove.com\/adisjugo\/wp-content\/uploads\/2011\/11\/SPContext-games_thumb.png","type":"","width":"","height":""}],"author":"adis.jugo","twitter_card":"summary_large_image","twitter_misc":{"Written by":"adis.jugo","Est. reading time":"7 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/blog.sharedove.com\/adisjugo\/index.php\/2011\/11\/07\/spcontext-games-without-the-borders-creating-a-neat-contexthelper-class\/","url":"https:\/\/blog.sharedove.com\/adisjugo\/index.php\/2011\/11\/07\/spcontext-games-without-the-borders-creating-a-neat-contexthelper-class\/","name":"SPContext Games (without the borders): Creating a neat ContextHelper class - Adis Jugo blog","isPartOf":{"@id":"https:\/\/blog.sharedove.com\/adisjugo\/#website"},"primaryImageOfPage":{"@id":"https:\/\/blog.sharedove.com\/adisjugo\/index.php\/2011\/11\/07\/spcontext-games-without-the-borders-creating-a-neat-contexthelper-class\/#primaryimage"},"image":{"@id":"https:\/\/blog.sharedove.com\/adisjugo\/index.php\/2011\/11\/07\/spcontext-games-without-the-borders-creating-a-neat-contexthelper-class\/#primaryimage"},"thumbnailUrl":"https:\/\/blog.sharedove.com\/adisjugo\/wp-content\/uploads\/2011\/11\/SPContext-games_thumb.png","datePublished":"2011-11-07T22:14:19+00:00","author":{"@id":"https:\/\/blog.sharedove.com\/adisjugo\/#\/schema\/person\/a5ca63552094ce9d5a0440f3a1ac9a4c"},"breadcrumb":{"@id":"https:\/\/blog.sharedove.com\/adisjugo\/index.php\/2011\/11\/07\/spcontext-games-without-the-borders-creating-a-neat-contexthelper-class\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/blog.sharedove.com\/adisjugo\/index.php\/2011\/11\/07\/spcontext-games-without-the-borders-creating-a-neat-contexthelper-class\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/blog.sharedove.com\/adisjugo\/index.php\/2011\/11\/07\/spcontext-games-without-the-borders-creating-a-neat-contexthelper-class\/#primaryimage","url":"https:\/\/blog.sharedove.com\/adisjugo\/wp-content\/uploads\/2011\/11\/SPContext-games_thumb.png","contentUrl":"https:\/\/blog.sharedove.com\/adisjugo\/wp-content\/uploads\/2011\/11\/SPContext-games_thumb.png"},{"@type":"BreadcrumbList","@id":"https:\/\/blog.sharedove.com\/adisjugo\/index.php\/2011\/11\/07\/spcontext-games-without-the-borders-creating-a-neat-contexthelper-class\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/blog.sharedove.com\/adisjugo\/"},{"@type":"ListItem","position":2,"name":"SPContext Games (without the borders): Creating a neat ContextHelper class"}]},{"@type":"WebSite","@id":"https:\/\/blog.sharedove.com\/adisjugo\/#website","url":"https:\/\/blog.sharedove.com\/adisjugo\/","name":"Adis Jugo blog","description":"The Southern Side","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/blog.sharedove.com\/adisjugo\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Person","@id":"https:\/\/blog.sharedove.com\/adisjugo\/#\/schema\/person\/a5ca63552094ce9d5a0440f3a1ac9a4c","name":"adis.jugo","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/blog.sharedove.com\/adisjugo\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/cc5a23cf1bd0b9d8401c9dd65c6c141041ec0c6e37eedbb511779e4a40a198fd?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/cc5a23cf1bd0b9d8401c9dd65c6c141041ec0c6e37eedbb511779e4a40a198fd?s=96&d=mm&r=g","caption":"adis.jugo"},"url":"https:\/\/blog.sharedove.com\/adisjugo\/index.php\/author\/adisjugo\/"}]}},"_links":{"self":[{"href":"https:\/\/blog.sharedove.com\/adisjugo\/index.php\/wp-json\/wp\/v2\/posts\/667","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/blog.sharedove.com\/adisjugo\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blog.sharedove.com\/adisjugo\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blog.sharedove.com\/adisjugo\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/blog.sharedove.com\/adisjugo\/index.php\/wp-json\/wp\/v2\/comments?post=667"}],"version-history":[{"count":0,"href":"https:\/\/blog.sharedove.com\/adisjugo\/index.php\/wp-json\/wp\/v2\/posts\/667\/revisions"}],"wp:attachment":[{"href":"https:\/\/blog.sharedove.com\/adisjugo\/index.php\/wp-json\/wp\/v2\/media?parent=667"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blog.sharedove.com\/adisjugo\/index.php\/wp-json\/wp\/v2\/categories?post=667"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blog.sharedove.com\/adisjugo\/index.php\/wp-json\/wp\/v2\/tags?post=667"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}