| 1 |
lars |
1 |
<com:TContent ID="body">
|
|
|
2 |
|
|
|
3 |
<h1>Installing the DataMapper for PHP</h1>
|
|
|
4 |
|
|
|
5 |
<p>This section explains how to install, configure, and use the SQLMap DataMapper
|
|
|
6 |
with your PHP application.</p>
|
|
|
7 |
|
|
|
8 |
<p>There are two steps to using SQLMap DataMapper with your application for the
|
|
|
9 |
first time.</p>
|
|
|
10 |
<ol>
|
|
|
11 |
<li>Setup the distribution</li>
|
|
|
12 |
<li>Add XML documents</li>
|
|
|
13 |
</ol>
|
|
|
14 |
|
|
|
15 |
<h2>Setup the Distribution</h2>
|
|
|
16 |
|
|
|
17 |
<p>The official site for SQLMap PHP DataMapper is <a href="http://www.pradosoft.com">http://www.pradosoft.com</a>.
|
|
|
18 |
The DataMapper
|
|
|
19 |
is availabe as a source distribution in the form of a ZIP archive. To download
|
|
|
20 |
the distributions, follow the link to the Downloads area on the web site, and
|
|
|
21 |
select the the source distribution for the SQLMap PHP DataMapper release. You
|
|
|
22 |
can extract the distribution using a utility like WinZip or the extractor
|
|
|
23 |
built into newer versions of Windows.</p>
|
|
|
24 |
|
|
|
25 |
<p><b>TODO: Add distribution contents</b></p>
|
|
|
26 |
|
|
|
27 |
<h1>Add XML file items</h1>
|
|
|
28 |
<p>After unpacking the source distribution, you will need to add two types of XML
|
|
|
29 |
files to your Web application, or library project (and Test project if you
|
|
|
30 |
have one). These files are:</p>
|
|
|
31 |
|
|
|
32 |
<dl>
|
|
|
33 |
<dt>SqlMap.xml</dt>
|
|
|
34 |
<dd>-- A Data Map file that contains your SQL queries. Your project will contain one
|
|
|
35 |
or more of these files with names such as Account.xml or Product.xml.
|
|
|
36 |
</dd>
|
|
|
37 |
|
|
|
38 |
<dt>SqlMap.config</dt>
|
|
|
39 |
<dd>--
|
|
|
40 |
The DataMapper configuration file that is used to specify the locations of your
|
|
|
41 |
SqlMap.xml files. It is also used to define other DataMapper
|
|
|
42 |
configuration options such as caching. You will need to include one SqlMap.config
|
|
|
43 |
file for each data source that your project has.
|
|
|
44 |
</dd>
|
|
|
45 |
</dl>
|
|
|
46 |
|
|
|
47 |
<p>As expected, the <tt>SqlMap.config</tt> file should be (by default) placed where the DataMapper
|
|
|
48 |
can find them at runtime.</p>
|
|
|
49 |
|
|
|
50 |
|
|
|
51 |
</com:TContent>
|