<?xml version="1.0"?><?xml-stylesheet type="text/xsl" href="/rss.xsl"?><rss version="2.0"><channel><title>phpdataservices Wiki &amp; Documentation Rss Feed</title><link>http://phpdataservices.codeplex.com/Wiki/View.aspx?title=Home</link><description>phpdataservices Wiki Rss Description</description><item><title>Updated Wiki: Home</title><link>http://phpdataservices.codeplex.com/wikipage?version=16</link><description>&lt;div class="wikidoc"&gt;&lt;a href="#Overview"&gt;Overview&lt;/a&gt; &lt;img src="http://i3.codeplex.com/Project/Download/FileDownload.aspx?ProjectName=phpdataservices&amp;DownloadId=79223" alt="arrow_sm.gif" title="arrow_sm.gif" /&gt; &lt;a href="#Architecture"&gt;Architecture&lt;/a&gt; &lt;img src="http://i3.codeplex.com/Project/Download/FileDownload.aspx?ProjectName=phpdataservices&amp;DownloadId=79223" alt="arrow_sm.gif" title="arrow_sm.gif" /&gt; &lt;a href="http://phpdataservices.codeplex.com/wikipage?title=InstallationGuide&amp;referringTitle=Home"&gt;Installation Guide&lt;/a&gt; &lt;img src="http://i3.codeplex.com/Project/Download/FileDownload.aspx?ProjectName=phpdataservices&amp;DownloadId=79223" alt="arrow_sm.gif" title="arrow_sm.gif" /&gt; &lt;a href="http://phpdataservices.codeplex.com/wikipage?title=UserGuide&amp;referringTitle=Home"&gt;User Guide&lt;/a&gt; &lt;img src="http://i3.codeplex.com/Project/Download/FileDownload.aspx?ProjectName=phpdataservices&amp;DownloadId=79223" alt="arrow_sm.gif" title="arrow_sm.gif" /&gt; &lt;a href="http://phpdataservices.codeplex.com/wikipage?title=FAQ&amp;referringTitle=Home"&gt;FAQ&lt;/a&gt; &lt;img src="http://i3.codeplex.com/Project/Download/FileDownload.aspx?ProjectName=phpdataservices&amp;DownloadId=79223" alt="arrow_sm.gif" title="arrow_sm.gif" /&gt; &lt;a href="#Contributors"&gt;Contributors&lt;/a&gt;&lt;br /&gt;
&lt;h2&gt;A new version of the code is available on &lt;a href="http://odataphp.codeplex.com" class="externalLink"&gt;odataphp.codeplex.com&lt;span class="externalLinkIcon"&gt;&lt;/span&gt;&lt;/a&gt; &lt;/h2&gt;
&lt;h1&gt;Overview &lt;a name="Overview"&gt;&lt;/a&gt;&lt;/h1&gt;
Toolkit for PHP with ADO.NET Data Services enables PHP developers to access data services created using ADO .NET Data Services framework. The goal is to provide the similar functionality as .NET library to access and modify the data and its relationship using URIs which points to pieces of data integrated with the web. &lt;br /&gt;Check the project page on the &lt;a href="http://www.interoperabilitybridges.com/projects/toolkit-for-php-with-adonet-data-services-.aspx" class="externalLink"&gt;&amp;quot;Interoperability Bridges and Labs page&amp;quot;&lt;span class="externalLinkIcon"&gt;&lt;/span&gt;&lt;/a&gt; and read this blog post &lt;a href="http://blogs.msdn.com/interoperability/archive/2009/08/21/a-new-bridge-for-php-developers-to-net-through-rest-php-toolkit-for-ado-net-data-services.aspx" class="externalLink"&gt;&amp;quot;A new bridge for PHP developers to .NET through REST: Toolkit for PHP with ADO.NET Data Services&amp;quot;&lt;span class="externalLinkIcon"&gt;&lt;/span&gt;&lt;/a&gt; for a more detailed introduction.&lt;br /&gt;&lt;br /&gt;The &lt;a href="http://msdn.microsoft.com/en-us/data/bb931106.aspx" class="externalLink"&gt;ADO .NET Data Services&lt;span class="externalLinkIcon"&gt;&lt;/span&gt;&lt;/a&gt; framework consists of a combination of patterns and libraries that enable the creation and consumption of data services for the web. The goal of the ADO.Net Data Services framework is to facilitate the creation of flexible data services that are naturally integrated with the web, using URIs to point to pieces of data and simple, well-known formats to represent that data, such as JSON and plain XML. This results in the data service being surfaced to the web as a REST-style resource collection that is addressable with URIs and that agents can interact with using the usual HTTP verbs such as GET, POST or DELETE.&lt;br /&gt;&lt;br /&gt;
&lt;h1&gt;Architecture &lt;a name="Architecture"&gt;&lt;/a&gt;&lt;/h1&gt;The Toolkit for PHP with ADO.NET Data Services is based on an utility (PHPDataSvcUtil) that is used to generate a proxy class from an ADO .NET Data Service, the class is then used in the PHP application to connect/edit/add/delete or browse records from the Data Service.&lt;br /&gt;&lt;img src="http://blogs.msdn.com/blogfiles/interoperability/WindowsLiveWriter/AnewbridgeforPHPdevelope.NETDataServices_7FB3/PHP_ADO_DATA_SERVICEArchitecture_4.png" /&gt;&lt;br /&gt;
&lt;h3&gt;PHPDataSvcUtil Tool&lt;/h3&gt;PHPDataSvcUtil tool generates a single proxy PHP file that contains class definitions which will be used by the client application to access the data service.&lt;br /&gt;&lt;br /&gt;ADO .NET Data Services provide a metadata endpoint that returns a schema of resources and URIs deployed by the data service.  This &lt;a href="http://msdn.microsoft.com/en-us/library/cc716656.aspx" class="externalLink"&gt;metadata&lt;span class="externalLinkIcon"&gt;&lt;/span&gt;&lt;/a&gt; consists of an EntityContainer that holds collection of EntityType. An EntityType represents a useful element of data in the domain of an application, such as a customer, order, product, or supplier. A relationship between entities is defined as an AssociationType. Please refer &lt;a href="http://msdn.microsoft.com/en-us/library/cc668808.aspx" class="externalLink"&gt;ADO .NET Data Service Specifications&lt;span class="externalLinkIcon"&gt;&lt;/span&gt;&lt;/a&gt; for details.&lt;br /&gt;&lt;br /&gt;PHPDataSvcUtil tool generates one container class  and one class for each EntityType.&lt;br /&gt;
&lt;h1&gt;Contributors &lt;a name="Contributors"&gt;&lt;/a&gt;&lt;/h1&gt;&lt;table&gt;&lt;tr&gt;&lt;td&gt; &lt;img src="http://i3.codeplex.com/Project/Download/FileDownload.aspx?ProjectName=DotNetServicesRuby&amp;amp;DownloadId=47295" /&gt;&lt;/td&gt;&lt;td&gt; &lt;img src="http://www.persistentsys.com/Portals/0/logo(1)_2.jpg" /&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt; Microsoft is the project sponsor and provides architectural guidance and best practices for this PHP Toolkit.  &lt;/td&gt;&lt;td&gt;  &lt;a href="http://www.persistentsys.com/" class="externalLink"&gt;Persistent Systems Ltd.&lt;span class="externalLinkIcon"&gt;&lt;/span&gt;&lt;/a&gt; is an award-winning technology company specialized in software product development services. The Company’s proven processes for entire product lifecycle helps customers increase revenue, margin and enhance brand value.&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;&lt;/div&gt;&lt;div class="ClearBoth"&gt;&lt;/div&gt;</description><author>anu_chandy</author><pubDate>Wed, 17 Mar 2010 03:32:55 GMT</pubDate><guid isPermaLink="false">Updated Wiki: Home 20100317033255A</guid></item><item><title>Updated Wiki: Home</title><link>http://phpdataservices.codeplex.com/wikipage?version=15</link><description>&lt;div class="wikidoc"&gt;&lt;a href="#Overview"&gt;Overview&lt;/a&gt; &lt;img src="http://i3.codeplex.com/Project/Download/FileDownload.aspx?ProjectName=phpdataservices&amp;DownloadId=79223" alt="arrow_sm.gif" title="arrow_sm.gif" /&gt; &lt;a href="#Architecture"&gt;Architecture&lt;/a&gt; &lt;img src="http://i3.codeplex.com/Project/Download/FileDownload.aspx?ProjectName=phpdataservices&amp;DownloadId=79223" alt="arrow_sm.gif" title="arrow_sm.gif" /&gt; &lt;a href="http://phpdataservices.codeplex.com/wikipage?title=InstallationGuide&amp;referringTitle=Home"&gt;Installation Guide&lt;/a&gt; &lt;img src="http://i3.codeplex.com/Project/Download/FileDownload.aspx?ProjectName=phpdataservices&amp;DownloadId=79223" alt="arrow_sm.gif" title="arrow_sm.gif" /&gt; &lt;a href="http://phpdataservices.codeplex.com/wikipage?title=UserGuide&amp;referringTitle=Home"&gt;User Guide&lt;/a&gt; &lt;img src="http://i3.codeplex.com/Project/Download/FileDownload.aspx?ProjectName=phpdataservices&amp;DownloadId=79223" alt="arrow_sm.gif" title="arrow_sm.gif" /&gt; &lt;a href="http://phpdataservices.codeplex.com/wikipage?title=FAQ&amp;referringTitle=Home"&gt;FAQ&lt;/a&gt; &lt;img src="http://i3.codeplex.com/Project/Download/FileDownload.aspx?ProjectName=phpdataservices&amp;DownloadId=79223" alt="arrow_sm.gif" title="arrow_sm.gif" /&gt; &lt;a href="#Contributors"&gt;Contributors&lt;/a&gt;&lt;br /&gt;
&lt;h2&gt;*  A new version of the code is available on &lt;a href="http://odataphp.codeplex.com" class="externalLink"&gt;odataphp.codeplex.com&lt;span class="externalLinkIcon"&gt;&lt;/span&gt;&lt;/a&gt; &lt;/h2&gt;
&lt;h1&gt;Overview &lt;a name="Overview"&gt;&lt;/a&gt;&lt;/h1&gt;
Toolkit for PHP with ADO.NET Data Services enables PHP developers to access data services created using ADO .NET Data Services framework. The goal is to provide the similar functionality as .NET library to access and modify the data and its relationship using URIs which points to pieces of data integrated with the web. &lt;br /&gt;Check the project page on the &lt;a href="http://www.interoperabilitybridges.com/projects/toolkit-for-php-with-adonet-data-services-.aspx" class="externalLink"&gt;&amp;quot;Interoperability Bridges and Labs page&amp;quot;&lt;span class="externalLinkIcon"&gt;&lt;/span&gt;&lt;/a&gt; and read this blog post &lt;a href="http://blogs.msdn.com/interoperability/archive/2009/08/21/a-new-bridge-for-php-developers-to-net-through-rest-php-toolkit-for-ado-net-data-services.aspx" class="externalLink"&gt;&amp;quot;A new bridge for PHP developers to .NET through REST: Toolkit for PHP with ADO.NET Data Services&amp;quot;&lt;span class="externalLinkIcon"&gt;&lt;/span&gt;&lt;/a&gt; for a more detailed introduction.&lt;br /&gt;&lt;br /&gt;The &lt;a href="http://msdn.microsoft.com/en-us/data/bb931106.aspx" class="externalLink"&gt;ADO .NET Data Services&lt;span class="externalLinkIcon"&gt;&lt;/span&gt;&lt;/a&gt; framework consists of a combination of patterns and libraries that enable the creation and consumption of data services for the web. The goal of the ADO.Net Data Services framework is to facilitate the creation of flexible data services that are naturally integrated with the web, using URIs to point to pieces of data and simple, well-known formats to represent that data, such as JSON and plain XML. This results in the data service being surfaced to the web as a REST-style resource collection that is addressable with URIs and that agents can interact with using the usual HTTP verbs such as GET, POST or DELETE.&lt;br /&gt;&lt;br /&gt;
&lt;h1&gt;Architecture &lt;a name="Architecture"&gt;&lt;/a&gt;&lt;/h1&gt;The Toolkit for PHP with ADO.NET Data Services is based on an utility (PHPDataSvcUtil) that is used to generate a proxy class from an ADO .NET Data Service, the class is then used in the PHP application to connect/edit/add/delete or browse records from the Data Service.&lt;br /&gt;&lt;img src="http://blogs.msdn.com/blogfiles/interoperability/WindowsLiveWriter/AnewbridgeforPHPdevelope.NETDataServices_7FB3/PHP_ADO_DATA_SERVICEArchitecture_4.png" /&gt;&lt;br /&gt;
&lt;h3&gt;PHPDataSvcUtil Tool&lt;/h3&gt;PHPDataSvcUtil tool generates a single proxy PHP file that contains class definitions which will be used by the client application to access the data service.&lt;br /&gt;&lt;br /&gt;ADO .NET Data Services provide a metadata endpoint that returns a schema of resources and URIs deployed by the data service.  This &lt;a href="http://msdn.microsoft.com/en-us/library/cc716656.aspx" class="externalLink"&gt;metadata&lt;span class="externalLinkIcon"&gt;&lt;/span&gt;&lt;/a&gt; consists of an EntityContainer that holds collection of EntityType. An EntityType represents a useful element of data in the domain of an application, such as a customer, order, product, or supplier. A relationship between entities is defined as an AssociationType. Please refer &lt;a href="http://msdn.microsoft.com/en-us/library/cc668808.aspx" class="externalLink"&gt;ADO .NET Data Service Specifications&lt;span class="externalLinkIcon"&gt;&lt;/span&gt;&lt;/a&gt; for details.&lt;br /&gt;&lt;br /&gt;PHPDataSvcUtil tool generates one container class  and one class for each EntityType.&lt;br /&gt;
&lt;h1&gt;Contributors &lt;a name="Contributors"&gt;&lt;/a&gt;&lt;/h1&gt;&lt;table&gt;&lt;tr&gt;&lt;td&gt; &lt;img src="http://i3.codeplex.com/Project/Download/FileDownload.aspx?ProjectName=DotNetServicesRuby&amp;amp;DownloadId=47295" /&gt;&lt;/td&gt;&lt;td&gt; &lt;img src="http://www.persistentsys.com/Portals/0/logo(1)_2.jpg" /&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt; Microsoft is the project sponsor and provides architectural guidance and best practices for this PHP Toolkit.  &lt;/td&gt;&lt;td&gt;  &lt;a href="http://www.persistentsys.com/" class="externalLink"&gt;Persistent Systems Ltd.&lt;span class="externalLinkIcon"&gt;&lt;/span&gt;&lt;/a&gt; is an award-winning technology company specialized in software product development services. The Company’s proven processes for entire product lifecycle helps customers increase revenue, margin and enhance brand value.&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;&lt;/div&gt;&lt;div class="ClearBoth"&gt;&lt;/div&gt;</description><author>anu_chandy</author><pubDate>Wed, 17 Mar 2010 03:32:46 GMT</pubDate><guid isPermaLink="false">Updated Wiki: Home 20100317033246A</guid></item><item><title>Updated Wiki: Home</title><link>http://phpdataservices.codeplex.com/wikipage?version=14</link><description>&lt;div class="wikidoc"&gt;&lt;a href="#Overview"&gt;Overview&lt;/a&gt; &lt;img src="http://i3.codeplex.com/Project/Download/FileDownload.aspx?ProjectName=phpdataservices&amp;DownloadId=79223" alt="arrow_sm.gif" title="arrow_sm.gif" /&gt; &lt;a href="#Architecture"&gt;Architecture&lt;/a&gt; &lt;img src="http://i3.codeplex.com/Project/Download/FileDownload.aspx?ProjectName=phpdataservices&amp;DownloadId=79223" alt="arrow_sm.gif" title="arrow_sm.gif" /&gt; &lt;a href="http://phpdataservices.codeplex.com/wikipage?title=InstallationGuide&amp;referringTitle=Home"&gt;Installation Guide&lt;/a&gt; &lt;img src="http://i3.codeplex.com/Project/Download/FileDownload.aspx?ProjectName=phpdataservices&amp;DownloadId=79223" alt="arrow_sm.gif" title="arrow_sm.gif" /&gt; &lt;a href="http://phpdataservices.codeplex.com/wikipage?title=UserGuide&amp;referringTitle=Home"&gt;User Guide&lt;/a&gt; &lt;img src="http://i3.codeplex.com/Project/Download/FileDownload.aspx?ProjectName=phpdataservices&amp;DownloadId=79223" alt="arrow_sm.gif" title="arrow_sm.gif" /&gt; &lt;a href="http://phpdataservices.codeplex.com/wikipage?title=FAQ&amp;referringTitle=Home"&gt;FAQ&lt;/a&gt; &lt;img src="http://i3.codeplex.com/Project/Download/FileDownload.aspx?ProjectName=phpdataservices&amp;DownloadId=79223" alt="arrow_sm.gif" title="arrow_sm.gif" /&gt; &lt;a href="#Contributors"&gt;Contributors&lt;/a&gt;&lt;br /&gt;
&lt;h2&gt;A new version of the code is available on &lt;a href="http://odataphp.codeplex.com" class="externalLink"&gt;odataphp.codeplex.com&lt;span class="externalLinkIcon"&gt;&lt;/span&gt;&lt;/a&gt; &lt;/h2&gt;
&lt;h1&gt;Overview &lt;a name="Overview"&gt;&lt;/a&gt;&lt;/h1&gt;
Toolkit for PHP with ADO.NET Data Services enables PHP developers to access data services created using ADO .NET Data Services framework. The goal is to provide the similar functionality as .NET library to access and modify the data and its relationship using URIs which points to pieces of data integrated with the web. &lt;br /&gt;Check the project page on the &lt;a href="http://www.interoperabilitybridges.com/projects/toolkit-for-php-with-adonet-data-services-.aspx" class="externalLink"&gt;&amp;quot;Interoperability Bridges and Labs page&amp;quot;&lt;span class="externalLinkIcon"&gt;&lt;/span&gt;&lt;/a&gt; and read this blog post &lt;a href="http://blogs.msdn.com/interoperability/archive/2009/08/21/a-new-bridge-for-php-developers-to-net-through-rest-php-toolkit-for-ado-net-data-services.aspx" class="externalLink"&gt;&amp;quot;A new bridge for PHP developers to .NET through REST: Toolkit for PHP with ADO.NET Data Services&amp;quot;&lt;span class="externalLinkIcon"&gt;&lt;/span&gt;&lt;/a&gt; for a more detailed introduction.&lt;br /&gt;&lt;br /&gt;The &lt;a href="http://msdn.microsoft.com/en-us/data/bb931106.aspx" class="externalLink"&gt;ADO .NET Data Services&lt;span class="externalLinkIcon"&gt;&lt;/span&gt;&lt;/a&gt; framework consists of a combination of patterns and libraries that enable the creation and consumption of data services for the web. The goal of the ADO.Net Data Services framework is to facilitate the creation of flexible data services that are naturally integrated with the web, using URIs to point to pieces of data and simple, well-known formats to represent that data, such as JSON and plain XML. This results in the data service being surfaced to the web as a REST-style resource collection that is addressable with URIs and that agents can interact with using the usual HTTP verbs such as GET, POST or DELETE.&lt;br /&gt;&lt;br /&gt;
&lt;h1&gt;Architecture &lt;a name="Architecture"&gt;&lt;/a&gt;&lt;/h1&gt;The Toolkit for PHP with ADO.NET Data Services is based on an utility (PHPDataSvcUtil) that is used to generate a proxy class from an ADO .NET Data Service, the class is then used in the PHP application to connect/edit/add/delete or browse records from the Data Service.&lt;br /&gt;&lt;img src="http://blogs.msdn.com/blogfiles/interoperability/WindowsLiveWriter/AnewbridgeforPHPdevelope.NETDataServices_7FB3/PHP_ADO_DATA_SERVICEArchitecture_4.png" /&gt;&lt;br /&gt;
&lt;h3&gt;PHPDataSvcUtil Tool&lt;/h3&gt;PHPDataSvcUtil tool generates a single proxy PHP file that contains class definitions which will be used by the client application to access the data service.&lt;br /&gt;&lt;br /&gt;ADO .NET Data Services provide a metadata endpoint that returns a schema of resources and URIs deployed by the data service.  This &lt;a href="http://msdn.microsoft.com/en-us/library/cc716656.aspx" class="externalLink"&gt;metadata&lt;span class="externalLinkIcon"&gt;&lt;/span&gt;&lt;/a&gt; consists of an EntityContainer that holds collection of EntityType. An EntityType represents a useful element of data in the domain of an application, such as a customer, order, product, or supplier. A relationship between entities is defined as an AssociationType. Please refer &lt;a href="http://msdn.microsoft.com/en-us/library/cc668808.aspx" class="externalLink"&gt;ADO .NET Data Service Specifications&lt;span class="externalLinkIcon"&gt;&lt;/span&gt;&lt;/a&gt; for details.&lt;br /&gt;&lt;br /&gt;PHPDataSvcUtil tool generates one container class  and one class for each EntityType.&lt;br /&gt;
&lt;h1&gt;Contributors &lt;a name="Contributors"&gt;&lt;/a&gt;&lt;/h1&gt;&lt;table&gt;&lt;tr&gt;&lt;td&gt; &lt;img src="http://i3.codeplex.com/Project/Download/FileDownload.aspx?ProjectName=DotNetServicesRuby&amp;amp;DownloadId=47295" /&gt;&lt;/td&gt;&lt;td&gt; &lt;img src="http://www.persistentsys.com/Portals/0/logo(1)_2.jpg" /&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt; Microsoft is the project sponsor and provides architectural guidance and best practices for this PHP Toolkit.  &lt;/td&gt;&lt;td&gt;  &lt;a href="http://www.persistentsys.com/" class="externalLink"&gt;Persistent Systems Ltd.&lt;span class="externalLinkIcon"&gt;&lt;/span&gt;&lt;/a&gt; is an award-winning technology company specialized in software product development services. The Company’s proven processes for entire product lifecycle helps customers increase revenue, margin and enhance brand value.&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;&lt;/div&gt;&lt;div class="ClearBoth"&gt;&lt;/div&gt;</description><author>anu_chandy</author><pubDate>Wed, 17 Mar 2010 03:28:56 GMT</pubDate><guid isPermaLink="false">Updated Wiki: Home 20100317032856A</guid></item><item><title>Updated Wiki: UserGuide</title><link>http://phpdataservices.codeplex.com/Wiki/View.aspx?title=UserGuide&amp;version=21</link><description>&lt;div class="wikidoc"&gt;&lt;a href="http://phpdataservices.codeplex.com/Wiki/View.aspx?title=Home&amp;referringTitle=Home&amp;ANCHOR#Overview"&gt;Overview&lt;/a&gt; &lt;img src="http://i3.codeplex.com/Project/Download/FileDownload.aspx?ProjectName=phpdataservices&amp;DownloadId=79225" alt="arrow_sm.gif" title="arrow_sm.gif" /&gt; &lt;a href="http://phpdataservices.codeplex.com/Wiki/View.aspx?title=Home&amp;referringTitle=Home&amp;ANCHOR#Architecture"&gt;Architecture&lt;/a&gt; &lt;img src="http://i3.codeplex.com/Project/Download/FileDownload.aspx?ProjectName=phpdataservices&amp;DownloadId=79225" alt="arrow_sm.gif" title="arrow_sm.gif" /&gt; &lt;a href="http://phpdataservices.codeplex.com/Wiki/View.aspx?title=InstallationGuide&amp;referringTitle=Home"&gt;Installation Guide&lt;/a&gt; &lt;img src="http://i3.codeplex.com/Project/Download/FileDownload.aspx?ProjectName=phpdataservices&amp;DownloadId=79225" alt="arrow_sm.gif" title="arrow_sm.gif" /&gt; &lt;a href="http://phpdataservices.codeplex.com/Wiki/View.aspx?title=UserGuide&amp;referringTitle=Home"&gt;User Guide&lt;/a&gt; &lt;img src="http://i3.codeplex.com/Project/Download/FileDownload.aspx?ProjectName=phpdataservices&amp;DownloadId=79225" alt="arrow_sm.gif" title="arrow_sm.gif" /&gt; &lt;a href="http://phpdataservices.codeplex.com/Wiki/View.aspx?title=FAQ&amp;referringTitle=Home"&gt;FAQ&lt;/a&gt; &lt;img src="http://i3.codeplex.com/Project/Download/FileDownload.aspx?ProjectName=phpdataservices&amp;DownloadId=79225" alt="arrow_sm.gif" title="arrow_sm.gif" /&gt; &lt;a href="http://phpdataservices.codeplex.com/Wiki/View.aspx?title=Home&amp;referringTitle=Home&amp;ANCHOR#Contributors"&gt;Contributors&lt;/a&gt;&lt;br /&gt;
&lt;h1&gt;User Guide&lt;/h1&gt;&lt;h2&gt;Introduction&lt;/h2&gt;Toolkit for PHP with ADO.NET Data Services is designed to make it easier for PHP applications to consume data services created using the ADO .NET Data Services framework. The goal is to provide the same functionality that is available in the libraries available to .NET developers. The library includes support for accessing and modifying the data exposed by the ADO .NET Data Service. &lt;br /&gt;
&lt;h2&gt;Requirements&lt;/h2&gt;This toolkit requires the following frameworks to be installed and enabled &lt;br /&gt; &lt;a href="http://us2.php.net/xsl" class="externalLink"&gt;PHP XSL Extension&lt;span class="externalLinkIcon"&gt;&lt;/span&gt;&lt;/a&gt;&lt;br /&gt; &lt;a href="http://us2.php.net/curl" class="externalLink"&gt;PHP CURL Extension&lt;span class="externalLinkIcon"&gt;&lt;/span&gt;&lt;/a&gt;&lt;br /&gt;
&lt;h2&gt;Package Content&lt;/h2&gt; \Doc: 
&lt;ul&gt;&lt;li&gt;Toolkit User guide&lt;/li&gt;&lt;/ul&gt;
\Samples\ADODotNETDataServices: &lt;br /&gt; &lt;br /&gt;A Visual Studio 2008 project for two sample ADO .NET Data Services used by the sample applications included in the PHP Toolkit. The Visual Studio project creates two services: 
&lt;ul&gt;&lt;li&gt;NorthWindDataService: This service is used by the SimpleApplications and can be used to test the ADODotNETDataServicesEditor &lt;/li&gt;
&lt;li&gt;GameStoreDataService: service used by the Game Store sample Application.&lt;/li&gt;&lt;/ul&gt;
\Sample\PHPApplications: &lt;br /&gt; 
&lt;ul&gt;&lt;li&gt;ADODotNETDataServicesEditor: a PHP application that can be used to connect, browse, read and write data exposed by an ADO .NET Data Service. &lt;/li&gt;
&lt;li&gt;SimpleApplications: a list of simple HelloWorld-type applications that show how ADO .NET Data Services queries can be used to retrieve data from a server. &lt;/li&gt;
&lt;li&gt;VideoGameStoreApplication: a sample application that shows how ADO .NET Data Services can be used to access a remote data source.&lt;/li&gt;&lt;/ul&gt;
\framework: &lt;br /&gt; 
&lt;ul&gt;&lt;li&gt;Contains the source code for the tools used to generate the proxy class and to communicate with data service.&lt;/li&gt;&lt;/ul&gt;
&lt;h2&gt;Installation and Configuration&lt;/h2&gt;The assumption is that PHP is already installed and configured on the machine where the ADO .NET Data Services toolkit is installed.&lt;br /&gt;The toolkit does not have any dependency on the host OS so it can run on Windows, Linux or Mac OSX machines.&lt;br /&gt;
&lt;ul&gt;&lt;li&gt;Create a folder named 'adodotnetservicesphp' eg: C:\PHPLib\adodotnetservicesphp &lt;/li&gt;&lt;/ul&gt;

&lt;ul&gt;&lt;li&gt;Copy the following files to the folder created above. 
&lt;ul&gt;&lt;li&gt;ADODotNETDataServices2PHPProxy.xsl&lt;/li&gt;
&lt;li&gt;ADODotNETDataServicesEditor.php&lt;/li&gt;
&lt;li&gt;ADODotNETDataServicesEntity.php&lt;/li&gt;
&lt;li&gt;ADODotNETDataServicesException.php&lt;/li&gt;
&lt;li&gt;PHPDataSvcUtil.php&lt;/li&gt;
&lt;li&gt;HttpProxy.php&lt;/li&gt;
&lt;li&gt;Common (contains Dictionary.php, Guid.php and Utility.php)&lt;/li&gt;
&lt;li&gt;Context (contains EntityStates.php,  ObjectContext.php, QueryProcessor.php, RelatedEnd.php, ResourceBox.php and SaveResult.php)&lt;/li&gt;
&lt;li&gt;Credential (contains Credentail.php)&lt;/li&gt;
&lt;li&gt;Interfaces (contains Entity.php and Object.php)&lt;/li&gt;
&lt;li&gt;Parser (contains Parser.php, AtomParser.php and JSONParser.php)&lt;/li&gt;
&lt;li&gt;Resource (contains Messages.php)&lt;/li&gt;
&lt;li&gt;WebUtil (contains HttpBatchRequest.php, HttpBatchResponse.php, HttpRequest.php , HttpResponse.php and Microsoft&lt;i&gt;Http&lt;/i&gt;Response.php)&lt;/li&gt;&lt;/ul&gt;&lt;/li&gt;&lt;/ul&gt;

&lt;ul&gt;&lt;li&gt;Add the path to the folder created in step 1 to the 'include_path' directive in php.ini. e.g.&lt;/li&gt;&lt;/ul&gt;
&lt;pre&gt;   include_path = &amp;quot;.;C:\PHPLib\adodotnetservicesphp&amp;quot; 
&lt;/pre&gt;&lt;br /&gt;
&lt;ul&gt;&lt;li&gt;Create a variable called 'adodotnetservicesphp_path' in the php.ini file and set it to the path where the PHP Toolkit was installed (step 1). Open php.ini and search for 'Paths and Directories' section. Just below the definition of 'include_path' directive, add the following two lines:&lt;/li&gt;&lt;/ul&gt;
&lt;pre&gt;   ;Toolkit for PHP with ADO.NET Data Services Library Path
   adodotnetservicesphp_path = &amp;quot;C:\PHPLib\adodotnetservicesphp&amp;quot;          
&lt;/pre&gt;&lt;br /&gt;
&lt;ul&gt;&lt;li&gt;On linux platform, make sure you have the php-xml module installed. This can be installed using yum as follows,&lt;/li&gt;&lt;/ul&gt;
&lt;pre&gt;
   yum install php-xml
&lt;/pre&gt;&lt;br /&gt;
&lt;ul&gt;&lt;li&gt;Enable php_xsl.dll in php.ini. Search for 'extension=php_xsl.dll' in the php.ini file and remove the semicolon (;) in front.&lt;/li&gt;&lt;/ul&gt;

&lt;ul&gt;&lt;li&gt;Enable php_curl.dll in php.ini. Search for 'extension=php_curl.dll' in the php.ini file and remove the semicolon (;) in front.&lt;/li&gt;&lt;/ul&gt;

&lt;ul&gt;&lt;li&gt;Optional: The content of the PHPApplications directory can be deployed on a web server to provide access to the sample applications from a single web page. The PHPApplications directory contains some php files, template and CSS files that are used to build the Sample Web Page. All Samples must be configured before they can be ran from the Web Page. Refer to the readme files in the ADODotNETDataServiceEditor, SimpleApplications and GameStoreApplication directories. &lt;/li&gt;&lt;/ul&gt;

&lt;h2&gt;Creating Proxy Class&lt;/h2&gt;The first step is to create a proxy class that is used to connect to the ADO .NET Data service.&lt;br /&gt;The PHP client library provides a PHPDataSvcUtil.php file which creates the  proxy class. The command to create the class is&lt;br /&gt;&lt;pre&gt;
php &amp;lt;path of Client Libary&amp;gt;PHPDataSvcUtil.php /Uri:&amp;lt;data service Uri&amp;gt; [/metadata:&amp;lt;path to metadata file&amp;gt; [/out:&amp;lt;output file path&amp;gt;] 
&lt;/pre&gt;&lt;br /&gt;&amp;lt;Path of Toolkit Library&amp;gt; is the path where the toolkit library files are installed (See the installation instructions). &lt;br /&gt;If file name is not specified with the /Out parameters, the Entity Container name (defined in the ADO .NET Data Service) is used as filename. If the output path is not specified then the proxy class will be generated by PHPDataSvcUtil in the current directory. &lt;br /&gt;The metadata param can be used to specify a medata file saved on the local machine. The PHPDataSvcUtil will use the saved file and won’t connect to ADO .NET Data Service. Uri and metadata params are mutually exclusive.&lt;br /&gt;Note:  In order to use this utility, the configuration option {'adodotnetservicesphp_path'} should be set in php.ini configuration file. (Refer Installation and Configuration section for more details).&lt;br /&gt;
&lt;h2&gt;Using Proxy Class&lt;/h2&gt;After the proxy class for the ADO .NET Data Service has been created, it can be used in the application to access the data on the server. The proxy class generated by the PHPDataSvcUtil needs to be included first: &lt;br /&gt;&lt;pre&gt;
require_once 'MyProxyClass.php';
&lt;/pre&gt;&lt;br /&gt;The MyProxyClass.php file, in this case, contains the definition of a class that can be use to execute various queries using the ExecuteQuery method.&lt;br /&gt;The following code snippet shows an example on how to use the proxy class to access a customer record for a service that exposes the NorthWind database. &lt;br /&gt;The goal is to retrieve the record for the Costumer with CustomerID=’ALFKI’ &lt;br /&gt;&lt;pre&gt;
$proxy = new NorthwindEntities();
$customers = $proxy-&amp;gt;ExecuteQuery(“Customers(‘ALFKI’)”);
echo ($customers-CompanyName);
&lt;/pre&gt;&lt;br /&gt;This code sample uses the proxy class to connect to the ADO .NET Data Service, retrieves a customer and prints the CompanyName field using the customers class defined in the myproxyclass.php file. &lt;br /&gt;
&lt;h2&gt;Data Service Queries&lt;/h2&gt;The data service queries are conditions that determine what data is retrieved from the ADO .NET Data Service. There are five Data Service Queries supported by the Toolkit for PHP with ADO.NET Data Services.
&lt;ul&gt;&lt;li&gt;Expand&lt;/li&gt;
&lt;li&gt;Filter&lt;/li&gt;
&lt;li&gt;OrderBy&lt;/li&gt;
&lt;li&gt;Skip&lt;/li&gt;
&lt;li&gt;Top&lt;/li&gt;&lt;/ul&gt;
Complete documentation on the Data Service Queries can be found on the &lt;a href="http://msdn.microsoft.com/en-us/library/cc668791.aspx" class="externalLink"&gt;MSDN&lt;span class="externalLinkIcon"&gt;&lt;/span&gt;&lt;/a&gt; site&lt;br /&gt;
&lt;h2&gt;Expand Query&lt;/h2&gt;The ‘expand’ option allows you to embed one or more sets of related entities in the results. For example, if you want to display a customer and its sales orders, you could execute two requests, one for Customers(‘ALFKI’) and one for Customers(‘ALFKI’)Orders. The ‘expand’ option on the other hand allows you to return the related entities in-line with the response of the parent in a single HTTP request.&lt;br /&gt;You may specify multiple navigation properties to expand by separating them with commas, and you may traverse more than one relationship by using a dot to jump to the next navigation property.&lt;br /&gt;Examples:&lt;br /&gt;&lt;pre&gt;
// a customer with related sales orders 
$customers = $proxy-&amp;gt;ExecuteQuery(“Customers(‘ALFKI’)?\$expand=Orders);
echo count($customers-Orders);

// a customer with related sales orders and employee information related to those orders 
$customers = $proxy-ExecuteQuery(“Customers(‘ALFKI’)?\$expand=Orders/Employees); 
echo count($customers-&amp;gt;Orders(10248)-&amp;gt;Employees);

 //Orders with related employees information and related shipper information 
$customers = $proxy-&amp;gt;ExecuteQuery(“Orders(10248)\$expand=Employees,Shippers);
echo count($customers-&amp;gt;Employees(5)-&amp;gt;Shippers);
echo count($customers-&amp;gt;Employees);
&lt;/pre&gt;&lt;br /&gt;Note “$” is a special key in PHP, therefore “\” is added before “$” in the query.&lt;br /&gt;
&lt;h2&gt;Filter Query&lt;/h2&gt;Restrict the entities returned from a query by applying the expression specified in this operator to the entity set identified by the last segment of the URI path.&lt;br /&gt;For example&lt;br /&gt;&lt;pre&gt;
 //all customers in London 
$customers = $proxy-ExecuteQuery(“Customers?\$filter=City eq ‘London’);

 //Match all Customers with the value of the property ‘fullname’ equal to ‘Wayne, John’ 
$customers = $proxy-ExecuteQuery(“Customers?\$filter='Wayne, John' eq insert(ContactName, length(lastname), ','));
&lt;/pre&gt;&lt;br /&gt;Conditions that can be used in the filter condition are&lt;br /&gt;&lt;br /&gt;&lt;table&gt;&lt;tr&gt;&lt;th&gt; Condition &lt;/th&gt;&lt;th&gt; Description &lt;/th&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt; Eq &lt;/td&gt;&lt;td&gt; Equals &lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt; Ne &lt;/td&gt;&lt;td&gt; Not equals &lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt; Lt &lt;/td&gt;&lt;td&gt; Less than &lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt; Le &lt;/td&gt;&lt;td&gt; Less than or equal &lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt; Gt &lt;/td&gt;&lt;td&gt; Greater than &lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt; Ge &lt;/td&gt;&lt;td&gt; Greater than or equal &lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;&lt;br /&gt;
&lt;h2&gt;Order By Query&lt;/h2&gt;Sort the results by the criteria given in this value. Multiple properties can be indicated by separating them with a comma. The sort order can be controlled by using the “asc” (default) and “desc” modifiers.&lt;br /&gt;For example&lt;br /&gt;&lt;pre&gt;
$customers = $proxy-&amp;gt;ExecuteQuery(“Customers?\$orderby=City);
$customers = $proxy-&amp;gt;ExecuteQuery(“Customers?\$orderby=City desc);
$customers = $proxy-&amp;gt;ExecuteQuery(“Customers?\$orderby=City desc,CompanyName asc);
&lt;/pre&gt;&lt;br /&gt;
&lt;h2&gt;Skip Query&lt;/h2&gt;Skip the number of rows given in this parameter when returning results. This is useful in combination with “top” to implement paging (e.g. if using 10-entity pages, saying $skip=30&amp;amp;top=$10 would return the fourth page).&lt;br /&gt;NOTE: Skip only makes sense on sorted sets; if an orderby option is included, ‘skip’ will skip entities in the order given by that option. If no orderby option is given, ‘skip’ will sort the entities by primary key and then perform the skip operation.&lt;br /&gt;For example:&lt;br /&gt;&lt;pre&gt;
 //return all customers except the first 10 
$customers = $proxy-&amp;gt;ExecuteQuery(“Customers?\$skip=10);

 //return the 4th page, in 10-row pages 
$customers = $proxy-&amp;gt;ExecuteQuery(“Customers?\$skip=30&amp;amp;\top=10);
&lt;/pre&gt;&lt;br /&gt;
&lt;h2&gt;Top Query&lt;/h2&gt;Restrict the maximum number of entities to be returned. This option is useful both by itself and in combination with skip, where it can be used to implement paging as discussed in the description of ‘skip’.&lt;br /&gt;&lt;pre&gt;
 //top 5 sales orders 
$customers = $proxy-ExecuteQuery(“Customers?\$top=5);

 //top 5 sales orders with the highest TotalDue 
$customers = $proxy-ExecuteQuery(“Orders?\$orderby=TotalDue&amp;amp;\$top=5);
&lt;/pre&gt;&lt;br /&gt;
&lt;h2&gt;Creating new instance in data service&lt;/h2&gt;In this scenario a new object is created on the client and then made persistent by saving it on the database exposed by the ADO .NET Data Service.&lt;br /&gt;To create a new instance in the data service, first a new php object needs to be created and the required properties populated, then by calling AddObject and passing the object and the target entity-set, the object is added to the collection of objects in the database. A final call to the SaveChanges method makes the actual call that will save the new object in the database. The Following code snippet shows how to use this functionality. &lt;br /&gt;&lt;pre&gt;
require_once 'MyProxyClass.php'; 

$proxy = new NorthwindEntities(); 

//Create a Customers php Object  

$customer = Customers::CreateCustomers(&amp;quot;CHAN9&amp;quot;, &amp;quot;channel9&amp;quot;); 

//inserting Customers object context tracking system  

$proxy-&amp;gt;AddObject(‘Customers’, $customer); 

//SaveChange insert the object into data service 

$proxy-&amp;gt;SaveChanges();
 &lt;/pre&gt;&lt;br /&gt;
&lt;h2&gt;Updating an existing instance in data service&lt;/h2&gt;To update an existing instance in the data service, first an instance from data service needs to be retrieved using the ExecuteQuery or LoadProperty methods. After the object has been retrieved and the properties set with the new values a call to the UpdateObject applies the changes to the table(s) in the database. The following code snippet shows how to use UpdateObject API. &lt;br /&gt;&lt;pre&gt;
require_once 'MyProxyClass.php'; 

$proxy = new NorthwindEntities(); 
$customers = $proxy-&amp;gt;ExecuteQuery(“Customers(‘CHAN9’)); 

//update the CompanyName property 

$customer-&amp;gt;CompanyName = &amp;quot;Channel8&amp;quot;; 

//add the object to the list of objects that needs to be updated in the database 

$proxy-&amp;gt;UpdateObject($customer); 

//SaveChanges updates the object in the data service 

$proxy-&amp;gt;SaveChanges();
 &lt;/pre&gt;&lt;br /&gt;
&lt;h2&gt;Deleting an existing instance from data service&lt;/h2&gt;Similar to the Update scenario, to delete an existing instance in the data service, first an instance needs to be retrieved using ExecuteQuery or LoadProperty methods, then a call to the DeleteObject methods adds the objects to the list of objects that needs to be deleted in the database. . The following code snippet shows how to use DeleteObject API. &lt;br /&gt;&lt;pre&gt;
require_once 'MyProxyClass.php'; 

$proxy = new NorthwindEntities(); 

//Get the object by calling the ExecuteQuery Method
 
$customers = $proxy-&amp;gt;ExecuteQuery(“Customers(‘CHAN9)); 

//The object is added to the list of objects to delete in the database 

$proxy-&amp;gt;DeleteObject($customer); 

//SaveChanges makes the actual changes in the database  

$proxy-&amp;gt;SaveChanges(); 
 &lt;/pre&gt;&lt;br /&gt;
&lt;h2&gt;Creating link between instances&lt;/h2&gt;If you have a relationship between two entities in the data service, then you can use AddLink to create relationship between the corresponding entity instances. The following code snippet shows how to create link between a Customers instance and Orders instances. &lt;br /&gt;&lt;pre&gt;
require_once 'MyProxyClass.php'; 

$proxy = new NorthwindEntities(); 

//Create a Customers instance  

$customer = new Customers(); 
$customer -&amp;gt;CustomerID = 'CHAN9'; 
$customer -&amp;gt;CompanyName = 'channel9'; 
$proxy-&amp;gt;AddToCustomers($customer); 

//Create an Orders instance 

$Order = new Orders(); 

//Create link between Customer and Order. 

$proxy-&amp;gt;AddLink($cust, &amp;quot;Orders&amp;quot;, $ Order); 
$proxy-&amp;gt;SaveChanges(); 
 &lt;/pre&gt;&lt;br /&gt;
&lt;h2&gt;Deleting link between instances &lt;/h2&gt;If you have two related entity instances in data service, then you can use DeleteLink to remove the relationship between these two. The following code snippet shows how to delete the link. &lt;br /&gt;&lt;pre&gt;
require_once 'MyProxyClass.php'; 

$proxy = new NorthwindEntities(); 

//Retrive the Customers entity with key ‘CHAN9’  

$query = $proxy-&amp;gt;ExecuteQuery(&amp;quot;Customers(CustomerID='CHAN9')&amp;quot;) 
foreach($query as $customer) 
{ 
//Load the Orders property 

$proxy-&amp;gt;LoadProperty($customer, &amp;quot;Orders&amp;quot;) ; 
foreach($customer-&amp;gt;Orders as $o) 
{ 
$proxy-&amp;gt;DeleteLink($customer, &amp;quot;Orders&amp;quot;, $o); 
} 
} 

$proxy-&amp;gt;SaveChanges(); 
 &lt;/pre&gt;&lt;br /&gt;
&lt;h2&gt;Authentication in the Client Library&lt;/h2&gt;This toolkit also handles authentication. By default, the client library assumes the ADO .NET Data Service uses an anonymous connection so user credentials don't need to be specified.. However, you can set the Credentials property in the proxy object to point to an object holding the credential information. The Credential property will be used if the ADO .NET Data Service requires the user to be authenticated. &lt;br /&gt;&lt;pre&gt;
$proxy-&amp;gt;Credential = new Credential(user-name, password); 
 &lt;/pre&gt;&lt;br /&gt;
&lt;h2&gt;Custom authentication Support&lt;/h2&gt;In more advanced scenario, the client application might need to set custom headers; the toolkit exposed the addHeader method for that. To remove the custom headers which are added call RemoveHeaders. The following code snippet shows how to use this functionality. &lt;br /&gt;&lt;pre&gt;
$proxy-&amp;gt;AddHeader(custom-header-name, custom-header-value); 
$proxy-&amp;gt;RemoveHeaders(); 
 &lt;/pre&gt;&lt;br /&gt;
&lt;h2&gt;Connecting to Data Service through proxy server&lt;/h2&gt;If connecting to data service requires proxy server, you can set the Proxy property in the Httpproxy object to point to an object holding the proxy server information. &lt;br /&gt;&lt;pre&gt;
$proxy-&amp;gt;HttpProxy = new HttpProxy(proxy-server-name, proxy-server-port);  
 &lt;/pre&gt;&lt;br /&gt;
&lt;h1&gt;Sample Applications&lt;/h1&gt;Sample Application included in the toolkit can be found under the SamplesPHPApplications.&lt;br /&gt;
&lt;h2&gt;Simple Demo and ADO .NET Data Services Editor Applications&lt;/h2&gt;Simple Demo and ADO .NET Data Services Editor applications use the NorthWindDataService service that can be built with the Visual Studio project under the \Samples\ADODotNETDataServices directory. If you changed any of the default settings in the Visual Studio project, you will have to regenerate the proxy class (NorthWindEntities.php) before you can run the sample application.&lt;br /&gt;
&lt;h2&gt;Game Store Application&lt;/h2&gt;The Game Store sample application uses the GameStoreDataService that can be built using the Visual Studio project under the \Samples\ADODotNETDataServices directory. If you changed any of the default settings in the Visual Studio project, you will have to regenerate the proxy class (VideoGameStoreEntities.php) before you can run the sample application.&lt;br /&gt;
&lt;h2&gt;Reference Section&lt;/h2&gt;List of APIs supported by PHP Client Library.&lt;br /&gt;&lt;table&gt;&lt;tr&gt;&lt;th&gt; API Prototype &lt;/th&gt;&lt;th&gt;  Parameters &lt;/th&gt;&lt;th&gt;  Return Value &lt;/th&gt;&lt;th&gt;   Description &lt;/th&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt; ExecuteQuery(query-expression)  &lt;/td&gt;&lt;td&gt; The query to be executed against data service. Please refer ‘Data Service Queries’ section for more details &lt;/td&gt;&lt;td&gt; &lt;i&gt;OnSuccess&lt;/i&gt;: Returns result of query as a collection. &lt;i&gt;OnFailure&lt;/i&gt;: If any error occurs (ex: malformed query), then client library will throw &lt;b&gt;ADODotNETDataServicesException&lt;/b&gt; exception with proper message.  &lt;/td&gt;&lt;td&gt; To execute queries against the data service &lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt; AddObject(Target&lt;i&gt;Entity&lt;/i&gt;Set, Object) &lt;/td&gt;&lt;td&gt; &lt;b&gt;Target&lt;i&gt;Entity&lt;/i&gt;Set&lt;/b&gt; : The name of entity set to which Object belongs to. &lt;b&gt;Object&lt;/b&gt; : PHP Object represents the instance of a data service entity to be inserted. &lt;/td&gt;&lt;td&gt; &lt;i&gt;OnSuccess&lt;/i&gt;: Returns 1 &lt;i&gt;OnFailure&lt;/i&gt;: If any error occurs (ex: if entity instance already exists), then client library will throw ADODotNETDataServicesException exception with proper message &lt;/td&gt;&lt;td&gt;  To create a new instance in the data service &lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt; UpdateObject(Object) &lt;/td&gt;&lt;td&gt; &lt;b&gt;Object&lt;/b&gt; : PHP Object represents the existng instance of a data service entity, which is to be updated. &lt;/td&gt;&lt;td&gt; &lt;i&gt;OnSuccess&lt;/i&gt;: Returns 1 &lt;i&gt;OnFailure&lt;/i&gt;: If any error occurs (ex: if entity instance not exists), then client library will throw &lt;b&gt;ADODotNETDataServicesException&lt;/b&gt; exception with proper message. &lt;/td&gt;&lt;td&gt; To modify an existing entity instance. &lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt; DeleteObject(Object) &lt;/td&gt;&lt;td&gt; &lt;b&gt;Object&lt;/b&gt; : PHP Object represents the existing instance of a data service entity, which is to be deleted. &lt;/td&gt;&lt;td&gt; &lt;i&gt;OnSuccess&lt;/i&gt;: Returns 1 &lt;i&gt;OnFaliure&lt;/i&gt;: If any error occurs (ex: if entity instance not exists), then client library will throw &lt;b&gt;ADODotNETDataServicesException&lt;/b&gt; exception with proper message. &lt;/td&gt;&lt;td&gt; To delete an entity instance. &lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt; AddLink(Source, SourceProperty, Target) &lt;/td&gt;&lt;td&gt; &lt;b&gt;Source&lt;/b&gt;: The source object in the link. &lt;b&gt;SourceProperty&lt;/b&gt;: The name of the property on the source object that represents the source in the link between the source and the target. &lt;b&gt;Target&lt;/b&gt;: The target object involved in the link that is bound to the source object. &lt;/td&gt;&lt;td&gt;  &lt;i&gt;OnSuccess&lt;/i&gt;: Returns 1 &lt;i&gt;OnFailure&lt;/i&gt;: If any error occurs, then client library will throw &lt;b&gt;ADODotNETDataServicesException&lt;/b&gt; exception with proper message.  &lt;/td&gt;&lt;td&gt;  To add a link between two entity instances, assuming that there is a relationship between Two entities &lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt; DeleteLink(Source, SourceProperty, Target) &lt;/td&gt;&lt;td&gt;  &lt;b&gt;Source&lt;/b&gt;: The source object in the link. &lt;b&gt;SourceProperty&lt;/b&gt;: The name of the property on the source object that represents the source in the link between the source and the target. &lt;b&gt;Target&lt;/b&gt;: The target object involved in the link that is bound to the source object. &lt;/td&gt;&lt;td&gt; &lt;i&gt;OnSuccess&lt;/i&gt;: Returns 1 &lt;i&gt;OnFailure&lt;/i&gt;: If any error occurs, then client library will throw &lt;b&gt;ADODotNETDataServicesException&lt;/b&gt; exception with proper message. &lt;/td&gt;&lt;td&gt;  To delete link between two entity instances. &lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt; AddHeader(Header-Name, Header-Value)  &lt;/td&gt;&lt;td&gt;  &lt;b&gt;Header-Name&lt;/b&gt;: The name of custom HTTP header &lt;b&gt;Header-Value&lt;/b&gt;: The value of custom HTTP header. &lt;/td&gt;&lt;td&gt; No return value. &lt;/td&gt;&lt;td&gt; To add custom headers &lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt; RemoveHeaders() &lt;/td&gt;&lt;td&gt; No argument&lt;/td&gt;&lt;td&gt;  No Return value &lt;/td&gt;&lt;td&gt;  To Remove all custom headers aded by user  &lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt; SaveChanges()  &lt;/td&gt;&lt;td&gt; No arguments &lt;/td&gt;&lt;td&gt;  Thows &lt;b&gt;ADODotNETDataServicesException&lt;/b&gt; exception with proper message if any of the command generated for changes fails. &lt;/td&gt;&lt;td&gt; To save the changes made to the entities in the context to data service.  &lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;&lt;/div&gt;&lt;div class="ClearBoth"&gt;&lt;/div&gt;</description><author>anu_chandy</author><pubDate>Tue, 15 Sep 2009 07:41:26 GMT</pubDate><guid isPermaLink="false">Updated Wiki: UserGuide 20090915074126A</guid></item><item><title>Updated Wiki: UserGuide</title><link>http://phpdataservices.codeplex.com/Wiki/View.aspx?title=UserGuide&amp;version=20</link><description>&lt;div class="wikidoc"&gt;&lt;a href="http://phpdataservices.codeplex.com/Wiki/View.aspx?title=Home&amp;referringTitle=Home&amp;ANCHOR#Overview"&gt;Overview&lt;/a&gt; &lt;img src="http://i3.codeplex.com/Project/Download/FileDownload.aspx?ProjectName=phpdataservices&amp;DownloadId=79225" alt="arrow_sm.gif" title="arrow_sm.gif" /&gt; &lt;a href="http://phpdataservices.codeplex.com/Wiki/View.aspx?title=Home&amp;referringTitle=Home&amp;ANCHOR#Architecture"&gt;Architecture&lt;/a&gt; &lt;img src="http://i3.codeplex.com/Project/Download/FileDownload.aspx?ProjectName=phpdataservices&amp;DownloadId=79225" alt="arrow_sm.gif" title="arrow_sm.gif" /&gt; &lt;a href="http://phpdataservices.codeplex.com/Wiki/View.aspx?title=InstallationGuide&amp;referringTitle=Home"&gt;Installation Guide&lt;/a&gt; &lt;img src="http://i3.codeplex.com/Project/Download/FileDownload.aspx?ProjectName=phpdataservices&amp;DownloadId=79225" alt="arrow_sm.gif" title="arrow_sm.gif" /&gt; &lt;a href="http://phpdataservices.codeplex.com/Wiki/View.aspx?title=UserGuide&amp;referringTitle=Home"&gt;User Guide&lt;/a&gt; &lt;img src="http://i3.codeplex.com/Project/Download/FileDownload.aspx?ProjectName=phpdataservices&amp;DownloadId=79225" alt="arrow_sm.gif" title="arrow_sm.gif" /&gt; &lt;a href="http://phpdataservices.codeplex.com/Wiki/View.aspx?title=FAQ&amp;referringTitle=Home"&gt;FAQ&lt;/a&gt; &lt;img src="http://i3.codeplex.com/Project/Download/FileDownload.aspx?ProjectName=phpdataservices&amp;DownloadId=79225" alt="arrow_sm.gif" title="arrow_sm.gif" /&gt; &lt;a href="http://phpdataservices.codeplex.com/Wiki/View.aspx?title=Home&amp;referringTitle=Home&amp;ANCHOR#Contributors"&gt;Contributors&lt;/a&gt;&lt;br /&gt;
&lt;h1&gt;User Guide&lt;/h1&gt;&lt;h2&gt;Introduction&lt;/h2&gt;Toolkit for PHP with ADO.NET Data Services is designed to make it easier for PHP applications to consume data services created using the ADO .NET Data Services framework. The goal is to provide the same functionality that is available in the libraries available to .NET developers. The library includes support for accessing and modifying the data exposed by the ADO .NET Data Service. &lt;br /&gt;
&lt;h2&gt;Requirements&lt;/h2&gt;This toolkit requires the following frameworks to be installed and enabled &lt;br /&gt; &lt;a href="http://us2.php.net/xsl" class="externalLink"&gt;PHP XSL Extension&lt;span class="externalLinkIcon"&gt;&lt;/span&gt;&lt;/a&gt;&lt;br /&gt; &lt;a href="http://us2.php.net/curl" class="externalLink"&gt;PHP CURL Extension&lt;span class="externalLinkIcon"&gt;&lt;/span&gt;&lt;/a&gt;&lt;br /&gt;
&lt;h2&gt;Package Content&lt;/h2&gt; \Doc: 
&lt;ul&gt;&lt;li&gt;Toolkit User guide&lt;/li&gt;&lt;/ul&gt;
\Samples\ADODotNETDataServices: &lt;br /&gt; &lt;br /&gt;A Visual Studio 2008 project for two sample ADO .NET Data Services used by the sample applications included in the PHP Toolkit. The Visual Studio project creates two services: 
&lt;ul&gt;&lt;li&gt;NorthWindDataService: This service is used by the SimpleApplications and can be used to test the ADODotNETDataServicesEditor &lt;/li&gt;
&lt;li&gt;GameStoreDataService: service used by the Game Store sample Application.&lt;/li&gt;&lt;/ul&gt;
\Sample\PHPApplications: &lt;br /&gt; 
&lt;ul&gt;&lt;li&gt;ADODotNETDataServicesEditor: a PHP application that can be used to connect, browse, read and write data exposed by an ADO .NET Data Service. &lt;/li&gt;
&lt;li&gt;SimpleApplications: a list of simple HelloWorld-type applications that show how ADO .NET Data Services queries can be used to retrieve data from a server. &lt;/li&gt;
&lt;li&gt;VideoGameStoreApplication: a sample application that shows how ADO .NET Data Services can be used to access a remote data source.&lt;/li&gt;&lt;/ul&gt;
\framework: &lt;br /&gt; 
&lt;ul&gt;&lt;li&gt;Contains the source code for the tools used to generate the proxy class and to communicate with data service.&lt;/li&gt;&lt;/ul&gt;
&lt;h2&gt;Installation and Configuration&lt;/h2&gt;The assumption is that PHP is already installed and configured on the machine where the ADO .NET Data Services toolkit is installed.&lt;br /&gt;The toolkit does not have any dependency on the host OS so it can run on Windows, Linux or Mac OSX machines.&lt;br /&gt;
&lt;ul&gt;&lt;li&gt;Create a folder named 'adodotnetservicesphp' eg: C:\PHPLib\adodotnetservicesphp &lt;/li&gt;&lt;/ul&gt;

&lt;ul&gt;&lt;li&gt;Copy the following files to the folder created above. 
&lt;ul&gt;&lt;li&gt;ADODotNETDataServices2PHPProxy.xsl&lt;/li&gt;
&lt;li&gt;ADODotNETDataServicesEditor.php&lt;/li&gt;
&lt;li&gt;ADODotNETDataServicesEntity.php&lt;/li&gt;
&lt;li&gt;ADODotNETDataServicesException.php&lt;/li&gt;
&lt;li&gt;PHPDataSvcUtil.php&lt;/li&gt;
&lt;li&gt;HttpProxy.php&lt;/li&gt;
&lt;li&gt;Common (contains Dictionary.php, Guid.php and Utility.php)&lt;/li&gt;
&lt;li&gt;Context (contains EntityStates.php,  ObjectContext.php, QueryProcessor.php, RelatedEnd.php, ResourceBox.php and SaveResult.php)&lt;/li&gt;
&lt;li&gt;Credential (contains Credentail.php)&lt;/li&gt;
&lt;li&gt;Interfaces (contains Entity.php and Object.php)&lt;/li&gt;
&lt;li&gt;Parser (contains Parser.php, AtomParser.php and JSONParser.php)&lt;/li&gt;
&lt;li&gt;Resource (contains Messages.php)&lt;/li&gt;
&lt;li&gt;WebUtil (contains HttpBatchRequest.php, HttpBatchResponse.php, HttpRequest.php , HttpResponse.php and Microsoft&lt;i&gt;Http&lt;/i&gt;Response.php)&lt;/li&gt;&lt;/ul&gt;&lt;/li&gt;&lt;/ul&gt;

&lt;ul&gt;&lt;li&gt;Add the path to the folder created in step 1 to the 'include_path' directive in php.ini. e.g.&lt;/li&gt;&lt;/ul&gt;
&lt;pre&gt;   include_path = &amp;quot;.;C:\PHPLib\adodotnetservicesphp&amp;quot; 
&lt;/pre&gt;&lt;br /&gt;
&lt;ul&gt;&lt;li&gt;Create a variable called 'adodotnetservicesphp_path' in the php.ini file and set it to the path where the PHP Toolkit was installed (step 1). Open php.ini and search for 'Paths and Directories' section. Just below the definition of 'include_path' directive, add the following two lines:&lt;/li&gt;&lt;/ul&gt;
&lt;pre&gt;   ;Toolkit for PHP with ADO.NET Data Services Library Path
   adodotnetservicesphp_path = &amp;quot;C:\PHPLib\adodotnetservicesphp&amp;quot;          
&lt;/pre&gt;&lt;br /&gt;
&lt;ul&gt;&lt;li&gt;On linux platform, make sure you have the php-xml module installed. This can be installed using yum as follows,&lt;/li&gt;&lt;/ul&gt;
&lt;pre&gt;
   yum install php-xml
&lt;/pre&gt;&lt;br /&gt;
&lt;ul&gt;&lt;li&gt;Enable php_xsl.dll in php.ini. Search for 'extension=php_xsl.dll' in the php.ini file and remove the semicolon (;) in front.&lt;/li&gt;&lt;/ul&gt;

&lt;ul&gt;&lt;li&gt;Enable php_curl.dll in php.ini. Search for 'extension=php_curl.dll' in the php.ini file and remove the semicolon (;) in front.&lt;/li&gt;&lt;/ul&gt;

&lt;ul&gt;&lt;li&gt;Optional: The content of the PHPApplications directory can be deployed on a web server to provide access to the sample applications from a single web page. The PHPApplications directory contains some php files, template and CSS files that are used to build the Sample Web Page. All Samples must be configured before they can be ran from the Web Page. Refer to the readme files in the ADODotNETDataServiceEditor, SimpleApplications and GameStoreApplication directories. &lt;/li&gt;&lt;/ul&gt;

&lt;h2&gt;Creating Proxy Class&lt;/h2&gt;The first step is to create a proxy class that is used to connect to the ADO .NET Data service.&lt;br /&gt;The PHP client library provides a PHPDataSvcUtil.php file which creates the  proxy class. The command to create the class is&lt;br /&gt;&lt;pre&gt;
php &amp;lt;path of Client Libary&amp;gt;PHPDataSvcUtil.php /Uri:&amp;lt;data service Uri&amp;gt; [/metadata:&amp;lt;path to metadata file&amp;gt; [/out:&amp;lt;output file path&amp;gt;] 
&lt;/pre&gt;&lt;br /&gt;&amp;lt;Path of Toolkit Library&amp;gt; is the path where the toolkit library files are installed (See the installation instructions). &lt;br /&gt;If file name is not specified with the /Out parameters, the Entity Container name (defined in the ADO .NET Data Service) is used as filename. If the output path is not specified then the proxy class will be generated by PHPDataSvcUtil in the current directory. &lt;br /&gt;The metadata param can be used to specify a medata file saved on the local machine. The PHPDataSvcUtil will use the saved file and won’t connect to ADO .NET Data Service. Uri and metadata params are mutually exclusive.&lt;br /&gt;Note:  In order to use this utility, the configuration option {'adodotnetservicesphp_path'} should be set in php.ini configuration file. (Refer Installation and Configuration section for more details).&lt;br /&gt;
&lt;h2&gt;Using Proxy Class&lt;/h2&gt;After the proxy class for the ADO .NET Data Service has been created, it can be used in the application to access the data on the server. The proxy class generated by the PHPDataSvcUtil needs to be included first: &lt;br /&gt;&lt;pre&gt;
require_once 'MyProxyClass.php';
&lt;/pre&gt;&lt;br /&gt;The MyProxyClass.php file, in this case, contains the definition of a class that can be use to execute various queries using the ExecuteQuery method.&lt;br /&gt;The following code snippet shows an example on how to use the proxy class to access a customer record for a service that exposes the NorthWind database. &lt;br /&gt;The goal is to retrieve the record for the Costumer with CustomerID=’ALFKI’ &lt;br /&gt;&lt;pre&gt;
$proxy = new NorthwindEntities();
$customers = $proxy-&amp;gt;ExecuteQuery(“Customers(‘ALFKI’)”);
echo ($customers-CompanyName);
&lt;/pre&gt;&lt;br /&gt;This code sample uses the proxy class to connect to the ADO .NET Data Service, retrieves a customer and prints the CompanyName field using the customers class defined in the myproxyclass.php file. &lt;br /&gt;
&lt;h2&gt;Data Service Queries&lt;/h2&gt;The data service queries are conditions that determine what data is retrieved from the ADO .NET Data Service. There are five Data Service Queries supported by the Toolkit for PHP with ADO.NET Data Services.
&lt;ul&gt;&lt;li&gt;Expand&lt;/li&gt;
&lt;li&gt;Filter&lt;/li&gt;
&lt;li&gt;OrderBy&lt;/li&gt;
&lt;li&gt;Skip&lt;/li&gt;
&lt;li&gt;Top&lt;/li&gt;&lt;/ul&gt;
Complete documentation on the Data Service Queries can be found on the &lt;a href="http://msdn.microsoft.com/en-us/library/cc668791.aspx" class="externalLink"&gt;MSDN&lt;span class="externalLinkIcon"&gt;&lt;/span&gt;&lt;/a&gt; site&lt;br /&gt;
&lt;h2&gt;Expand Query&lt;/h2&gt;The ‘expand’ option allows you to embed one or more sets of related entities in the results. For example, if you want to display a customer and its sales orders, you could execute two requests, one for Customers(‘ALFKI’) and one for Customers(‘ALFKI’)Orders. The ‘expand’ option on the other hand allows you to return the related entities in-line with the response of the parent in a single HTTP request.&lt;br /&gt;You may specify multiple navigation properties to expand by separating them with commas, and you may traverse more than one relationship by using a dot to jump to the next navigation property.&lt;br /&gt;Examples:&lt;br /&gt;&lt;pre&gt;
// a customer with related sales orders 
$customers = $proxy-&amp;gt;ExecuteQuery(“Customers(‘ALFKI’)?\$expand=Orders);
echo count($customers-Orders);

// a customer with related sales orders and employee information related to those orders 
$customers = $proxy-ExecuteQuery(“Customers(‘ALFKI’)?\$expand=Orders/Employees); 
echo count($customers-&amp;gt;Orders(10248)-&amp;gt;Employees);

 //Orders with related employees information and related shipper information 
$customers = $proxy-&amp;gt;ExecuteQuery(“Orders(10248)\$expand=Employees,Shippers);
echo count($customers-&amp;gt;Employees(5)-&amp;gt;Shippers);
echo count($customers-&amp;gt;Employees);
&lt;/pre&gt;&lt;br /&gt;Note “$” is a special key in PHP, therefore “\” is added before “$” in the query.&lt;br /&gt;
&lt;h2&gt;Filter Query&lt;/h2&gt;Restrict the entities returned from a query by applying the expression specified in this operator to the entity set identified by the last segment of the URI path.&lt;br /&gt;For example&lt;br /&gt;&lt;pre&gt;
 //all customers in London 
$customers = $proxy-ExecuteQuery(“Customers?\$filter=City eq ‘London’);

 //Match all Customers with the value of the property ‘fullname’ equal to ‘Wayne, John’ 
$customers = $proxy-ExecuteQuery(“Customers?\$filter='Wayne, John' eq insert(ContactName, length(lastname), ','));
&lt;/pre&gt;&lt;br /&gt;Conditions that can be used in the filter condition are&lt;br /&gt;&lt;br /&gt;&lt;table&gt;&lt;tr&gt;&lt;th&gt; Condition &lt;/th&gt;&lt;th&gt; Description &lt;/th&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt; Eq &lt;/td&gt;&lt;td&gt; Equals &lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt; Ne &lt;/td&gt;&lt;td&gt; Not equals &lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt; Lt &lt;/td&gt;&lt;td&gt; Less than &lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt; Le &lt;/td&gt;&lt;td&gt; Less than or equal &lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt; Gt &lt;/td&gt;&lt;td&gt; Greater than &lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt; Ge &lt;/td&gt;&lt;td&gt; Greater than or equal &lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;&lt;br /&gt;
&lt;h2&gt;Order By Query&lt;/h2&gt;Sort the results by the criteria given in this value. Multiple properties can be indicated by separating them with a comma. The sort order can be controlled by using the “asc” (default) and “desc” modifiers.&lt;br /&gt;For example&lt;br /&gt;&lt;pre&gt;
$customers = $proxy-&amp;gt;ExecuteQuery(“Customers?\$orderby=City);
$customers = $proxy-&amp;gt;ExecuteQuery(“Customers?\$orderby=City desc);
$customers = $proxy-&amp;gt;ExecuteQuery(“Customers?\$orderby=City desc,CompanyName asc);
&lt;/pre&gt;&lt;br /&gt;
&lt;h2&gt;Skip Query&lt;/h2&gt;Skip the number of rows given in this parameter when returning results. This is useful in combination with “top” to implement paging (e.g. if using 10-entity pages, saying $skip=30&amp;amp;top=$10 would return the fourth page).&lt;br /&gt;NOTE: Skip only makes sense on sorted sets; if an orderby option is included, ‘skip’ will skip entities in the order given by that option. If no orderby option is given, ‘skip’ will sort the entities by primary key and then perform the skip operation.&lt;br /&gt;For example:&lt;br /&gt;&lt;pre&gt;
 //return all customers except the first 10 
$customers = $proxy-&amp;gt;ExecuteQuery(“Customers?\$skip=10);

 //return the 4th page, in 10-row pages 
$customers = $proxy-&amp;gt;ExecuteQuery(“Customers?\$skip=30&amp;amp;\top=10);
&lt;/pre&gt;&lt;br /&gt;
&lt;h2&gt;Top Query&lt;/h2&gt;Restrict the maximum number of entities to be returned. This option is useful both by itself and in combination with skip, where it can be used to implement paging as discussed in the description of ‘skip’.&lt;br /&gt;&lt;pre&gt;
 //top 5 sales orders 
$customers = $proxy-ExecuteQuery(“Customers?\$top=5);

 //top 5 sales orders with the highest TotalDue 
$customers = $proxy-ExecuteQuery(“Orders?\$orderby=TotalDue&amp;amp;\$top=5);
&lt;/pre&gt;&lt;br /&gt;
&lt;h2&gt;Creating new instance in data service&lt;/h2&gt;In this scenario a new object is created on the client and then made persistent by saving it on the database exposed by the ADO .NET Data Service.&lt;br /&gt;To create a new instance in the data service, first a new php object needs to be created and the required properties populated, then by calling AddObject and passing the object and the target entity-set, the object is added to the collection of objects in the database. A final call to the SaveChanges method makes the actual call that will save the new object in the database. The Following code snippet shows how to use this functionality. &lt;br /&gt;&lt;pre&gt;
require_once 'MyProxyClass.php'; 

$proxy = new NorthwindEntities(); 

//Create a Customers php Object  

$customer = Customers::CreateCustomers(&amp;quot;CHAN9&amp;quot;, &amp;quot;channel9&amp;quot;); 

//inserting Customers object context tracking system  

$proxy-&amp;gt;AddObject(‘Customers’, $customer); 

//SaveChange insert the object into data service 

$proxy-&amp;gt;SaveChanges();
 &lt;/pre&gt;&lt;br /&gt;
&lt;h2&gt;Updating an existing instance in data service&lt;/h2&gt;To update an existing instance in the data service, first an instance from data service needs to be retrieved using the ExecuteQuery or LoadProperty methods. After the object has been retrieved and the properties set with the new values a call to the UpdateObject applies the changes to the table(s) in the database. The following code snippet shows how to use UpdateObject API. &lt;br /&gt;&lt;pre&gt;
require_once 'MyProxyClass.php'; 

$proxy = new NorthwindEntities(); 
$customers = $proxy-&amp;gt;ExecuteQuery(“Customers(‘CHAN9’)); 

//update the CompanyName property 

$customer-&amp;gt;CompanyName = &amp;quot;Channel8&amp;quot;; 

//add the object to the list of objects that needs to be updated in the database 

$proxy-&amp;gt;UpdateObject($customer); 

//SaveChanges updates the object in the data service 

$proxy-&amp;gt;SaveChanges();
 &lt;/pre&gt;&lt;br /&gt;
&lt;h2&gt;Deleting an existing instance from data service&lt;/h2&gt;Similar to the Update scenario, to delete an existing instance in the data service, first an instance needs to be retrieved using ExecuteQuery or LoadProperty methods, then a call to the DeleteObject methods adds the objects to the list of objects that needs to be deleted in the database. . The following code snippet shows how to use DeleteObject API. &lt;br /&gt;&lt;pre&gt;
require_once 'MyProxyClass.php'; 

$proxy = new NorthwindEntities(); 

//Get the object by calling the ExecuteQuery Method
 
$customers = $proxy-&amp;gt;ExecuteQuery(“Customers(‘CHAN9)); 

//The object is added to the list of objects to delete in the database 

$proxy-&amp;gt;DeleteObject($customer); 

//SaveChanges makes the actual changes in the database  

$proxy-&amp;gt;SaveChanges(); 
 &lt;/pre&gt;&lt;br /&gt;
&lt;h2&gt;Creating link between instances&lt;/h2&gt;If you have a relationship between two entities in the data service, then you can use AddLink to create relationship between the corresponding entity instances. The following code snippet shows how to create link between a Customers instance and Orders instances. &lt;br /&gt;&lt;pre&gt;
require_once 'MyProxyClass.php'; 

$proxy = new NorthwindEntities(); 

//Create a Customers instance  

$customer = new Customers(); 
$customer -&amp;gt;CustomerID = 'CHAN9'; 
$customer -&amp;gt;CompanyName = 'channel9'; 
$proxy-&amp;gt;AddToCustomers($customer); 

//Create an Orders instance 

$Order = new Orders(); 

//Create link between Customer and Order. 

$proxy-&amp;gt;AddLink($cust, &amp;quot;Orders&amp;quot;, $ Order); 
$proxy-&amp;gt;SaveChanges(); 
 &lt;/pre&gt;&lt;br /&gt;
&lt;h2&gt;Deleting link between instances &lt;/h2&gt;If you have two related entity instances in data service, then you can use DeleteLink to remove the relationship between these two. The following code snippet shows how to delete the link. &lt;br /&gt;&lt;pre&gt;
require_once 'MyProxyClass.php'; 

$proxy = new NorthwindEntities(); 

//Retrive the Customers entity with key ‘CHAN9’  

$query = $proxy-&amp;gt;ExecuteQuery(&amp;quot;Customers(CustomerID='CHAN9')&amp;quot;) 
foreach($query as $customer) 
{ 
//Load the Orders property 

$proxy-&amp;gt;LoadProperty($customer, &amp;quot;Orders&amp;quot;) ; 
foreach($customer-&amp;gt;Orders as $o) 
{ 
$proxy-&amp;gt;DeleteLink($customer, &amp;quot;Orders&amp;quot;, $o); 
} 
} 

$proxy-&amp;gt;SaveChanges(); 
 &lt;/pre&gt;&lt;br /&gt;
&lt;h2&gt;Authentication in the Client Library&lt;/h2&gt;This toolkit also handles authentication. By default, the client library assumes the ADO .NET Data Service uses an anonymous connection so user credentials don't need to be specified.. However, you can set the Credentials property in the proxy object to point to an object holding the credential information. The Credential property will be used if the ADO .NET Data Service requires the user to be authenticated. &lt;br /&gt;&lt;pre&gt;
$proxy-&amp;gt;Credential = new Credential(user-name, password); 
 &lt;/pre&gt;&lt;br /&gt;
&lt;h2&gt;Custom authentication Support&lt;/h2&gt;In more advanced scenario, the client application might need to set custom headers; the toolkit exposed the addHeader method for that. To remove the custom headers which are added call RemoveHeaders. The following code snippet shows how to use this functionality. &lt;br /&gt;&lt;pre&gt;
$proxy-&amp;gt;AddHeader(custom-header-name, custom-header-value); 
$proxy-&amp;gt;RemoveHeaders(); 
 &lt;/pre&gt;&lt;br /&gt;
&lt;h2&gt;Connecting to Data Service through proxy server&lt;/h2&gt;If connecting to data service requires proxy server, you can set the Proxy property in the Httpproxy object to point to an object holding the proxy server information. &lt;br /&gt;&lt;pre&gt;
$proxy-&amp;gt;HttpProxy = new HttpProxy(proxy-server-name, proxy-server-port);  
 &lt;/pre&gt;&lt;br /&gt;
&lt;h1&gt;Sample Applications&lt;/h1&gt;Sample Application included in the toolkit can be found under the SamplesPHPApplications.&lt;br /&gt;
&lt;h2&gt;Simple Demo and ADO .NET Data Services Editor Applications&lt;/h2&gt;Simple Demo and ADO .NET Data Services Editor applications use the NorthWindDataService service that can be built with the Visual Studio project under the \Samples\ADODotNETDataServices directory. If you changed any of the default settings in the Visual Studio project, you will have to regenerate the proxy class (NorthWindEntities.php) before you can run the sample application.&lt;br /&gt;
&lt;h2&gt;Game Store Application&lt;/h2&gt;The Game Store sample application uses the GameStoreDataService that can be built using the Visual Studio project under the \Samples\ADODotNETDataServices directory. If you changed any of the default settings in the Visual Studio project, you will have to regenerate the proxy class (VideoGameStoreEntities.php) before you can run the sample application.&lt;br /&gt;
&lt;h2&gt;Reference Section&lt;/h2&gt;List of APIs supported by PHP Client Library.&lt;br /&gt;&lt;table&gt;&lt;tr&gt;&lt;th&gt; API Prototype &lt;/th&gt;&lt;th&gt;  Parameters &lt;/th&gt;&lt;th&gt;  Return Value &lt;/th&gt;&lt;th&gt;   Description &lt;/th&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt; ExecuteQuery(query-expression)  &lt;/td&gt;&lt;td&gt; The query to be executed against data service. Please refer ‘Data Service Queries’ section for more details &lt;/td&gt;&lt;td&gt; &lt;i&gt;OnSuccess&lt;/i&gt;: Returns result of query as a collection. &lt;i&gt;OnFailure&lt;/i&gt;: If any error occurs (ex: malformed query), then client library will throw &lt;b&gt;ADODotNETDataServicesException&lt;/b&gt; exception with proper message.  &lt;/td&gt;&lt;td&gt; To execute queries against the data service &lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt; AddObject(Target&lt;i&gt;Entity&lt;/i&gt;Set, Object) &lt;/td&gt;&lt;td&gt; &lt;b&gt;Object&lt;/b&gt; : PHP Object represents the instance of a data service entity to be inserted. &lt;b&gt;Target&lt;i&gt;Entity&lt;/i&gt;Set&lt;/b&gt; : The name of entity set to which Object belongs to. &lt;/td&gt;&lt;td&gt; &lt;i&gt;OnSuccess&lt;/i&gt;: Returns 1 &lt;i&gt;OnFailure&lt;/i&gt;: If any error occurs (ex: if entity instance already exists), then client library will throw ADODotNETDataServicesException exception with proper message &lt;/td&gt;&lt;td&gt;  To create a new instance in the data service &lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt; UpdateObject(Object) &lt;/td&gt;&lt;td&gt; &lt;b&gt;Object&lt;/b&gt; : PHP Object represents the existng instance of a data service entity, which is to be updated. &lt;/td&gt;&lt;td&gt; &lt;i&gt;OnSuccess&lt;/i&gt;: Returns 1 &lt;i&gt;OnFailure&lt;/i&gt;: If any error occurs (ex: if entity instance not exists), then client library will throw &lt;b&gt;ADODotNETDataServicesException&lt;/b&gt; exception with proper message. &lt;/td&gt;&lt;td&gt; To modify an existing entity instance. &lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt; DeleteObject(Object) &lt;/td&gt;&lt;td&gt; &lt;b&gt;Object&lt;/b&gt; : PHP Object represents the existing instance of a data service entity, which is to be deleted. &lt;/td&gt;&lt;td&gt; &lt;i&gt;OnSuccess&lt;/i&gt;: Returns 1 &lt;i&gt;OnFaliure&lt;/i&gt;: If any error occurs (ex: if entity instance not exists), then client library will throw &lt;b&gt;ADODotNETDataServicesException&lt;/b&gt; exception with proper message. &lt;/td&gt;&lt;td&gt; To delete an entity instance. &lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt; AddLink(Source, SourceProperty, Target) &lt;/td&gt;&lt;td&gt; &lt;b&gt;Source&lt;/b&gt;: The source object in the link. &lt;b&gt;SourceProperty&lt;/b&gt;: The name of the property on the source object that represents the source in the link between the source and the target. &lt;b&gt;Target&lt;/b&gt;: The target object involved in the link that is bound to the source object. &lt;/td&gt;&lt;td&gt;  &lt;i&gt;OnSuccess&lt;/i&gt;: Returns 1 &lt;i&gt;OnFailure&lt;/i&gt;: If any error occurs, then client library will throw &lt;b&gt;ADODotNETDataServicesException&lt;/b&gt; exception with proper message.  &lt;/td&gt;&lt;td&gt;  To add a link between two entity instances, assuming that there is a relationship between Two entities &lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt; DeleteLink(Source, SourceProperty, Target) &lt;/td&gt;&lt;td&gt;  &lt;b&gt;Source&lt;/b&gt;: The source object in the link. &lt;b&gt;SourceProperty&lt;/b&gt;: The name of the property on the source object that represents the source in the link between the source and the target. &lt;b&gt;Target&lt;/b&gt;: The target object involved in the link that is bound to the source object. &lt;/td&gt;&lt;td&gt; &lt;i&gt;OnSuccess&lt;/i&gt;: Returns 1 &lt;i&gt;OnFailure&lt;/i&gt;: If any error occurs, then client library will throw &lt;b&gt;ADODotNETDataServicesException&lt;/b&gt; exception with proper message. &lt;/td&gt;&lt;td&gt;  To delete link between two entity instances. &lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt; AddHeader(Header-Name, Header-Value)  &lt;/td&gt;&lt;td&gt;  &lt;b&gt;Header-Name&lt;/b&gt;: The name of custom HTTP header &lt;b&gt;Header-Value&lt;/b&gt;: The value of custom HTTP header. &lt;/td&gt;&lt;td&gt; No return value. &lt;/td&gt;&lt;td&gt; To add custom headers &lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt; RemoveHeaders() &lt;/td&gt;&lt;td&gt; No argument&lt;/td&gt;&lt;td&gt;  No Return value &lt;/td&gt;&lt;td&gt;  To Remove all custom headers aded by user  &lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt; SaveChanges()  &lt;/td&gt;&lt;td&gt; No arguments &lt;/td&gt;&lt;td&gt;  Thows &lt;b&gt;ADODotNETDataServicesException&lt;/b&gt; exception with proper message if any of the command generated for changes fails. &lt;/td&gt;&lt;td&gt; To save the changes made to the entities in the context to data service.  &lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;&lt;/div&gt;&lt;div class="ClearBoth"&gt;&lt;/div&gt;</description><author>anu_chandy</author><pubDate>Tue, 15 Sep 2009 07:40:29 GMT</pubDate><guid isPermaLink="false">Updated Wiki: UserGuide 20090915074029A</guid></item><item><title>Updated Wiki: Home</title><link>http://phpdataservices.codeplex.com/Wiki/View.aspx?title=Home&amp;version=13</link><description>&lt;div class="wikidoc"&gt;&lt;a href="#Overview"&gt;Overview&lt;/a&gt; &lt;img src="http://i3.codeplex.com/Project/Download/FileDownload.aspx?ProjectName=phpdataservices&amp;DownloadId=79223" alt="arrow_sm.gif" title="arrow_sm.gif" /&gt; &lt;a href="#Architecture"&gt;Architecture&lt;/a&gt; &lt;img src="http://i3.codeplex.com/Project/Download/FileDownload.aspx?ProjectName=phpdataservices&amp;DownloadId=79223" alt="arrow_sm.gif" title="arrow_sm.gif" /&gt; &lt;a href="http://phpdataservices.codeplex.com/Wiki/View.aspx?title=InstallationGuide"&gt;Installation Guide&lt;/a&gt; &lt;img src="http://i3.codeplex.com/Project/Download/FileDownload.aspx?ProjectName=phpdataservices&amp;DownloadId=79223" alt="arrow_sm.gif" title="arrow_sm.gif" /&gt; &lt;a href="http://phpdataservices.codeplex.com/Wiki/View.aspx?title=UserGuide"&gt;User Guide&lt;/a&gt; &lt;img src="http://i3.codeplex.com/Project/Download/FileDownload.aspx?ProjectName=phpdataservices&amp;DownloadId=79223" alt="arrow_sm.gif" title="arrow_sm.gif" /&gt; &lt;a href="http://phpdataservices.codeplex.com/Wiki/View.aspx?title=FAQ"&gt;FAQ&lt;/a&gt; &lt;img src="http://i3.codeplex.com/Project/Download/FileDownload.aspx?ProjectName=phpdataservices&amp;DownloadId=79223" alt="arrow_sm.gif" title="arrow_sm.gif" /&gt; &lt;a href="#Contributors"&gt;Contributors&lt;/a&gt;&lt;br /&gt;
&lt;h1&gt;Overview &lt;a name="Overview"&gt;&lt;/a&gt;&lt;/h1&gt;
Toolkit for PHP with ADO.NET Data Services enables PHP developers to access data services created using ADO .NET Data Services framework. The goal is to provide the similar functionality as .NET library to access and modify the data and its relationship using URIs which points to pieces of data integrated with the web. &lt;br /&gt;Check the project page on the &lt;a href="http://www.interoperabilitybridges.com/projects/toolkit-for-php-with-adonet-data-services-.aspx" class="externalLink"&gt;&amp;quot;Interoperability Bridges and Labs page&amp;quot;&lt;span class="externalLinkIcon"&gt;&lt;/span&gt;&lt;/a&gt; and read this blog post &lt;a href="http://blogs.msdn.com/interoperability/archive/2009/08/21/a-new-bridge-for-php-developers-to-net-through-rest-php-toolkit-for-ado-net-data-services.aspx" class="externalLink"&gt;&amp;quot;A new bridge for PHP developers to .NET through REST: Toolkit for PHP with ADO.NET Data Services&amp;quot;&lt;span class="externalLinkIcon"&gt;&lt;/span&gt;&lt;/a&gt; for a more detailed introduction.&lt;br /&gt;&lt;br /&gt;The &lt;a href="http://msdn.microsoft.com/en-us/data/bb931106.aspx" class="externalLink"&gt;ADO .NET Data Services&lt;span class="externalLinkIcon"&gt;&lt;/span&gt;&lt;/a&gt; framework consists of a combination of patterns and libraries that enable the creation and consumption of data services for the web. The goal of the ADO.Net Data Services framework is to facilitate the creation of flexible data services that are naturally integrated with the web, using URIs to point to pieces of data and simple, well-known formats to represent that data, such as JSON and plain XML. This results in the data service being surfaced to the web as a REST-style resource collection that is addressable with URIs and that agents can interact with using the usual HTTP verbs such as GET, POST or DELETE.&lt;br /&gt;&lt;br /&gt;
&lt;h1&gt;Architecture &lt;a name="Architecture"&gt;&lt;/a&gt;&lt;/h1&gt;The Toolkit for PHP with ADO.NET Data Services is based on an utility (PHPDataSvcUtil) that is used to generate a proxy class from an ADO .NET Data Service, the class is then used in the PHP application to connect/edit/add/delete or browse records from the Data Service.&lt;br /&gt;&lt;img src="http://blogs.msdn.com/blogfiles/interoperability/WindowsLiveWriter/AnewbridgeforPHPdevelope.NETDataServices_7FB3/PHP_ADO_DATA_SERVICEArchitecture_4.png" /&gt;&lt;br /&gt;
&lt;h3&gt;PHPDataSvcUtil Tool&lt;/h3&gt;PHPDataSvcUtil tool generates a single proxy PHP file that contains class definitions which will be used by the client application to access the data service.&lt;br /&gt;&lt;br /&gt;ADO .NET Data Services provide a metadata endpoint that returns a schema of resources and URIs deployed by the data service.  This &lt;a href="http://msdn.microsoft.com/en-us/library/cc716656.aspx" class="externalLink"&gt;metadata&lt;span class="externalLinkIcon"&gt;&lt;/span&gt;&lt;/a&gt; consists of an EntityContainer that holds collection of EntityType. An EntityType represents a useful element of data in the domain of an application, such as a customer, order, product, or supplier. A relationship between entities is defined as an AssociationType. Please refer &lt;a href="http://msdn.microsoft.com/en-us/library/cc668808.aspx" class="externalLink"&gt;ADO .NET Data Service Specifications&lt;span class="externalLinkIcon"&gt;&lt;/span&gt;&lt;/a&gt; for details.&lt;br /&gt;&lt;br /&gt;PHPDataSvcUtil tool generates one container class  and one class for each EntityType.&lt;br /&gt;
&lt;h1&gt;Contributors &lt;a name="Contributors"&gt;&lt;/a&gt;&lt;/h1&gt;&lt;table&gt;&lt;tr&gt;&lt;td&gt; &lt;img src="http://i3.codeplex.com/Project/Download/FileDownload.aspx?ProjectName=DotNetServicesRuby&amp;amp;DownloadId=47295" /&gt;&lt;/td&gt;&lt;td&gt; &lt;img src="http://www.persistentsys.com/Portals/0/logo(1)_2.jpg" /&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt; Microsoft is the project sponsor and provides architectural guidance and best practices for this PHP Toolkit.  &lt;/td&gt;&lt;td&gt;  &lt;a href="http://www.persistentsys.com/" class="externalLink"&gt;Persistent Systems Ltd.&lt;span class="externalLinkIcon"&gt;&lt;/span&gt;&lt;/a&gt; is an award-winning technology company specialized in software product development services. The Company’s proven processes for entire product lifecycle helps customers increase revenue, margin and enhance brand value.&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;&lt;/div&gt;&lt;div class="ClearBoth"&gt;&lt;/div&gt;</description><author>jccim</author><pubDate>Fri, 04 Sep 2009 15:15:10 GMT</pubDate><guid isPermaLink="false">Updated Wiki: Home 20090904031510P</guid></item><item><title>Updated Wiki: Home</title><link>http://phpdataservices.codeplex.com/Wiki/View.aspx?title=Home&amp;version=12</link><description>&lt;div class="wikidoc"&gt;&lt;a href="#Overview"&gt;Overview&lt;/a&gt; &lt;img src="http://i3.codeplex.com/Project/Download/FileDownload.aspx?ProjectName=phpdataservices&amp;DownloadId=79223" alt="arrow_sm.gif" title="arrow_sm.gif" /&gt; &lt;a href="#Architecture"&gt;Architecture&lt;/a&gt; &lt;img src="http://i3.codeplex.com/Project/Download/FileDownload.aspx?ProjectName=phpdataservices&amp;DownloadId=79223" alt="arrow_sm.gif" title="arrow_sm.gif" /&gt; &lt;a href="http://phpdataservices.codeplex.com/Wiki/View.aspx?title=InstallationGuide"&gt;Installation Guide&lt;/a&gt; &lt;img src="http://i3.codeplex.com/Project/Download/FileDownload.aspx?ProjectName=phpdataservices&amp;DownloadId=79223" alt="arrow_sm.gif" title="arrow_sm.gif" /&gt; &lt;a href="http://phpdataservices.codeplex.com/Wiki/View.aspx?title=UserGuide"&gt;User Guide&lt;/a&gt; &lt;img src="http://i3.codeplex.com/Project/Download/FileDownload.aspx?ProjectName=phpdataservices&amp;DownloadId=79223" alt="arrow_sm.gif" title="arrow_sm.gif" /&gt; &lt;a href="http://phpdataservices.codeplex.com/Wiki/View.aspx?title=FAQ"&gt;FAQ&lt;/a&gt; &lt;img src="http://i3.codeplex.com/Project/Download/FileDownload.aspx?ProjectName=phpdataservices&amp;DownloadId=79223" alt="arrow_sm.gif" title="arrow_sm.gif" /&gt; &lt;a href="#Contributors"&gt;Contributors&lt;/a&gt;&lt;br /&gt;
&lt;h1&gt;Overview &lt;a name="Overview"&gt;&lt;/a&gt;&lt;/h1&gt;
Toolkit for PHP with ADO.NET Data Services enables PHP developers to access data services created using ADO .NET Data Services framework. The goal is to provide the similar functionality as .NET library to access and modify the data and its relationship using URIs which points to pieces of data integrated with the web. &lt;br /&gt;Read this blog post &lt;a href="http://blogs.msdn.com/interoperability/archive/2009/08/21/a-new-bridge-for-php-developers-to-net-through-rest-php-toolkit-for-ado-net-data-services.aspx" class="externalLink"&gt;&amp;quot;A new bridge for PHP developers to .NET through REST: Toolkit for PHP with ADO.NET Data Services&amp;quot;&lt;span class="externalLinkIcon"&gt;&lt;/span&gt;&lt;/a&gt; for a more detailed introduction.&lt;br /&gt;&lt;br /&gt;The &lt;a href="http://msdn.microsoft.com/en-us/data/bb931106.aspx" class="externalLink"&gt;ADO .NET Data Services&lt;span class="externalLinkIcon"&gt;&lt;/span&gt;&lt;/a&gt; framework consists of a combination of patterns and libraries that enable the creation and consumption of data services for the web. The goal of the ADO.Net Data Services framework is to facilitate the creation of flexible data services that are naturally integrated with the web, using URIs to point to pieces of data and simple, well-known formats to represent that data, such as JSON and plain XML. This results in the data service being surfaced to the web as a REST-style resource collection that is addressable with URIs and that agents can interact with using the usual HTTP verbs such as GET, POST or DELETE.&lt;br /&gt;&lt;br /&gt;
&lt;h1&gt;Architecture &lt;a name="Architecture"&gt;&lt;/a&gt;&lt;/h1&gt;The Toolkit for PHP with ADO.NET Data Services is based on an utility (PHPDataSvcUtil) that is used to generate a proxy class from an ADO .NET Data Service, the class is then used in the PHP application to connect/edit/add/delete or browse records from the Data Service.&lt;br /&gt;&lt;img src="http://blogs.msdn.com/blogfiles/interoperability/WindowsLiveWriter/AnewbridgeforPHPdevelope.NETDataServices_7FB3/PHP_ADO_DATA_SERVICEArchitecture_4.png" /&gt;&lt;br /&gt;
&lt;h3&gt;PHPDataSvcUtil Tool&lt;/h3&gt;PHPDataSvcUtil tool generates a single proxy PHP file that contains class definitions which will be used by the client application to access the data service.&lt;br /&gt;&lt;br /&gt;ADO .NET Data Services provide a metadata endpoint that returns a schema of resources and URIs deployed by the data service.  This &lt;a href="http://msdn.microsoft.com/en-us/library/cc716656.aspx" class="externalLink"&gt;metadata&lt;span class="externalLinkIcon"&gt;&lt;/span&gt;&lt;/a&gt; consists of an EntityContainer that holds collection of EntityType. An EntityType represents a useful element of data in the domain of an application, such as a customer, order, product, or supplier. A relationship between entities is defined as an AssociationType. Please refer &lt;a href="http://msdn.microsoft.com/en-us/library/cc668808.aspx" class="externalLink"&gt;ADO .NET Data Service Specifications&lt;span class="externalLinkIcon"&gt;&lt;/span&gt;&lt;/a&gt; for details.&lt;br /&gt;&lt;br /&gt;PHPDataSvcUtil tool generates one container class  and one class for each EntityType.&lt;br /&gt;
&lt;h1&gt;Contributors &lt;a name="Contributors"&gt;&lt;/a&gt;&lt;/h1&gt;&lt;table&gt;&lt;tr&gt;&lt;td&gt; &lt;img src="http://i3.codeplex.com/Project/Download/FileDownload.aspx?ProjectName=DotNetServicesRuby&amp;amp;DownloadId=47295" /&gt;&lt;/td&gt;&lt;td&gt; &lt;img src="http://www.persistentsys.com/Portals/0/logo(1)_2.jpg" /&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt; Microsoft is the project sponsor and provides architectural guidance and best practices for this PHP Toolkit.  &lt;/td&gt;&lt;td&gt;  &lt;a href="http://www.persistentsys.com/" class="externalLink"&gt;Persistent Systems Ltd.&lt;span class="externalLinkIcon"&gt;&lt;/span&gt;&lt;/a&gt; is an award-winning technology company specialized in software product development services. The Company’s proven processes for entire product lifecycle helps customers increase revenue, margin and enhance brand value.&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;&lt;/div&gt;&lt;div class="ClearBoth"&gt;&lt;/div&gt;</description><author>satish_nikam</author><pubDate>Thu, 03 Sep 2009 22:53:59 GMT</pubDate><guid isPermaLink="false">Updated Wiki: Home 20090903105359P</guid></item><item><title>Updated Wiki: FAQ</title><link>http://phpdataservices.codeplex.com/Wiki/View.aspx?title=FAQ&amp;version=7</link><description>&lt;div class="wikidoc"&gt;&lt;a href="http://phpdataservices.codeplex.com/Wiki/View.aspx?title=Home&amp;referringTitle=Home&amp;ANCHOR#Overview"&gt;Overview&lt;/a&gt; &lt;img src="http://i3.codeplex.com/Project/Download/FileDownload.aspx?ProjectName=phpdataservices&amp;DownloadId=79228" alt="arrow_sm.gif" title="arrow_sm.gif" /&gt; &lt;a href="http://phpdataservices.codeplex.com/Wiki/View.aspx?title=Home&amp;referringTitle=Home&amp;ANCHOR#Architecture"&gt;Architecture&lt;/a&gt; &lt;img src="http://i3.codeplex.com/Project/Download/FileDownload.aspx?ProjectName=phpdataservices&amp;DownloadId=79228" alt="arrow_sm.gif" title="arrow_sm.gif" /&gt; &lt;a href="http://phpdataservices.codeplex.com/Wiki/View.aspx?title=InstallationGuide&amp;referringTitle=Home"&gt;Installation Guide&lt;/a&gt; &lt;img src="http://i3.codeplex.com/Project/Download/FileDownload.aspx?ProjectName=phpdataservices&amp;DownloadId=79228" alt="arrow_sm.gif" title="arrow_sm.gif" /&gt; &lt;a href="http://phpdataservices.codeplex.com/Wiki/View.aspx?title=UserGuide&amp;referringTitle=Home"&gt;User Guide&lt;/a&gt; &lt;img src="http://i3.codeplex.com/Project/Download/FileDownload.aspx?ProjectName=phpdataservices&amp;DownloadId=79228" alt="arrow_sm.gif" title="arrow_sm.gif" /&gt; &lt;a href="http://phpdataservices.codeplex.com/Wiki/View.aspx?title=FAQ&amp;referringTitle=Home"&gt;FAQ&lt;/a&gt; &lt;img src="http://i3.codeplex.com/Project/Download/FileDownload.aspx?ProjectName=phpdataservices&amp;DownloadId=79228" alt="arrow_sm.gif" title="arrow_sm.gif" /&gt; &lt;a href="http://phpdataservices.codeplex.com/Wiki/View.aspx?title=Home&amp;referringTitle=Home&amp;ANCHOR#Contributors"&gt;Contributors&lt;/a&gt;&lt;br /&gt;
&lt;h1&gt;FAQ&lt;/h1&gt;&lt;h3&gt;What is ADO .NET Data Services?&lt;/h3&gt;ADO .NET Data Services (formerly known as Project “Astoria”) is a technology used to expose a wide range of data sources through a RESTful service interface. Data sources can be relational databases, XML files, and so on. ADO .NET Data Services  defines a flexible addressing and query interface using a URL convention, as well as the usual resource manipulation methods on data sources (it supports the full range of Create/Read/Update/Delete). Operations can also be optimized by batching requests so that they are grouped on a single server call. &lt;br /&gt;There is full support for ADO .NET Data Services in Visual Studio 2008 SP1 as well as in the upcoming Visual Studio 2010; this includes direct support for both creating and consuming data services directly from the development environment. &lt;br /&gt;
&lt;h3&gt;What is the Toolkit used for?&lt;/h3&gt;The Toolkit for PHP with ADO.NET Data Services is designed to make it easier for PHP developers to connect to and take advantage of services built using ADO .NET Data Services, a set of features recently added to the .NET Framework.  &lt;br /&gt;At design time the PHP toolkit generates proxy classes based on the metadata exposed by the ADO .NET Data Services. At run time, you call from your code the PHP proxy classes, so that you can easily program against the ADO .NET Data Service using a set of local PHP classes that represent the structure of the remote data. Using RESTful services over HTTP, the communication between the PHP application and ADO .NET Data Services is taken care of by the PHP proxy classes and the Toolkit libraries.&lt;br /&gt;
&lt;h3&gt;What PHP libraries do I need to run the toolkit?&lt;/h3&gt;The toolkit relies only on 3 standard PHP extensions:&lt;br /&gt;- XML&lt;br /&gt;- XSL&lt;br /&gt;- CURL&lt;br /&gt;
&lt;h3&gt;Can I use the toolkit on other platforms other than MS Windows?&lt;/h3&gt;Yes, the toolkit is written in PHP and does not have any dependency on the hosting OS. The only configuration change that might be required is to enable XML, XSL and CURL extensions.&lt;br /&gt;
&lt;h3&gt;What authentication schemes are supported by the toolkit?&lt;/h3&gt;Out of the box the toolkit supports basic authentication (username/password) but it provides a Context class to add custom HTTP header or it can be modified to support other authentication schemes.&lt;br /&gt;
&lt;h3&gt;Does the Toolkit support JSON?&lt;/h3&gt;The Toolkit support both JSON and Atom so it is able to connect to any type of ADO .NET Data Service.&lt;br /&gt;
&lt;h3&gt;Does the Toolkit work with Windows Azure?&lt;/h3&gt;The toolkit supports AtomPub protocol used by Windows Azure but it does not provide built-in support for Azure authentication so, in order to connect to Azure, the Context class needs to be changed in order to provide the authentication required by Windows Azure. Azure authentication will be added to the next releases of the Toolkit.&lt;br /&gt;
&lt;h3&gt;Where can I find more information about ADO .NET Data Services?&lt;/h3&gt;You can find more information about ADO .NET Data Services &lt;a href="http://msdn.microsoft.com/en-us/data/bb931106.aspx" class="externalLink"&gt;here&lt;span class="externalLinkIcon"&gt;&lt;/span&gt;&lt;/a&gt;, (Check the “How do I…” videos).&lt;br /&gt;The full description of the query format can be found &lt;a href="http://msdn.microsoft.com/en-us/library/cc668766.aspx" class="externalLink"&gt;here&lt;span class="externalLinkIcon"&gt;&lt;/span&gt;&lt;/a&gt;.&lt;/div&gt;&lt;div class="ClearBoth"&gt;&lt;/div&gt;</description><author>satish_nikam</author><pubDate>Tue, 01 Sep 2009 02:54:56 GMT</pubDate><guid isPermaLink="false">Updated Wiki: FAQ 20090901025456A</guid></item><item><title>Updated Wiki: UserGuide</title><link>http://phpdataservices.codeplex.com/Wiki/View.aspx?title=UserGuide&amp;version=19</link><description>&lt;div class="wikidoc"&gt;&lt;a href="http://phpdataservices.codeplex.com/Wiki/View.aspx?title=Home&amp;referringTitle=Home&amp;ANCHOR#Overview"&gt;Overview&lt;/a&gt; &lt;img src="http://i3.codeplex.com/Project/Download/FileDownload.aspx?ProjectName=phpdataservices&amp;DownloadId=79225" alt="arrow_sm.gif" title="arrow_sm.gif" /&gt; &lt;a href="http://phpdataservices.codeplex.com/Wiki/View.aspx?title=Home&amp;referringTitle=Home&amp;ANCHOR#Architecture"&gt;Architecture&lt;/a&gt; &lt;img src="http://i3.codeplex.com/Project/Download/FileDownload.aspx?ProjectName=phpdataservices&amp;DownloadId=79225" alt="arrow_sm.gif" title="arrow_sm.gif" /&gt; &lt;a href="http://phpdataservices.codeplex.com/Wiki/View.aspx?title=InstallationGuide&amp;referringTitle=Home"&gt;Installation Guide&lt;/a&gt; &lt;img src="http://i3.codeplex.com/Project/Download/FileDownload.aspx?ProjectName=phpdataservices&amp;DownloadId=79225" alt="arrow_sm.gif" title="arrow_sm.gif" /&gt; &lt;a href="http://phpdataservices.codeplex.com/Wiki/View.aspx?title=UserGuide&amp;referringTitle=Home"&gt;User Guide&lt;/a&gt; &lt;img src="http://i3.codeplex.com/Project/Download/FileDownload.aspx?ProjectName=phpdataservices&amp;DownloadId=79225" alt="arrow_sm.gif" title="arrow_sm.gif" /&gt; &lt;a href="http://phpdataservices.codeplex.com/Wiki/View.aspx?title=FAQ&amp;referringTitle=Home"&gt;FAQ&lt;/a&gt; &lt;img src="http://i3.codeplex.com/Project/Download/FileDownload.aspx?ProjectName=phpdataservices&amp;DownloadId=79225" alt="arrow_sm.gif" title="arrow_sm.gif" /&gt; &lt;a href="http://phpdataservices.codeplex.com/Wiki/View.aspx?title=Home&amp;referringTitle=Home&amp;ANCHOR#Contributors"&gt;Contributors&lt;/a&gt;&lt;br /&gt;
&lt;h1&gt;User Guide&lt;/h1&gt;&lt;h2&gt;Introduction&lt;/h2&gt;Toolkit for PHP with ADO.NET Data Services is designed to make it easier for PHP applications to consume data services created using the ADO .NET Data Services framework. The goal is to provide the same functionality that is available in the libraries available to .NET developers. The library includes support for accessing and modifying the data exposed by the ADO .NET Data Service. &lt;br /&gt;
&lt;h2&gt;Requirements&lt;/h2&gt;This toolkit requires the following frameworks to be installed and enabled &lt;br /&gt; &lt;a href="http://us2.php.net/xsl" class="externalLink"&gt;PHP XSL Extension&lt;span class="externalLinkIcon"&gt;&lt;/span&gt;&lt;/a&gt;&lt;br /&gt; &lt;a href="http://us2.php.net/curl" class="externalLink"&gt;PHP CURL Extension&lt;span class="externalLinkIcon"&gt;&lt;/span&gt;&lt;/a&gt;&lt;br /&gt;
&lt;h2&gt;Package Content&lt;/h2&gt; \Doc: 
&lt;ul&gt;&lt;li&gt;Toolkit User guide&lt;/li&gt;&lt;/ul&gt;
\Samples\ADODotNETDataServices: &lt;br /&gt; &lt;br /&gt;A Visual Studio 2008 project for two sample ADO .NET Data Services used by the sample applications included in the PHP Toolkit. The Visual Studio project creates two services: 
&lt;ul&gt;&lt;li&gt;NorthWindDataService: This service is used by the SimpleApplications and can be used to test the ADODotNETDataServicesEditor &lt;/li&gt;
&lt;li&gt;GameStoreDataService: service used by the Game Store sample Application.&lt;/li&gt;&lt;/ul&gt;
\Sample\PHPApplications: &lt;br /&gt; 
&lt;ul&gt;&lt;li&gt;ADODotNETDataServicesEditor: a PHP application that can be used to connect, browse, read and write data exposed by an ADO .NET Data Service. &lt;/li&gt;
&lt;li&gt;SimpleApplications: a list of simple HelloWorld-type applications that show how ADO .NET Data Services queries can be used to retrieve data from a server. &lt;/li&gt;
&lt;li&gt;VideoGameStoreApplication: a sample application that shows how ADO .NET Data Services can be used to access a remote data source.&lt;/li&gt;&lt;/ul&gt;
\framework: &lt;br /&gt; 
&lt;ul&gt;&lt;li&gt;Contains the source code for the tools used to generate the proxy class and to communicate with data service.&lt;/li&gt;&lt;/ul&gt;
&lt;h2&gt;Installation and Configuration&lt;/h2&gt;The assumption is that PHP is already installed and configured on the machine where the ADO .NET Data Services toolkit is installed.&lt;br /&gt;The toolkit does not have any dependency on the host OS so it can run on Windows, Linux or Mac OSX machines.&lt;br /&gt;
&lt;ul&gt;&lt;li&gt;Create a folder named 'adodotnetservicesphp' eg: C:\PHPLib\adodotnetservicesphp &lt;/li&gt;&lt;/ul&gt;

&lt;ul&gt;&lt;li&gt;Copy the following files to the folder created above. 
&lt;ul&gt;&lt;li&gt;ADODotNETDataServices2PHPProxy.xsl&lt;/li&gt;
&lt;li&gt;ADODotNETDataServicesEditor.php&lt;/li&gt;
&lt;li&gt;ADODotNETDataServicesEntity.php&lt;/li&gt;
&lt;li&gt;ADODotNETDataServicesException.php&lt;/li&gt;
&lt;li&gt;PHPDataSvcUtil.php&lt;/li&gt;
&lt;li&gt;HttpProxy.php&lt;/li&gt;
&lt;li&gt;Common (contains Dictionary.php, Guid.php and Utility.php)&lt;/li&gt;
&lt;li&gt;Context (contains EntityStates.php,  ObjectContext.php, QueryProcessor.php, RelatedEnd.php, ResourceBox.php and SaveResult.php)&lt;/li&gt;
&lt;li&gt;Credential (contains Credentail.php)&lt;/li&gt;
&lt;li&gt;Interfaces (contains Entity.php and Object.php)&lt;/li&gt;
&lt;li&gt;Parser (contains Parser.php, AtomParser.php and JSONParser.php)&lt;/li&gt;
&lt;li&gt;Resource (contains Messages.php)&lt;/li&gt;
&lt;li&gt;WebUtil (contains HttpBatchRequest.php, HttpBatchResponse.php, HttpRequest.php , HttpResponse.php and Microsoft&lt;i&gt;Http&lt;/i&gt;Response.php)&lt;/li&gt;&lt;/ul&gt;&lt;/li&gt;&lt;/ul&gt;

&lt;ul&gt;&lt;li&gt;Add the path to the folder created in step 1 to the 'include_path' directive in php.ini. e.g.&lt;/li&gt;&lt;/ul&gt;
&lt;pre&gt;   include_path = &amp;quot;.;C:\PHPLib\adodotnetservicesphp&amp;quot; 
&lt;/pre&gt;&lt;br /&gt;
&lt;ul&gt;&lt;li&gt;Create a variable called 'adodotnetservicesphp_path' in the php.ini file and set it to the path where the PHP Toolkit was installed (step 1). Open php.ini and search for 'Paths and Directories' section. Just below the definition of 'include_path' directive, add the following two lines:&lt;/li&gt;&lt;/ul&gt;
&lt;pre&gt;   ;Toolkit for PHP with ADO.NET Data Services Library Path
   adodotnetservicesphp_path = &amp;quot;C:\PHPLib\adodotnetservicesphp&amp;quot;          
&lt;/pre&gt;&lt;br /&gt;
&lt;ul&gt;&lt;li&gt;On linux platform, make sure you have the php-xml module installed. This can be installed using yum as follows,&lt;/li&gt;&lt;/ul&gt;
&lt;pre&gt;
   yum install php-xml
&lt;/pre&gt;&lt;br /&gt;
&lt;ul&gt;&lt;li&gt;Enable php_xsl.dll in php.ini. Search for 'extension=php_xsl.dll' in the php.ini file and remove the semicolon (;) in front.&lt;/li&gt;&lt;/ul&gt;

&lt;ul&gt;&lt;li&gt;Enable php_curl.dll in php.ini. Search for 'extension=php_curl.dll' in the php.ini file and remove the semicolon (;) in front.&lt;/li&gt;&lt;/ul&gt;

&lt;ul&gt;&lt;li&gt;Optional: The content of the PHPApplications directory can be deployed on a web server to provide access to the sample applications from a single web page. The PHPApplications directory contains some php files, template and CSS files that are used to build the Sample Web Page. All Samples must be configured before they can be ran from the Web Page. Refer to the readme files in the ADODotNETDataServiceEditor, SimpleApplications and GameStoreApplication directories. &lt;/li&gt;&lt;/ul&gt;

&lt;h2&gt;Creating Proxy Class&lt;/h2&gt;The first step is to create a proxy class that is used to connect to the ADO .NET Data service.&lt;br /&gt;The PHP client library provides a PHPDataSvcUtil.php file which creates the  proxy class. The command to create the class is&lt;br /&gt;&lt;pre&gt;
php &amp;lt;path of Client Libary&amp;gt;PHPDataSvcUtil.php /Uri:&amp;lt;data service Uri&amp;gt; [/metadata:&amp;lt;path to metadata file&amp;gt; [/out:&amp;lt;output file path&amp;gt;] 
&lt;/pre&gt;&lt;br /&gt;&amp;lt;Path of Toolkit Library&amp;gt; is the path where the toolkit library files are installed (See the installation instructions). &lt;br /&gt;If file name is not specified with the /Out parameters, the Entity Container name (defined in the ADO .NET Data Service) is used as filename. If the output path is not specified then the proxy class will be generated by PHPDataSvcUtil in the current directory. &lt;br /&gt;The metadata param can be used to specify a medata file saved on the local machine. The PHPDataSvcUtil will use the saved file and won’t connect to ADO .NET Data Service. Uri and metadata params are mutually exclusive.&lt;br /&gt;Note:  In order to use this utility, the configuration option {'adodotnetservicesphp_path'} should be set in php.ini configuration file. (Refer Installation and Configuration section for more details).&lt;br /&gt;
&lt;h2&gt;Using Proxy Class&lt;/h2&gt;After the proxy class for the ADO .NET Data Service has been created, it can be used in the application to access the data on the server. The proxy class generated by the PHPDataSvcUtil needs to be included first: &lt;br /&gt;&lt;pre&gt;
require_once 'MyProxyClass.php';
&lt;/pre&gt;&lt;br /&gt;The MyProxyClass.php file, in this case, contains the definition of a class that can be use to execute various queries using the ExecuteQuery method.&lt;br /&gt;The following code snippet shows an example on how to use the proxy class to access a customer record for a service that exposes the NorthWind database. &lt;br /&gt;The goal is to retrieve the record for the Costumer with CustomerID=’ALFKI’ &lt;br /&gt;&lt;pre&gt;
$proxy = new NorthwindEntities();
$customers = $proxy-&amp;gt;ExecuteQuery(“Customers(‘ALFKI’)”);
echo ($customers-CompanyName);
&lt;/pre&gt;&lt;br /&gt;This code sample uses the proxy class to connect to the ADO .NET Data Service, retrieves a customer and prints the CompanyName field using the customers class defined in the myproxyclass.php file. &lt;br /&gt;
&lt;h2&gt;Data Service Queries&lt;/h2&gt;The data service queries are conditions that determine what data is retrieved from the ADO .NET Data Service. There are five Data Service Queries supported by the Toolkit for PHP with ADO.NET Data Services.
&lt;ul&gt;&lt;li&gt;Expand&lt;/li&gt;
&lt;li&gt;Filter&lt;/li&gt;
&lt;li&gt;OrderBy&lt;/li&gt;
&lt;li&gt;Skip&lt;/li&gt;
&lt;li&gt;Top&lt;/li&gt;&lt;/ul&gt;
Complete documentation on the Data Service Queries can be found on the &lt;a href="http://msdn.microsoft.com/en-us/library/cc668791.aspx" class="externalLink"&gt;MSDN&lt;span class="externalLinkIcon"&gt;&lt;/span&gt;&lt;/a&gt; site&lt;br /&gt;
&lt;h2&gt;Expand Query&lt;/h2&gt;The ‘expand’ option allows you to embed one or more sets of related entities in the results. For example, if you want to display a customer and its sales orders, you could execute two requests, one for Customers(‘ALFKI’) and one for Customers(‘ALFKI’)Orders. The ‘expand’ option on the other hand allows you to return the related entities in-line with the response of the parent in a single HTTP request.&lt;br /&gt;You may specify multiple navigation properties to expand by separating them with commas, and you may traverse more than one relationship by using a dot to jump to the next navigation property.&lt;br /&gt;Examples:&lt;br /&gt;&lt;pre&gt;
// a customer with related sales orders 
$customers = $proxy-&amp;gt;ExecuteQuery(“Customers(‘ALFKI’)?\$expand=Orders);
echo count($customers-Orders);

// a customer with related sales orders and employee information related to those orders 
$customers = $proxy-ExecuteQuery(“Customers(‘ALFKI’)?\$expand=Orders/Employees); 
echo count($customers-&amp;gt;Orders(10248)-&amp;gt;Employees);

 //Orders with related employees information and related shipper information 
$customers = $proxy-&amp;gt;ExecuteQuery(“Orders(10248)\$expand=Employees,Shippers);
echo count($customers-&amp;gt;Employees(5)-&amp;gt;Shippers);
echo count($customers-&amp;gt;Employees);
&lt;/pre&gt;&lt;br /&gt;Note “$” is a special key in PHP, therefore “\” is added before “$” in the query.&lt;br /&gt;
&lt;h2&gt;Filter Query&lt;/h2&gt;Restrict the entities returned from a query by applying the expression specified in this operator to the entity set identified by the last segment of the URI path.&lt;br /&gt;For example&lt;br /&gt;&lt;pre&gt;
 //all customers in London 
$customers = $proxy-ExecuteQuery(“Customers?\$filter=City eq ‘London’);

 //Match all Customers with the value of the property ‘fullname’ equal to ‘Wayne, John’ 
$customers = $proxy-ExecuteQuery(“Customers?\$filter='Wayne, John' eq insert(ContactName, length(lastname), ','));
&lt;/pre&gt;&lt;br /&gt;Conditions that can be used in the filter condition are&lt;br /&gt;&lt;br /&gt;&lt;table&gt;&lt;tr&gt;&lt;th&gt; Condition &lt;/th&gt;&lt;th&gt; Description &lt;/th&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt; Eq &lt;/td&gt;&lt;td&gt; Equals &lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt; Ne &lt;/td&gt;&lt;td&gt; Not equals &lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt; Lt &lt;/td&gt;&lt;td&gt; Less than &lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt; Le &lt;/td&gt;&lt;td&gt; Less than or equal &lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt; Gt &lt;/td&gt;&lt;td&gt; Greater than &lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt; Ge &lt;/td&gt;&lt;td&gt; Greater than or equal &lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;&lt;br /&gt;
&lt;h2&gt;Order By Query&lt;/h2&gt;Sort the results by the criteria given in this value. Multiple properties can be indicated by separating them with a comma. The sort order can be controlled by using the “asc” (default) and “desc” modifiers.&lt;br /&gt;For example&lt;br /&gt;&lt;pre&gt;
$customers = $proxy-&amp;gt;ExecuteQuery(“Customers?\$orderby=City);
$customers = $proxy-&amp;gt;ExecuteQuery(“Customers?\$orderby=City desc);
$customers = $proxy-&amp;gt;ExecuteQuery(“Customers?\$orderby=City desc,CompanyName asc);
&lt;/pre&gt;&lt;br /&gt;
&lt;h2&gt;Skip Query&lt;/h2&gt;Skip the number of rows given in this parameter when returning results. This is useful in combination with “top” to implement paging (e.g. if using 10-entity pages, saying $skip=30&amp;amp;top=$10 would return the fourth page).&lt;br /&gt;NOTE: Skip only makes sense on sorted sets; if an orderby option is included, ‘skip’ will skip entities in the order given by that option. If no orderby option is given, ‘skip’ will sort the entities by primary key and then perform the skip operation.&lt;br /&gt;For example:&lt;br /&gt;&lt;pre&gt;
 //return all customers except the first 10 
$customers = $proxy-&amp;gt;ExecuteQuery(“Customers?\$skip=10);

 //return the 4th page, in 10-row pages 
$customers = $proxy-&amp;gt;ExecuteQuery(“Customers?\$skip=30&amp;amp;\top=10);
&lt;/pre&gt;&lt;br /&gt;
&lt;h2&gt;Top Query&lt;/h2&gt;Restrict the maximum number of entities to be returned. This option is useful both by itself and in combination with skip, where it can be used to implement paging as discussed in the description of ‘skip’.&lt;br /&gt;&lt;pre&gt;
 //top 5 sales orders 
$customers = $proxy-ExecuteQuery(“Customers?\$top=5);

 //top 5 sales orders with the highest TotalDue 
$customers = $proxy-ExecuteQuery(“Orders?\$orderby=TotalDue&amp;amp;\$top=5);
&lt;/pre&gt;&lt;br /&gt;
&lt;h2&gt;Creating new instance in data service&lt;/h2&gt;In this scenario a new object is created on the client and then made persistent by saving it on the database exposed by the ADO .NET Data Service.&lt;br /&gt;To create a new instance in the data service, first a new php object needs to be created and the required properties populated, then by calling AddObject and passing the object and the target entity-set, the object is added to the collection of objects in the database. A final call to the SaveChanges method makes the actual call that will save the new object in the database. The Following code snippet shows how to use this functionality. &lt;br /&gt;&lt;pre&gt;
require_once 'MyProxyClass.php'; 

$proxy = new NorthwindEntities(); 

//Create a Customers php Object  

$customer = Customers::CreateCustomers(&amp;quot;CHAN9&amp;quot;, &amp;quot;channel9&amp;quot;); 

//inserting Customers object context tracking system  

$proxy-&amp;gt;AddObject($customer, ‘Customers’); 

//SaveChange insert the object into data service 

$proxy-&amp;gt;SaveChanges();
 &lt;/pre&gt;&lt;br /&gt;
&lt;h2&gt;Updating an existing instance in data service&lt;/h2&gt;To update an existing instance in the data service, first an instance from data service needs to be retrieved using the ExecuteQuery or LoadProperty methods. After the object has been retrieved and the properties set with the new values a call to the UpdateObject applies the changes to the table(s) in the database. The following code snippet shows how to use UpdateObject API. &lt;br /&gt;&lt;pre&gt;
require_once 'MyProxyClass.php'; 

$proxy = new NorthwindEntities(); 
$customers = $proxy-&amp;gt;ExecuteQuery(“Customers(‘CHAN9’)); 

//update the CompanyName property 

$customer-&amp;gt;CompanyName = &amp;quot;Channel8&amp;quot;; 

//add the object to the list of objects that needs to be updated in the database 

$proxy-&amp;gt;UpdateObject($customer); 

//SaveChanges updates the object in the data service 

$proxy-&amp;gt;SaveChanges();
 &lt;/pre&gt;&lt;br /&gt;
&lt;h2&gt;Deleting an existing instance from data service&lt;/h2&gt;Similar to the Update scenario, to delete an existing instance in the data service, first an instance needs to be retrieved using ExecuteQuery or LoadProperty methods, then a call to the DeleteObject methods adds the objects to the list of objects that needs to be deleted in the database. . The following code snippet shows how to use DeleteObject API. &lt;br /&gt;&lt;pre&gt;
require_once 'MyProxyClass.php'; 

$proxy = new NorthwindEntities(); 

//Get the object by calling the ExecuteQuery Method
 
$customers = $proxy-&amp;gt;ExecuteQuery(“Customers(‘CHAN9)); 

//The object is added to the list of objects to delete in the database 

$proxy-&amp;gt;DeleteObject($customer); 

//SaveChanges makes the actual changes in the database  

$proxy-&amp;gt;SaveChanges(); 
 &lt;/pre&gt;&lt;br /&gt;
&lt;h2&gt;Creating link between instances&lt;/h2&gt;If you have a relationship between two entities in the data service, then you can use AddLink to create relationship between the corresponding entity instances. The following code snippet shows how to create link between a Customers instance and Orders instances. &lt;br /&gt;&lt;pre&gt;
require_once 'MyProxyClass.php'; 

$proxy = new NorthwindEntities(); 

//Create a Customers instance  

$customer = new Customers(); 
$customer -&amp;gt;CustomerID = 'CHAN9'; 
$customer -&amp;gt;CompanyName = 'channel9'; 
$proxy-&amp;gt;AddToCustomers($customer); 

//Create an Orders instance 

$Order = new Orders(); 

//Create link between Customer and Order. 

$proxy-&amp;gt;AddLink($cust, &amp;quot;Orders&amp;quot;, $ Order); 
$proxy-&amp;gt;SaveChanges(); 
 &lt;/pre&gt;&lt;br /&gt;
&lt;h2&gt;Deleting link between instances &lt;/h2&gt;If you have two related entity instances in data service, then you can use DeleteLink to remove the relationship between these two. The following code snippet shows how to delete the link. &lt;br /&gt;&lt;pre&gt;
require_once 'MyProxyClass.php'; 

$proxy = new NorthwindEntities(); 

//Retrive the Customers entity with key ‘CHAN9’  

$query = $proxy-&amp;gt;ExecuteQuery(&amp;quot;Customers(CustomerID='CHAN9')&amp;quot;) 
foreach($query as $customer) 
{ 
//Load the Orders property 

$proxy-&amp;gt;LoadProperty($customer, &amp;quot;Orders&amp;quot;) ; 
foreach($customer-&amp;gt;Orders as $o) 
{ 
$proxy-&amp;gt;DeleteLink($customer, &amp;quot;Orders&amp;quot;, $o); 
} 
} 

$proxy-&amp;gt;SaveChanges(); 
 &lt;/pre&gt;&lt;br /&gt;
&lt;h2&gt;Authentication in the Client Library&lt;/h2&gt;This toolkit also handles authentication. By default, the client library assumes the ADO .NET Data Service uses an anonymous connection so user credentials don't need to be specified.. However, you can set the Credentials property in the proxy object to point to an object holding the credential information. The Credential property will be used if the ADO .NET Data Service requires the user to be authenticated. &lt;br /&gt;&lt;pre&gt;
$proxy-&amp;gt;Credential = new Credential(user-name, password); 
 &lt;/pre&gt;&lt;br /&gt;
&lt;h2&gt;Custom authentication Support&lt;/h2&gt;In more advanced scenario, the client application might need to set custom headers; the toolkit exposed the addHeader method for that. To remove the custom headers which are added call RemoveHeaders. The following code snippet shows how to use this functionality. &lt;br /&gt;&lt;pre&gt;
$proxy-&amp;gt;AddHeader(custom-header-name, custom-header-value); 
$proxy-&amp;gt;RemoveHeaders(); 
 &lt;/pre&gt;&lt;br /&gt;
&lt;h2&gt;Connecting to Data Service through proxy server&lt;/h2&gt;If connecting to data service requires proxy server, you can set the Proxy property in the Httpproxy object to point to an object holding the proxy server information. &lt;br /&gt;&lt;pre&gt;
$proxy-&amp;gt;HttpProxy = new HttpProxy(proxy-server-name, proxy-server-port);  
 &lt;/pre&gt;&lt;br /&gt;
&lt;h1&gt;Sample Applications&lt;/h1&gt;Sample Application included in the toolkit can be found under the SamplesPHPApplications.&lt;br /&gt;
&lt;h2&gt;Simple Demo and ADO .NET Data Services Editor Applications&lt;/h2&gt;Simple Demo and ADO .NET Data Services Editor applications use the NorthWindDataService service that can be built with the Visual Studio project under the \Samples\ADODotNETDataServices directory. If you changed any of the default settings in the Visual Studio project, you will have to regenerate the proxy class (NorthWindEntities.php) before you can run the sample application.&lt;br /&gt;
&lt;h2&gt;Game Store Application&lt;/h2&gt;The Game Store sample application uses the GameStoreDataService that can be built using the Visual Studio project under the \Samples\ADODotNETDataServices directory. If you changed any of the default settings in the Visual Studio project, you will have to regenerate the proxy class (VideoGameStoreEntities.php) before you can run the sample application.&lt;br /&gt;
&lt;h2&gt;Reference Section&lt;/h2&gt;List of APIs supported by PHP Client Library.&lt;br /&gt;&lt;table&gt;&lt;tr&gt;&lt;th&gt; API Prototype &lt;/th&gt;&lt;th&gt;  Parameters &lt;/th&gt;&lt;th&gt;  Return Value &lt;/th&gt;&lt;th&gt;   Description &lt;/th&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt; ExecuteQuery(query-expression)  &lt;/td&gt;&lt;td&gt; The query to be executed against data service. Please refer ‘Data Service Queries’ section for more details &lt;/td&gt;&lt;td&gt; &lt;i&gt;OnSuccess&lt;/i&gt;: Returns result of query as a collection. &lt;i&gt;OnFailure&lt;/i&gt;: If any error occurs (ex: malformed query), then client library will throw &lt;b&gt;ADODotNETDataServicesException&lt;/b&gt; exception with proper message.  &lt;/td&gt;&lt;td&gt; To execute queries against the data service &lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt; AddObject(Object, Target&lt;i&gt;Entity&lt;/i&gt;Set) &lt;/td&gt;&lt;td&gt; &lt;b&gt;Object&lt;/b&gt; : PHP Object represents the instance of a data service entity to be inserted. &lt;b&gt;Target&lt;i&gt;Entity&lt;/i&gt;Set&lt;/b&gt; : The name of entity set to which Object belongs to. &lt;/td&gt;&lt;td&gt; &lt;i&gt;OnSuccess&lt;/i&gt;: Returns 1 &lt;i&gt;OnFailure&lt;/i&gt;: If any error occurs (ex: if entity instance already exists), then client library will throw ADODotNETDataServicesException exception with proper message &lt;/td&gt;&lt;td&gt;  To create a new instance in the data service &lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt; UpdateObject(Object) &lt;/td&gt;&lt;td&gt; &lt;b&gt;Object&lt;/b&gt; : PHP Object represents the existng instance of a data service entity, which is to be updated. &lt;/td&gt;&lt;td&gt; &lt;i&gt;OnSuccess&lt;/i&gt;: Returns 1 &lt;i&gt;OnFailure&lt;/i&gt;: If any error occurs (ex: if entity instance not exists), then client library will throw &lt;b&gt;ADODotNETDataServicesException&lt;/b&gt; exception with proper message. &lt;/td&gt;&lt;td&gt; To modify an existing entity instance. &lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt; DeleteObject(Object) &lt;/td&gt;&lt;td&gt; &lt;b&gt;Object&lt;/b&gt; : PHP Object represents the existing instance of a data service entity, which is to be deleted. &lt;/td&gt;&lt;td&gt; &lt;i&gt;OnSuccess&lt;/i&gt;: Returns 1 &lt;i&gt;OnFaliure&lt;/i&gt;: If any error occurs (ex: if entity instance not exists), then client library will throw &lt;b&gt;ADODotNETDataServicesException&lt;/b&gt; exception with proper message. &lt;/td&gt;&lt;td&gt; To delete an entity instance. &lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt; AddLink(Source, SourceProperty, Target) &lt;/td&gt;&lt;td&gt; &lt;b&gt;Source&lt;/b&gt;: The source object in the link. &lt;b&gt;SourceProperty&lt;/b&gt;: The name of the property on the source object that represents the source in the link between the source and the target. &lt;b&gt;Target&lt;/b&gt;: The target object involved in the link that is bound to the source object. &lt;/td&gt;&lt;td&gt;  &lt;i&gt;OnSuccess&lt;/i&gt;: Returns 1 &lt;i&gt;OnFailure&lt;/i&gt;: If any error occurs, then client library will throw &lt;b&gt;ADODotNETDataServicesException&lt;/b&gt; exception with proper message.  &lt;/td&gt;&lt;td&gt;  To add a link between two entity instances, assuming that there is a relationship between Two entities &lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt; DeleteLink(Source, SourceProperty, Target) &lt;/td&gt;&lt;td&gt;  &lt;b&gt;Source&lt;/b&gt;: The source object in the link. &lt;b&gt;SourceProperty&lt;/b&gt;: The name of the property on the source object that represents the source in the link between the source and the target. &lt;b&gt;Target&lt;/b&gt;: The target object involved in the link that is bound to the source object. &lt;/td&gt;&lt;td&gt; &lt;i&gt;OnSuccess&lt;/i&gt;: Returns 1 &lt;i&gt;OnFailure&lt;/i&gt;: If any error occurs, then client library will throw &lt;b&gt;ADODotNETDataServicesException&lt;/b&gt; exception with proper message. &lt;/td&gt;&lt;td&gt;  To delete link between two entity instances. &lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt; AddHeader(Header-Name, Header-Value)  &lt;/td&gt;&lt;td&gt;  &lt;b&gt;Header-Name&lt;/b&gt;: The name of custom HTTP header &lt;b&gt;Header-Value&lt;/b&gt;: The value of custom HTTP header. &lt;/td&gt;&lt;td&gt; No return value. &lt;/td&gt;&lt;td&gt; To add custom headers &lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt; RemoveHeaders() &lt;/td&gt;&lt;td&gt; No argument&lt;/td&gt;&lt;td&gt;  No Return value &lt;/td&gt;&lt;td&gt;  To Remove all custom headers aded by user  &lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt; SaveChanges()  &lt;/td&gt;&lt;td&gt; No arguments &lt;/td&gt;&lt;td&gt;  Thows &lt;b&gt;ADODotNETDataServicesException&lt;/b&gt; exception with proper message if any of the command generated for changes fails. &lt;/td&gt;&lt;td&gt; To save the changes made to the entities in the context to data service.  &lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;&lt;/div&gt;&lt;div class="ClearBoth"&gt;&lt;/div&gt;</description><author>satish_nikam</author><pubDate>Tue, 01 Sep 2009 00:13:10 GMT</pubDate><guid isPermaLink="false">Updated Wiki: UserGuide 20090901121310A</guid></item><item><title>Updated Wiki: Home</title><link>http://phpdataservices.codeplex.com/Wiki/View.aspx?title=Home&amp;version=11</link><description>&lt;div class="wikidoc"&gt;&lt;a href="#Overview"&gt;Overview&lt;/a&gt; &lt;img src="http://i3.codeplex.com/Project/Download/FileDownload.aspx?ProjectName=phpdataservices&amp;DownloadId=79223" alt="arrow_sm.gif" title="arrow_sm.gif" /&gt; &lt;a href="#Architecture"&gt;Architecture&lt;/a&gt; &lt;img src="http://i3.codeplex.com/Project/Download/FileDownload.aspx?ProjectName=phpdataservices&amp;DownloadId=79223" alt="arrow_sm.gif" title="arrow_sm.gif" /&gt; &lt;a href="http://phpdataservices.codeplex.com/Wiki/View.aspx?title=InstallationGuide"&gt;Installation Guide&lt;/a&gt; &lt;img src="http://i3.codeplex.com/Project/Download/FileDownload.aspx?ProjectName=phpdataservices&amp;DownloadId=79223" alt="arrow_sm.gif" title="arrow_sm.gif" /&gt; &lt;a href="http://phpdataservices.codeplex.com/Wiki/View.aspx?title=UserGuide"&gt;User Guide&lt;/a&gt; &lt;img src="http://i3.codeplex.com/Project/Download/FileDownload.aspx?ProjectName=phpdataservices&amp;DownloadId=79223" alt="arrow_sm.gif" title="arrow_sm.gif" /&gt; &lt;a href="http://phpdataservices.codeplex.com/Wiki/View.aspx?title=FAQ"&gt;FAQ&lt;/a&gt; &lt;img src="http://i3.codeplex.com/Project/Download/FileDownload.aspx?ProjectName=phpdataservices&amp;DownloadId=79223" alt="arrow_sm.gif" title="arrow_sm.gif" /&gt; &lt;a href="#Contributors"&gt;Contributors&lt;/a&gt;&lt;br /&gt;
&lt;h1&gt;Overview &lt;a name="Overview"&gt;&lt;/a&gt;&lt;/h1&gt;
Toolkit for PHP with ADO.NET Data Services enables PHP developers to access data services created using ADO .NET Data Services framework. The goal is to provide the similar functionality as .NET library to access and modify the data and its relationship using URIs which points to pieces of data integrated with the web. &lt;br /&gt;Read this blog post &lt;a href="http://blogs.msdn.com/interoperability/archive/2009/08/21/a-new-bridge-for-php-developers-to-net-through-rest-php-toolkit-for-ado-net-data-services.aspx" class="externalLink"&gt;&amp;quot;A new bridge for PHP developers to .NET through REST: PHP Toolkit for ADO.NET Data Services&amp;quot;&lt;span class="externalLinkIcon"&gt;&lt;/span&gt;&lt;/a&gt; for a more detailed introduction.&lt;br /&gt;&lt;br /&gt;The &lt;a href="http://msdn.microsoft.com/en-us/data/bb931106.aspx" class="externalLink"&gt;ADO .NET Data Services&lt;span class="externalLinkIcon"&gt;&lt;/span&gt;&lt;/a&gt; framework consists of a combination of patterns and libraries that enable the creation and consumption of data services for the web. The goal of the ADO.Net Data Services framework is to facilitate the creation of flexible data services that are naturally integrated with the web, using URIs to point to pieces of data and simple, well-known formats to represent that data, such as JSON and plain XML. This results in the data service being surfaced to the web as a REST-style resource collection that is addressable with URIs and that agents can interact with using the usual HTTP verbs such as GET, POST or DELETE.&lt;br /&gt;&lt;br /&gt;
&lt;h1&gt;Architecture &lt;a name="Architecture"&gt;&lt;/a&gt;&lt;/h1&gt;The Toolkit for PHP with ADO.NET Data Services is based on an utility (PHPDataSvcUtil) that is used to generate a proxy class from an ADO .NET Data Service, the class is then used in the PHP application to connect/edit/add/delete or browse records from the Data Service.&lt;br /&gt;&lt;img src="http://blogs.msdn.com/blogfiles/interoperability/WindowsLiveWriter/AnewbridgeforPHPdevelope.NETDataServices_7FB3/PHP_ADO_DATA_SERVICEArchitecture_4.png" /&gt;&lt;br /&gt;
&lt;h3&gt;PHPDataSvcUtil Tool&lt;/h3&gt;PHPDataSvcUtil tool generates a single proxy PHP file that contains class definitions which will be used by the client application to access the data service.&lt;br /&gt;&lt;br /&gt;ADO .NET Data Services provide a metadata endpoint that returns a schema of resources and URIs deployed by the data service.  This &lt;a href="http://msdn.microsoft.com/en-us/library/cc716656.aspx" class="externalLink"&gt;metadata&lt;span class="externalLinkIcon"&gt;&lt;/span&gt;&lt;/a&gt; consists of an EntityContainer that holds collection of EntityType. An EntityType represents a useful element of data in the domain of an application, such as a customer, order, product, or supplier. A relationship between entities is defined as an AssociationType. Please refer &lt;a href="http://msdn.microsoft.com/en-us/library/cc668808.aspx" class="externalLink"&gt;ADO .NET Data Service Specifications&lt;span class="externalLinkIcon"&gt;&lt;/span&gt;&lt;/a&gt; for details.&lt;br /&gt;&lt;br /&gt;PHPDataSvcUtil tool generates one container class  and one class for each EntityType.&lt;br /&gt;
&lt;h1&gt;Contributors &lt;a name="Contributors"&gt;&lt;/a&gt;&lt;/h1&gt;&lt;table&gt;&lt;tr&gt;&lt;td&gt; &lt;img src="http://i3.codeplex.com/Project/Download/FileDownload.aspx?ProjectName=DotNetServicesRuby&amp;amp;DownloadId=47295" /&gt;&lt;/td&gt;&lt;td&gt; &lt;img src="http://www.persistentsys.com/Portals/0/logo(1)_2.jpg" /&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt; Microsoft is the project sponsor and provides architectural guidance and best practices for this PHP Toolkit.  &lt;/td&gt;&lt;td&gt;  &lt;a href="http://www.persistentsys.com/" class="externalLink"&gt;Persistent Systems Ltd.&lt;span class="externalLinkIcon"&gt;&lt;/span&gt;&lt;/a&gt; is an award-winning technology company specialized in software product development services. The Company’s proven processes for entire product lifecycle helps customers increase revenue, margin and enhance brand value.&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;&lt;/div&gt;&lt;div class="ClearBoth"&gt;&lt;/div&gt;</description><author>satish_nikam</author><pubDate>Tue, 01 Sep 2009 00:07:56 GMT</pubDate><guid isPermaLink="false">Updated Wiki: Home 20090901120756A</guid></item><item><title>Updated Wiki: Home</title><link>http://phpdataservices.codeplex.com/Wiki/View.aspx?title=Home&amp;version=10</link><description>&lt;div class="wikidoc"&gt;&lt;a href="#Overview"&gt;Overview&lt;/a&gt; &lt;img src="http://i3.codeplex.com/Project/Download/FileDownload.aspx?ProjectName=phpdataservices&amp;DownloadId=79223" alt="arrow_sm.gif" title="arrow_sm.gif" /&gt; &lt;a href="#Architecture"&gt;Architecture&lt;/a&gt; &lt;img src="http://i3.codeplex.com/Project/Download/FileDownload.aspx?ProjectName=phpdataservices&amp;DownloadId=79223" alt="arrow_sm.gif" title="arrow_sm.gif" /&gt; &lt;a href="http://phpdataservices.codeplex.com/Wiki/View.aspx?title=InstallationGuide"&gt;Installation Guide&lt;/a&gt; &lt;img src="http://i3.codeplex.com/Project/Download/FileDownload.aspx?ProjectName=phpdataservices&amp;DownloadId=79223" alt="arrow_sm.gif" title="arrow_sm.gif" /&gt; &lt;a href="http://phpdataservices.codeplex.com/Wiki/View.aspx?title=UserGuide"&gt;User Guide&lt;/a&gt; &lt;img src="http://i3.codeplex.com/Project/Download/FileDownload.aspx?ProjectName=phpdataservices&amp;DownloadId=79223" alt="arrow_sm.gif" title="arrow_sm.gif" /&gt; &lt;a href="http://phpdataservices.codeplex.com/Wiki/View.aspx?title=FAQ"&gt;FAQ&lt;/a&gt; &lt;img src="http://i3.codeplex.com/Project/Download/FileDownload.aspx?ProjectName=phpdataservices&amp;DownloadId=79223" alt="arrow_sm.gif" title="arrow_sm.gif" /&gt; &lt;a href="#Contributors"&gt;Contributors&lt;/a&gt;&lt;br /&gt;
&lt;h1&gt;Overview &lt;a name="Overview"&gt;&lt;/a&gt;&lt;/h1&gt;
PHP Toolkit for ADO .NET Data Services enables PHP developers to access data services created using ADO .NET Data Services framework. The goal is to provide the similar functionality as .NET library to access and modify the data and its relationship using URIs which points to pieces of data integrated with the web. &lt;br /&gt;Read this blog post &lt;a href="http://blogs.msdn.com/interoperability/archive/2009/08/21/a-new-bridge-for-php-developers-to-net-through-rest-php-toolkit-for-ado-net-data-services.aspx" class="externalLink"&gt;&amp;quot;A new bridge for PHP developers to .NET through REST: PHP Toolkit for ADO.NET Data Services&amp;quot;&lt;span class="externalLinkIcon"&gt;&lt;/span&gt;&lt;/a&gt; for a more detailed introduction.&lt;br /&gt;&lt;br /&gt;The &lt;a href="http://msdn.microsoft.com/en-us/data/bb931106.aspx" class="externalLink"&gt;ADO .NET Data Services&lt;span class="externalLinkIcon"&gt;&lt;/span&gt;&lt;/a&gt; framework consists of a combination of patterns and libraries that enable the creation and consumption of data services for the web. The goal of the ADO.Net Data Services framework is to facilitate the creation of flexible data services that are naturally integrated with the web, using URIs to point to pieces of data and simple, well-known formats to represent that data, such as JSON and plain XML. This results in the data service being surfaced to the web as a REST-style resource collection that is addressable with URIs and that agents can interact with using the usual HTTP verbs such as GET, POST or DELETE.&lt;br /&gt;&lt;br /&gt;
&lt;h1&gt;Architecture &lt;a name="Architecture"&gt;&lt;/a&gt;&lt;/h1&gt;The PHP Toolkit for ADO .NET Data Services is based on an utility (PHPDataSvcUtil) that is used to generate a proxy class from an ADO .NET Data Service, the class is then used in the PHP application to connect/edit/add/delete or browse records from the Data Service.&lt;br /&gt;&lt;img src="http://blogs.msdn.com/blogfiles/interoperability/WindowsLiveWriter/AnewbridgeforPHPdevelope.NETDataServices_7FB3/PHP_ADO_DATA_SERVICEArchitecture_4.png" /&gt;&lt;br /&gt;
&lt;h3&gt;PHPDataSvcUtil Tool&lt;/h3&gt;PHPDataSvcUtil tool generates a single proxy PHP file that contains class definitions which will be used by the client application to access the data service.&lt;br /&gt;&lt;br /&gt;ADO .NET Data Services provide a metadata endpoint that returns a schema of resources and URIs deployed by the data service.  This &lt;a href="http://msdn.microsoft.com/en-us/library/cc716656.aspx" class="externalLink"&gt;metadata&lt;span class="externalLinkIcon"&gt;&lt;/span&gt;&lt;/a&gt; consists of an EntityContainer that holds collection of EntityType. An EntityType represents a useful element of data in the domain of an application, such as a customer, order, product, or supplier. A relationship between entities is defined as an AssociationType. Please refer &lt;a href="http://msdn.microsoft.com/en-us/library/cc668808.aspx" class="externalLink"&gt;ADO .NET Data Service Specifications&lt;span class="externalLinkIcon"&gt;&lt;/span&gt;&lt;/a&gt; for details.&lt;br /&gt;&lt;br /&gt;PHPDataSvcUtil tool generates one container class  and one class for each EntityType.&lt;br /&gt;
&lt;h1&gt;Contributors &lt;a name="Contributors"&gt;&lt;/a&gt;&lt;/h1&gt;&lt;table&gt;&lt;tr&gt;&lt;td&gt; &lt;img src="http://i3.codeplex.com/Project/Download/FileDownload.aspx?ProjectName=DotNetServicesRuby&amp;amp;DownloadId=47295" /&gt;&lt;/td&gt;&lt;td&gt; &lt;img src="http://www.persistentsys.com/Portals/0/logo(1)_2.jpg" /&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt; Microsoft is the project sponsor and provides architectural guidance and best practices for this PHP Toolkit.  &lt;/td&gt;&lt;td&gt;  &lt;a href="http://www.persistentsys.com/" class="externalLink"&gt;Persistent Systems Ltd.&lt;span class="externalLinkIcon"&gt;&lt;/span&gt;&lt;/a&gt; is an award-winning technology company specialized in software product development services. The Company’s proven processes for entire product lifecycle helps customers increase revenue, margin and enhance brand value.&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;&lt;/div&gt;&lt;div class="ClearBoth"&gt;&lt;/div&gt;</description><author>satish_nikam</author><pubDate>Fri, 21 Aug 2009 22:11:11 GMT</pubDate><guid isPermaLink="false">Updated Wiki: Home 20090821101111P</guid></item></channel></rss>