1
0
mirror of synced 2024-12-14 23:26:04 +03:00
doctrine2/tests_old/coverage/Doctrine_Search.html

891 lines
40 KiB
HTML
Raw Normal View History

<html>
<head>
<title>Coverage for Doctrine_Search</title>
<style type="text/css">
.covered{ background: green;}
.normal{ background: white;}
.red{ background: red;}
.orange{ background: #f90;}
</style>
</head>
<body><h1>Coverage for Doctrine_Search</h1><p><a href="index.php">Back to coverage report</a></p><table>
<tr><td>1</td>
<td class="normal">&lt;?php
</td></tr>
<tr><td>2</td>
<td class="normal">/*
</td></tr>
<tr><td>3</td>
<td class="normal">&nbsp;*&nbsp;&nbsp;$Id$
</td></tr>
<tr><td>4</td>
<td class="normal">&nbsp;*
</td></tr>
<tr><td>5</td>
<td class="normal">&nbsp;*&nbsp;THIS&nbsp;SOFTWARE&nbsp;IS&nbsp;PROVIDED&nbsp;BY&nbsp;THE&nbsp;COPYRIGHT&nbsp;HOLDERS&nbsp;AND&nbsp;CONTRIBUTORS
</td></tr>
<tr><td>6</td>
<td class="normal">&nbsp;*&nbsp;&quot;AS&nbsp;IS&quot;&nbsp;AND&nbsp;ANY&nbsp;EXPRESS&nbsp;OR&nbsp;IMPLIED&nbsp;WARRANTIES,&nbsp;INCLUDING,&nbsp;BUT&nbsp;NOT
</td></tr>
<tr><td>7</td>
<td class="normal">&nbsp;*&nbsp;LIMITED&nbsp;TO,&nbsp;THE&nbsp;IMPLIED&nbsp;WARRANTIES&nbsp;OF&nbsp;MERCHANTABILITY&nbsp;AND&nbsp;FITNESS&nbsp;FOR
</td></tr>
<tr><td>8</td>
<td class="normal">&nbsp;*&nbsp;A&nbsp;PARTICULAR&nbsp;PURPOSE&nbsp;ARE&nbsp;DISCLAIMED.&nbsp;IN&nbsp;NO&nbsp;EVENT&nbsp;SHALL&nbsp;THE&nbsp;COPYRIGHT
</td></tr>
<tr><td>9</td>
<td class="normal">&nbsp;*&nbsp;OWNER&nbsp;OR&nbsp;CONTRIBUTORS&nbsp;BE&nbsp;LIABLE&nbsp;FOR&nbsp;ANY&nbsp;DIRECT,&nbsp;INDIRECT,&nbsp;INCIDENTAL,
</td></tr>
<tr><td>10</td>
<td class="normal">&nbsp;*&nbsp;SPECIAL,&nbsp;EXEMPLARY,&nbsp;OR&nbsp;CONSEQUENTIAL&nbsp;DAMAGES&nbsp;(INCLUDING,&nbsp;BUT&nbsp;NOT
</td></tr>
<tr><td>11</td>
<td class="normal">&nbsp;*&nbsp;LIMITED&nbsp;TO,&nbsp;PROCUREMENT&nbsp;OF&nbsp;SUBSTITUTE&nbsp;GOODS&nbsp;OR&nbsp;SERVICES;&nbsp;LOSS&nbsp;OF&nbsp;USE,
</td></tr>
<tr><td>12</td>
<td class="normal">&nbsp;*&nbsp;DATA,&nbsp;OR&nbsp;PROFITS;&nbsp;OR&nbsp;BUSINESS&nbsp;INTERRUPTION)&nbsp;HOWEVER&nbsp;CAUSED&nbsp;AND&nbsp;ON&nbsp;ANY
</td></tr>
<tr><td>13</td>
<td class="normal">&nbsp;*&nbsp;THEORY&nbsp;OF&nbsp;LIABILITY,&nbsp;WHETHER&nbsp;IN&nbsp;CONTRACT,&nbsp;STRICT&nbsp;LIABILITY,&nbsp;OR&nbsp;TORT
</td></tr>
<tr><td>14</td>
<td class="normal">&nbsp;*&nbsp;(INCLUDING&nbsp;NEGLIGENCE&nbsp;OR&nbsp;OTHERWISE)&nbsp;ARISING&nbsp;IN&nbsp;ANY&nbsp;WAY&nbsp;OUT&nbsp;OF&nbsp;THE&nbsp;USE
</td></tr>
<tr><td>15</td>
<td class="normal">&nbsp;*&nbsp;OF&nbsp;THIS&nbsp;SOFTWARE,&nbsp;EVEN&nbsp;IF&nbsp;ADVISED&nbsp;OF&nbsp;THE&nbsp;POSSIBILITY&nbsp;OF&nbsp;SUCH&nbsp;DAMAGE.
</td></tr>
<tr><td>16</td>
<td class="normal">&nbsp;*
</td></tr>
<tr><td>17</td>
<td class="normal">&nbsp;*&nbsp;This&nbsp;software&nbsp;consists&nbsp;of&nbsp;voluntary&nbsp;contributions&nbsp;made&nbsp;by&nbsp;many&nbsp;individuals
</td></tr>
<tr><td>18</td>
<td class="normal">&nbsp;*&nbsp;and&nbsp;is&nbsp;licensed&nbsp;under&nbsp;the&nbsp;LGPL.&nbsp;For&nbsp;more&nbsp;information,&nbsp;see
</td></tr>
<tr><td>19</td>
<td class="normal">&nbsp;*&nbsp;&lt;http://www.phpdoctrine.com&gt;.
</td></tr>
<tr><td>20</td>
<td class="normal">&nbsp;*/
</td></tr>
<tr><td>21</td>
<td class="normal">
</td></tr>
<tr><td>22</td>
<td class="normal">/**
</td></tr>
<tr><td>23</td>
<td class="normal">&nbsp;*&nbsp;Doctrine_Search
</td></tr>
<tr><td>24</td>
<td class="normal">&nbsp;*
</td></tr>
<tr><td>25</td>
<td class="normal">&nbsp;*&nbsp;@package&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Doctrine
</td></tr>
<tr><td>26</td>
<td class="normal">&nbsp;*&nbsp;@subpackage&nbsp;&nbsp;Search
</td></tr>
<tr><td>27</td>
<td class="normal">&nbsp;*&nbsp;@author&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Konsta&nbsp;Vesterinen&nbsp;&lt;kvesteri@cc.hut.fi&gt;
</td></tr>
<tr><td>28</td>
<td class="normal">&nbsp;*&nbsp;@license&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;http://www.opensource.org/licenses/lgpl-license.php&nbsp;LGPL
</td></tr>
<tr><td>29</td>
<td class="normal">&nbsp;*&nbsp;@version&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;$Revision$
</td></tr>
<tr><td>30</td>
<td class="normal">&nbsp;*&nbsp;@link&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;www.phpdoctrine.com
</td></tr>
<tr><td>31</td>
<td class="normal">&nbsp;*&nbsp;@since&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;1.0
</td></tr>
<tr><td>32</td>
<td class="normal">&nbsp;*/
</td></tr>
<tr><td>33</td>
<td class="covered">class&nbsp;Doctrine_Search&nbsp;extends&nbsp;Doctrine_Plugin
</td></tr>
<tr><td>34</td>
<td class="normal">{
</td></tr>
<tr><td>35</td>
<td class="normal">&nbsp;&nbsp;&nbsp;&nbsp;const&nbsp;INDEX_FILES&nbsp;=&nbsp;0;
</td></tr>
<tr><td>36</td>
<td class="normal">
</td></tr>
<tr><td>37</td>
<td class="normal">&nbsp;&nbsp;&nbsp;&nbsp;const&nbsp;INDEX_TABLES&nbsp;=&nbsp;1;
</td></tr>
<tr><td>38</td>
<td class="normal">
</td></tr>
<tr><td>39</td>
<td class="normal">&nbsp;&nbsp;&nbsp;&nbsp;protected&nbsp;$_options&nbsp;=&nbsp;array('generateFiles'&nbsp;=&gt;&nbsp;false,
</td></tr>
<tr><td>40</td>
<td class="normal">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;'type'&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;=&gt;&nbsp;self::INDEX_TABLES,
</td></tr>
<tr><td>41</td>
<td class="normal">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;'className'&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;=&gt;&nbsp;'%CLASS%Index',
</td></tr>
<tr><td>42</td>
<td class="normal">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;'generatePath'&nbsp;&nbsp;=&gt;&nbsp;false,
</td></tr>
<tr><td>43</td>
<td class="normal">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;'resource'&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;=&gt;&nbsp;null,
</td></tr>
<tr><td>44</td>
<td class="normal">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;'batchUpdates'&nbsp;&nbsp;=&gt;&nbsp;false,
</td></tr>
<tr><td>45</td>
<td class="normal">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;'pluginTable'&nbsp;&nbsp;&nbsp;=&gt;&nbsp;false,
</td></tr>
<tr><td>46</td>
<td class="normal">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;'fields'&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;=&gt;&nbsp;array(),
</td></tr>
<tr><td>47</td>
<td class="normal">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;'connection'&nbsp;&nbsp;&nbsp;&nbsp;=&gt;&nbsp;null);
</td></tr>
<tr><td>48</td>
<td class="normal">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
</td></tr>
<tr><td>49</td>
<td class="normal">&nbsp;&nbsp;&nbsp;&nbsp;protected&nbsp;$_built&nbsp;=&nbsp;false;
</td></tr>
<tr><td>50</td>
<td class="normal">
</td></tr>
<tr><td>51</td>
<td class="normal">&nbsp;&nbsp;&nbsp;&nbsp;
</td></tr>
<tr><td>52</td>
2007-11-25 23:32:49 +03:00
<td class="normal">&nbsp;&nbsp;&nbsp;&nbsp;/**
</td></tr>
<tr><td>53</td>
2007-11-25 23:32:49 +03:00
<td class="normal">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*&nbsp;__construct&nbsp;
</td></tr>
<tr><td>54</td>
2007-11-25 23:32:49 +03:00
<td class="normal">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*&nbsp;
</td></tr>
<tr><td>55</td>
2007-11-25 23:32:49 +03:00
<td class="normal">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*&nbsp;@param&nbsp;array&nbsp;$options&nbsp;
</td></tr>
<tr><td>56</td>
2007-11-25 23:32:49 +03:00
<td class="normal">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*&nbsp;@return&nbsp;void
</td></tr>
<tr><td>57</td>
2007-11-25 23:32:49 +03:00
<td class="normal">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*/
</td></tr>
<tr><td>58</td>
2007-11-25 23:32:49 +03:00
<td class="normal">&nbsp;&nbsp;&nbsp;&nbsp;public&nbsp;function&nbsp;__construct(array&nbsp;$options)
</td></tr>
<tr><td>59</td>
2007-11-25 23:32:49 +03:00
<td class="normal">&nbsp;&nbsp;&nbsp;&nbsp;{
</td></tr>
<tr><td>60</td>
2007-11-25 23:32:49 +03:00
<td class="covered">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;$this-&gt;_options&nbsp;=&nbsp;array_merge($this-&gt;_options,&nbsp;$options);
</td></tr>
<tr><td>61</td>
2007-11-25 23:32:49 +03:00
<td class="normal">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
</td></tr>
<tr><td>62</td>
2007-11-25 23:32:49 +03:00
<td class="covered">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;if&nbsp;(&nbsp;!&nbsp;isset($this-&gt;_options['analyzer']))&nbsp;{
</td></tr>
<tr><td>63</td>
2007-11-25 23:32:49 +03:00
<td class="covered">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;$this-&gt;_options['analyzer']&nbsp;=&nbsp;new&nbsp;Doctrine_Search_Analyzer_Standard();
</td></tr>
<tr><td>64</td>
2007-11-25 23:32:49 +03:00
<td class="covered">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}
</td></tr>
<tr><td>65</td>
2007-11-25 23:32:49 +03:00
<td class="covered">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;if&nbsp;(&nbsp;!&nbsp;isset($this-&gt;_options['connection']))&nbsp;{
</td></tr>
<tr><td>66</td>
2007-11-25 23:32:49 +03:00
<td class="covered">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;$this-&gt;_options['connection']&nbsp;=&nbsp;Doctrine_Manager::connection();
</td></tr>
<tr><td>67</td>
2007-11-25 23:32:49 +03:00
<td class="covered">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}
</td></tr>
<tr><td>68</td>
2007-11-25 23:32:49 +03:00
<td class="covered">&nbsp;&nbsp;&nbsp;&nbsp;}
</td></tr>
<tr><td>69</td>
2007-11-25 23:32:49 +03:00
<td class="normal">
</td></tr>
<tr><td>70</td>
2007-11-25 23:32:49 +03:00
<td class="normal">
</td></tr>
<tr><td>71</td>
2007-11-25 23:32:49 +03:00
<td class="normal">&nbsp;&nbsp;&nbsp;&nbsp;/**
</td></tr>
<tr><td>72</td>
2007-11-25 23:32:49 +03:00
<td class="normal">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*&nbsp;search&nbsp;
</td></tr>
<tr><td>73</td>
2007-11-25 23:32:49 +03:00
<td class="normal">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*&nbsp;
</td></tr>
<tr><td>74</td>
2007-11-25 23:32:49 +03:00
<td class="normal">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*&nbsp;@param&nbsp;string&nbsp;$query&nbsp;
</td></tr>
<tr><td>75</td>
2007-11-25 23:32:49 +03:00
<td class="normal">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*&nbsp;@return&nbsp;Doctrine_Collection&nbsp;The&nbsp;collection&nbsp;of&nbsp;search&nbsp;results
</td></tr>
<tr><td>76</td>
2007-11-25 23:32:49 +03:00
<td class="normal">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*/
</td></tr>
<tr><td>77</td>
2007-11-25 23:32:49 +03:00
<td class="normal">&nbsp;&nbsp;&nbsp;&nbsp;public&nbsp;function&nbsp;search($query)
</td></tr>
<tr><td>78</td>
2007-11-25 23:32:49 +03:00
<td class="normal">&nbsp;&nbsp;&nbsp;&nbsp;{
</td></tr>
<tr><td>79</td>
2007-11-25 23:32:49 +03:00
<td class="covered">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;$q&nbsp;=&nbsp;new&nbsp;Doctrine_Search_Query($this-&gt;_options['pluginTable']);
</td></tr>
<tr><td>80</td>
2007-11-25 23:32:49 +03:00
<td class="normal">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
</td></tr>
<tr><td>81</td>
2007-11-25 23:32:49 +03:00
<td class="covered">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;$q-&gt;query($query);
</td></tr>
<tr><td>82</td>
2007-11-25 23:32:49 +03:00
<td class="normal">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
</td></tr>
<tr><td>83</td>
2007-11-25 23:32:49 +03:00
<td class="covered">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;return&nbsp;$this-&gt;_options['connection']-&gt;fetchAll($q-&gt;getSql(),&nbsp;$q-&gt;getParams());;
</td></tr>
<tr><td>84</td>
2007-11-25 23:32:49 +03:00
<td class="orange">&nbsp;&nbsp;&nbsp;&nbsp;}
</td></tr>
<tr><td>85</td>
2007-11-25 23:32:49 +03:00
<td class="normal">&nbsp;&nbsp;&nbsp;&nbsp;
</td></tr>
<tr><td>86</td>
2007-11-25 23:32:49 +03:00
<td class="normal">&nbsp;&nbsp;&nbsp;&nbsp;/**
</td></tr>
<tr><td>87</td>
2007-11-25 23:32:49 +03:00
<td class="normal">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*&nbsp;analyze&nbsp;
</td></tr>
<tr><td>88</td>
2007-11-25 23:32:49 +03:00
<td class="normal">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*&nbsp;
</td></tr>
<tr><td>89</td>
2007-11-25 23:32:49 +03:00
<td class="normal">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*&nbsp;@param&nbsp;string&nbsp;$text&nbsp;
</td></tr>
<tr><td>90</td>
2007-11-25 23:32:49 +03:00
<td class="normal">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*&nbsp;@return&nbsp;void
</td></tr>
<tr><td>91</td>
2007-11-25 23:32:49 +03:00
<td class="normal">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*/
</td></tr>
<tr><td>92</td>
2007-11-25 23:32:49 +03:00
<td class="normal">&nbsp;&nbsp;&nbsp;&nbsp;public&nbsp;function&nbsp;analyze($text)
</td></tr>
<tr><td>93</td>
2007-11-25 23:32:49 +03:00
<td class="normal">&nbsp;&nbsp;&nbsp;&nbsp;{
</td></tr>
<tr><td>94</td>
2007-11-25 23:32:49 +03:00
<td class="covered">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;return&nbsp;$this-&gt;_options['analyzer']-&gt;analyze($text);
</td></tr>
<tr><td>95</td>
2007-11-25 23:32:49 +03:00
<td class="orange">&nbsp;&nbsp;&nbsp;&nbsp;}
</td></tr>
<tr><td>96</td>
2007-11-25 23:32:49 +03:00
<td class="normal">
</td></tr>
<tr><td>97</td>
2007-11-25 23:32:49 +03:00
<td class="normal">&nbsp;&nbsp;&nbsp;&nbsp;/**
</td></tr>
<tr><td>98</td>
2007-11-25 23:32:49 +03:00
<td class="normal">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*&nbsp;updateIndex
</td></tr>
<tr><td>99</td>
2007-11-25 23:32:49 +03:00
<td class="normal">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*&nbsp;updates&nbsp;the&nbsp;index
</td></tr>
<tr><td>100</td>
2007-11-25 23:32:49 +03:00
<td class="normal">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*
</td></tr>
<tr><td>101</td>
2007-11-25 23:32:49 +03:00
<td class="normal">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*&nbsp;@param&nbsp;Doctrine_Record&nbsp;$record
</td></tr>
<tr><td>102</td>
2007-11-25 23:32:49 +03:00
<td class="normal">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*&nbsp;@return&nbsp;integer
</td></tr>
<tr><td>103</td>
2007-11-25 23:32:49 +03:00
<td class="normal">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*/
</td></tr>
<tr><td>104</td>
2007-11-25 23:32:49 +03:00
<td class="normal">&nbsp;&nbsp;&nbsp;&nbsp;public&nbsp;function&nbsp;updateIndex(array&nbsp;$data)
</td></tr>
<tr><td>105</td>
2007-11-25 23:32:49 +03:00
<td class="normal">&nbsp;&nbsp;&nbsp;&nbsp;{
</td></tr>
<tr><td>106</td>
2007-11-25 23:32:49 +03:00
<td class="covered">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;$this-&gt;buildDefinition();&nbsp;
</td></tr>
<tr><td>107</td>
2007-11-25 23:32:49 +03:00
<td class="normal">
</td></tr>
<tr><td>108</td>
2007-11-25 23:32:49 +03:00
<td class="covered">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;$fields&nbsp;=&nbsp;$this-&gt;getOption('fields');
</td></tr>
<tr><td>109</td>
2007-11-25 23:32:49 +03:00
<td class="covered">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;$class&nbsp;&nbsp;=&nbsp;$this-&gt;getOption('className');
</td></tr>
<tr><td>110</td>
2007-11-25 23:32:49 +03:00
<td class="covered">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;$name&nbsp;&nbsp;&nbsp;=&nbsp;$this-&gt;getOption('resource')-&gt;getComponentName();
</td></tr>
<tr><td>111</td>
2007-11-25 23:32:49 +03:00
<td class="covered">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;$conn&nbsp;&nbsp;&nbsp;=&nbsp;$this-&gt;getOption('resource')-&gt;getConnection();
</td></tr>
<tr><td>112</td>
2007-11-25 23:32:49 +03:00
<td class="covered">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;$identifier&nbsp;=&nbsp;$this-&gt;_options['resource']-&gt;getIdentifier();
</td></tr>
<tr><td>113</td>
2007-11-25 23:32:49 +03:00
<td class="normal">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
</td></tr>
<tr><td>114</td>
2007-11-25 23:32:49 +03:00
<td class="covered">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;$q&nbsp;=&nbsp;Doctrine_Query::create()-&gt;delete()
</td></tr>
<tr><td>115</td>
2007-11-25 23:32:49 +03:00
<td class="covered">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;-&gt;from($class);
</td></tr>
<tr><td>116</td>
2007-11-25 23:32:49 +03:00
<td class="covered">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;foreach&nbsp;((array)&nbsp;$identifier&nbsp;as&nbsp;$id)&nbsp;{
</td></tr>
<tr><td>117</td>
2007-11-25 23:32:49 +03:00
<td class="covered">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;$q-&gt;addWhere($id&nbsp;.&nbsp;'&nbsp;=&nbsp;?',&nbsp;array($data[$id]));
</td></tr>
<tr><td>118</td>
2007-11-25 23:32:49 +03:00
<td class="covered">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}
</td></tr>
<tr><td>119</td>
2007-11-25 23:32:49 +03:00
<td class="covered">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;$q-&gt;execute();
</td></tr>
<tr><td>120</td>
<td class="normal">
</td></tr>
<tr><td>121</td>
2007-11-25 23:32:49 +03:00
<td class="covered">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;if&nbsp;($this-&gt;_options['batchUpdates']&nbsp;===&nbsp;true)&nbsp;{
</td></tr>
<tr><td>122</td>
2007-11-25 23:32:49 +03:00
<td class="covered">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;$index&nbsp;=&nbsp;new&nbsp;$class();&nbsp;
</td></tr>
<tr><td>123</td>
2007-11-25 23:32:49 +03:00
<td class="normal">
</td></tr>
<tr><td>124</td>
2007-11-25 23:32:49 +03:00
<td class="covered">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;foreach&nbsp;((array)&nbsp;$this-&gt;_options['resource']-&gt;getIdentifier()&nbsp;as&nbsp;$id)&nbsp;{
</td></tr>
<tr><td>125</td>
2007-11-25 23:32:49 +03:00
<td class="covered">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;$index-&gt;$id&nbsp;=&nbsp;$data[$id];
</td></tr>
<tr><td>126</td>
2007-11-25 23:32:49 +03:00
<td class="covered">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}
</td></tr>
<tr><td>127</td>
<td class="normal">
</td></tr>
<tr><td>128</td>
2007-11-25 23:32:49 +03:00
<td class="covered">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;$index-&gt;save();
</td></tr>
<tr><td>129</td>
2007-11-25 23:32:49 +03:00
<td class="covered">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}&nbsp;else&nbsp;{
</td></tr>
<tr><td>130</td>
2007-11-25 23:32:49 +03:00
<td class="covered">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;foreach&nbsp;($fields&nbsp;as&nbsp;$field)&nbsp;{
</td></tr>
<tr><td>131</td>
2007-11-25 23:32:49 +03:00
<td class="normal">
</td></tr>
<tr><td>132</td>
2007-11-25 23:32:49 +03:00
<td class="covered">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;$value&nbsp;=&nbsp;$data[$field];
</td></tr>
<tr><td>133</td>
<td class="normal">
</td></tr>
<tr><td>134</td>
2007-11-25 23:32:49 +03:00
<td class="covered">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;$terms&nbsp;=&nbsp;$this-&gt;analyze($value);
</td></tr>
<tr><td>135</td>
2007-11-25 23:32:49 +03:00
<td class="normal">
</td></tr>
<tr><td>136</td>
2007-11-25 23:32:49 +03:00
<td class="covered">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;foreach&nbsp;($terms&nbsp;as&nbsp;$pos&nbsp;=&gt;&nbsp;$term)&nbsp;{
</td></tr>
<tr><td>137</td>
2007-11-25 23:32:49 +03:00
<td class="covered">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;$index&nbsp;=&nbsp;new&nbsp;$class();
</td></tr>
<tr><td>138</td>
2007-11-25 23:32:49 +03:00
<td class="normal">
</td></tr>
<tr><td>139</td>
2007-11-25 23:32:49 +03:00
<td class="covered">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;$index-&gt;keyword&nbsp;=&nbsp;$term;
</td></tr>
<tr><td>140</td>
2007-11-25 23:32:49 +03:00
<td class="covered">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;$index-&gt;position&nbsp;=&nbsp;$pos;
</td></tr>
<tr><td>141</td>
2007-11-25 23:32:49 +03:00
<td class="covered">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;$index-&gt;field&nbsp;=&nbsp;$field;
</td></tr>
<tr><td>142</td>
2007-11-25 23:32:49 +03:00
<td class="covered">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;foreach&nbsp;((array)&nbsp;$this-&gt;_options['resource']-&gt;getIdentifier()&nbsp;as&nbsp;$id)&nbsp;{
</td></tr>
<tr><td>143</td>
2007-11-25 23:32:49 +03:00
<td class="covered">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;$index-&gt;$id&nbsp;=&nbsp;$data[$id];
</td></tr>
<tr><td>144</td>
2007-11-25 23:32:49 +03:00
<td class="covered">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}
</td></tr>
<tr><td>145</td>
2007-11-25 23:32:49 +03:00
<td class="normal">
</td></tr>
<tr><td>146</td>
2007-11-25 23:32:49 +03:00
<td class="covered">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;$index-&gt;save();
</td></tr>
<tr><td>147</td>
2007-11-25 23:32:49 +03:00
<td class="covered">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}
</td></tr>
<tr><td>148</td>
2007-11-25 23:32:49 +03:00
<td class="covered">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}
</td></tr>
<tr><td>149</td>
2007-11-25 23:32:49 +03:00
<td class="normal">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}
</td></tr>
<tr><td>150</td>
2007-11-25 23:32:49 +03:00
<td class="covered">&nbsp;&nbsp;&nbsp;&nbsp;}
</td></tr>
<tr><td>151</td>
2007-11-25 23:32:49 +03:00
<td class="normal">
</td></tr>
<tr><td>152</td>
2007-11-25 23:32:49 +03:00
<td class="normal">&nbsp;&nbsp;&nbsp;&nbsp;/**
</td></tr>
<tr><td>153</td>
2007-11-25 23:32:49 +03:00
<td class="normal">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*&nbsp;readTableData&nbsp;
</td></tr>
<tr><td>154</td>
2007-11-25 23:32:49 +03:00
<td class="normal">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*&nbsp;
</td></tr>
<tr><td>155</td>
2007-11-25 23:32:49 +03:00
<td class="normal">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*&nbsp;@param&nbsp;mixed&nbsp;$limit&nbsp;
</td></tr>
<tr><td>156</td>
2007-11-25 23:32:49 +03:00
<td class="normal">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*&nbsp;@param&nbsp;mixed&nbsp;$offset&nbsp;
</td></tr>
<tr><td>157</td>
2007-11-25 23:32:49 +03:00
<td class="normal">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*&nbsp;@return&nbsp;Doctrine_Collection&nbsp;The&nbsp;collection&nbsp;of&nbsp;results
</td></tr>
<tr><td>158</td>
2007-11-25 23:32:49 +03:00
<td class="normal">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*/
</td></tr>
<tr><td>159</td>
2007-11-25 23:32:49 +03:00
<td class="normal">&nbsp;&nbsp;&nbsp;&nbsp;public&nbsp;function&nbsp;readTableData($limit&nbsp;=&nbsp;null,&nbsp;$offset&nbsp;=&nbsp;null)
</td></tr>
<tr><td>160</td>
2007-11-25 23:32:49 +03:00
<td class="normal">&nbsp;&nbsp;&nbsp;&nbsp;{
</td></tr>
<tr><td>161</td>
2007-11-25 23:32:49 +03:00
<td class="covered">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;$this-&gt;buildDefinition();&nbsp;
</td></tr>
<tr><td>162</td>
2007-11-25 23:32:49 +03:00
<td class="normal">
</td></tr>
<tr><td>163</td>
2007-11-25 23:32:49 +03:00
<td class="covered">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;$conn&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;=&nbsp;$this-&gt;_options['resource']-&gt;getConnection();
</td></tr>
<tr><td>164</td>
2007-11-25 23:32:49 +03:00
<td class="covered">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;$tableName&nbsp;=&nbsp;$this-&gt;_options['resource']-&gt;getTableName();
</td></tr>
<tr><td>165</td>
2007-11-25 23:32:49 +03:00
<td class="covered">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;$id&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;=&nbsp;$this-&gt;_options['resource']-&gt;getIdentifier();
</td></tr>
<tr><td>166</td>
<td class="normal">
</td></tr>
<tr><td>167</td>
2007-11-25 23:32:49 +03:00
<td class="covered">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;$query&nbsp;=&nbsp;'SELECT&nbsp;*&nbsp;FROM&nbsp;'&nbsp;.&nbsp;$conn-&gt;quoteIdentifier($tableName)
</td></tr>
<tr><td>168</td>
2007-11-25 23:32:49 +03:00
<td class="covered">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;.&nbsp;'&nbsp;WHERE&nbsp;'&nbsp;.&nbsp;$conn-&gt;quoteIdentifier($id)
</td></tr>
<tr><td>169</td>
2007-11-25 23:32:49 +03:00
<td class="covered">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;.&nbsp;'&nbsp;IN&nbsp;(SELECT&nbsp;'&nbsp;.&nbsp;$conn-&gt;quoteIdentifier($id)
</td></tr>
<tr><td>170</td>
2007-11-25 23:32:49 +03:00
<td class="covered">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;.&nbsp;'&nbsp;FROM&nbsp;'&nbsp;.&nbsp;$conn-&gt;quoteIdentifier($this-&gt;_options['pluginTable']-&gt;getTableName())
</td></tr>
<tr><td>171</td>
2007-11-25 23:32:49 +03:00
<td class="covered">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;.&nbsp;'&nbsp;WHERE&nbsp;keyword&nbsp;IS&nbsp;NULL)';
</td></tr>
<tr><td>172</td>
<td class="normal">
</td></tr>
<tr><td>173</td>
2007-11-25 23:32:49 +03:00
<td class="covered">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;$query&nbsp;=&nbsp;$conn-&gt;modifyLimitQuery($query,&nbsp;$limit,&nbsp;$offset);
</td></tr>
<tr><td>174</td>
2007-11-25 23:32:49 +03:00
<td class="normal">
</td></tr>
<tr><td>175</td>
2007-11-25 23:32:49 +03:00
<td class="covered">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;return&nbsp;$conn-&gt;fetchAll($query);
</td></tr>
<tr><td>176</td>
2007-11-25 23:32:49 +03:00
<td class="orange">&nbsp;&nbsp;&nbsp;&nbsp;}
</td></tr>
<tr><td>177</td>
2007-11-25 23:32:49 +03:00
<td class="normal">&nbsp;&nbsp;&nbsp;&nbsp;
</td></tr>
<tr><td>178</td>
2007-11-25 23:32:49 +03:00
<td class="normal">
</td></tr>
<tr><td>179</td>
2007-11-25 23:32:49 +03:00
<td class="normal">
</td></tr>
<tr><td>180</td>
2007-11-25 23:32:49 +03:00
<td class="normal">&nbsp;&nbsp;&nbsp;&nbsp;/**
</td></tr>
<tr><td>181</td>
2007-11-25 23:32:49 +03:00
<td class="normal">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*&nbsp;batchUpdateIndex&nbsp;
</td></tr>
<tr><td>182</td>
2007-11-25 23:32:49 +03:00
<td class="normal">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*&nbsp;
</td></tr>
<tr><td>183</td>
2007-11-25 23:32:49 +03:00
<td class="normal">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*&nbsp;@param&nbsp;mixed&nbsp;$limit&nbsp;
</td></tr>
<tr><td>184</td>
2007-11-25 23:32:49 +03:00
<td class="normal">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*&nbsp;@param&nbsp;mixed&nbsp;$offset&nbsp;
</td></tr>
<tr><td>185</td>
2007-11-25 23:32:49 +03:00
<td class="normal">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*&nbsp;@return&nbsp;void
</td></tr>
<tr><td>186</td>
2007-11-25 23:32:49 +03:00
<td class="normal">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*/
</td></tr>
<tr><td>187</td>
2007-11-25 23:32:49 +03:00
<td class="normal">&nbsp;&nbsp;&nbsp;&nbsp;public&nbsp;function&nbsp;batchUpdateIndex($limit&nbsp;=&nbsp;null,&nbsp;$offset&nbsp;=&nbsp;null)
</td></tr>
<tr><td>188</td>
2007-11-25 23:32:49 +03:00
<td class="normal">&nbsp;&nbsp;&nbsp;&nbsp;{
</td></tr>
<tr><td>189</td>
2007-11-25 23:32:49 +03:00
<td class="covered">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;$this-&gt;buildDefinition();
</td></tr>
<tr><td>190</td>
2007-11-25 23:32:49 +03:00
<td class="normal">
</td></tr>
<tr><td>191</td>
2007-11-25 23:32:49 +03:00
<td class="covered">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;$id&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;=&nbsp;$this-&gt;_options['resource']-&gt;getIdentifier();
</td></tr>
<tr><td>192</td>
2007-11-25 23:32:49 +03:00
<td class="covered">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;$class&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;=&nbsp;$this-&gt;_options['className'];
</td></tr>
<tr><td>193</td>
2007-11-25 23:32:49 +03:00
<td class="covered">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;$fields&nbsp;&nbsp;&nbsp;&nbsp;=&nbsp;$this-&gt;_options['fields'];
</td></tr>
<tr><td>194</td>
2007-11-25 23:32:49 +03:00
<td class="covered">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;$conn&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;=&nbsp;$this-&gt;_options['connection'];
</td></tr>
<tr><td>195</td>
2007-11-25 23:32:49 +03:00
<td class="normal">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;try&nbsp;{
</td></tr>
<tr><td>196</td>
2007-11-25 23:32:49 +03:00
<td class="normal">
</td></tr>
<tr><td>197</td>
2007-11-25 23:32:49 +03:00
<td class="covered">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;$conn-&gt;beginTransaction();
</td></tr>
<tr><td>198</td>
<td class="normal">
</td></tr>
<tr><td>199</td>
2007-11-25 23:32:49 +03:00
<td class="covered">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;$rows&nbsp;=&nbsp;$this-&gt;readTableData($limit,&nbsp;$offset);
</td></tr>
<tr><td>200</td>
2007-11-25 23:32:49 +03:00
<td class="normal">
</td></tr>
<tr><td>201</td>
2007-11-25 23:32:49 +03:00
<td class="covered">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;foreach&nbsp;($rows&nbsp;as&nbsp;$row)&nbsp;{
</td></tr>
<tr><td>202</td>
2007-11-25 23:32:49 +03:00
<td class="covered">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;$ids[]&nbsp;=&nbsp;$row[$id];
</td></tr>
<tr><td>203</td>
2007-11-25 23:32:49 +03:00
<td class="covered">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}
</td></tr>
<tr><td>204</td>
<td class="normal">
</td></tr>
<tr><td>205</td>
2007-11-25 23:32:49 +03:00
<td class="covered">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;$conn-&gt;exec('DELETE&nbsp;FROM&nbsp;'&nbsp;
</td></tr>
<tr><td>206</td>
2007-11-25 23:32:49 +03:00
<td class="covered">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;.&nbsp;$conn-&gt;quoteIdentifier($this-&gt;_options['pluginTable']-&gt;getTableName())
</td></tr>
<tr><td>207</td>
2007-11-25 23:32:49 +03:00
<td class="covered">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;.&nbsp;'&nbsp;WHERE&nbsp;'&nbsp;.&nbsp;$conn-&gt;quoteIdentifier($id)&nbsp;.&nbsp;'&nbsp;IN&nbsp;('&nbsp;.&nbsp;implode(',&nbsp;',&nbsp;$ids)&nbsp;.&nbsp;')');
</td></tr>
<tr><td>208</td>
2007-11-25 23:32:49 +03:00
<td class="normal">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
</td></tr>
<tr><td>209</td>
2007-11-25 23:32:49 +03:00
<td class="covered">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;foreach&nbsp;($rows&nbsp;as&nbsp;$row)&nbsp;{
</td></tr>
<tr><td>210</td>
2007-11-25 23:32:49 +03:00
<td class="covered">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;foreach&nbsp;($fields&nbsp;as&nbsp;$field)&nbsp;{
</td></tr>
<tr><td>211</td>
2007-11-25 23:32:49 +03:00
<td class="covered">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;$data&nbsp;&nbsp;=&nbsp;$row[$field];
</td></tr>
<tr><td>212</td>
2007-11-25 23:32:49 +03:00
<td class="normal">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
</td></tr>
<tr><td>213</td>
2007-11-25 23:32:49 +03:00
<td class="covered">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;$terms&nbsp;=&nbsp;$this-&gt;analyze($data);
</td></tr>
<tr><td>214</td>
2007-11-25 23:32:49 +03:00
<td class="normal">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
</td></tr>
<tr><td>215</td>
2007-11-25 23:32:49 +03:00
<td class="covered">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;foreach&nbsp;($terms&nbsp;as&nbsp;$pos&nbsp;=&gt;&nbsp;$term)&nbsp;{
</td></tr>
<tr><td>216</td>
2007-11-25 23:32:49 +03:00
<td class="covered">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;$index&nbsp;=&nbsp;new&nbsp;$class();
</td></tr>
<tr><td>217</td>
2007-11-25 23:32:49 +03:00
<td class="normal">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
</td></tr>
<tr><td>218</td>
2007-11-25 23:32:49 +03:00
<td class="covered">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;$index-&gt;keyword&nbsp;=&nbsp;$term;
</td></tr>
<tr><td>219</td>
2007-11-25 23:32:49 +03:00
<td class="covered">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;$index-&gt;position&nbsp;=&nbsp;$pos;
</td></tr>
<tr><td>220</td>
2007-11-25 23:32:49 +03:00
<td class="covered">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;$index-&gt;field&nbsp;=&nbsp;$field;
</td></tr>
<tr><td>221</td>
2007-11-25 23:32:49 +03:00
<td class="normal">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
</td></tr>
<tr><td>222</td>
2007-11-25 23:32:49 +03:00
<td class="covered">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;foreach&nbsp;((array)&nbsp;$id&nbsp;as&nbsp;$identifier)&nbsp;{
</td></tr>
<tr><td>223</td>
2007-11-25 23:32:49 +03:00
<td class="covered">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;$index-&gt;$identifier&nbsp;=&nbsp;$row[$identifier];
</td></tr>
<tr><td>224</td>
2007-11-25 23:32:49 +03:00
<td class="covered">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}
</td></tr>
<tr><td>225</td>
2007-11-25 23:32:49 +03:00
<td class="normal">&nbsp;&nbsp;&nbsp;&nbsp;
</td></tr>
<tr><td>226</td>
2007-11-25 23:32:49 +03:00
<td class="covered">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;$index-&gt;save();
</td></tr>
<tr><td>227</td>
2007-11-25 23:32:49 +03:00
<td class="covered">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}
</td></tr>
<tr><td>228</td>
2007-11-25 23:32:49 +03:00
<td class="covered">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}
</td></tr>
<tr><td>229</td>
2007-11-25 23:32:49 +03:00
<td class="covered">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}
</td></tr>
<tr><td>230</td>
2007-11-25 23:32:49 +03:00
<td class="normal">
</td></tr>
<tr><td>231</td>
2007-11-25 23:32:49 +03:00
<td class="covered">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;$conn-&gt;commit();
</td></tr>
<tr><td>232</td>
2007-11-25 23:32:49 +03:00
<td class="covered">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}&nbsp;catch&nbsp;(Doctrine_Exception&nbsp;$e)&nbsp;{
</td></tr>
<tr><td>233</td>
2007-11-25 23:32:49 +03:00
<td class="orange">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;$conn-&gt;rollback();
</td></tr>
<tr><td>234</td>
2007-11-25 23:32:49 +03:00
<td class="normal">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}
</td></tr>
<tr><td>235</td>
2007-11-25 23:32:49 +03:00
<td class="covered">&nbsp;&nbsp;&nbsp;&nbsp;}
</td></tr>
<tr><td>236</td>
<td class="normal">
</td></tr>
<tr><td>237</td>
2007-11-25 23:32:49 +03:00
<td class="normal">&nbsp;&nbsp;&nbsp;&nbsp;/**
</td></tr>
<tr><td>238</td>
2007-11-25 23:32:49 +03:00
<td class="normal">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*&nbsp;buildDefinition&nbsp;
</td></tr>
<tr><td>239</td>
2007-11-25 23:32:49 +03:00
<td class="normal">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*&nbsp;
</td></tr>
<tr><td>240</td>
2007-11-25 23:32:49 +03:00
<td class="normal">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*&nbsp;@return&nbsp;void
</td></tr>
<tr><td>241</td>
2007-11-25 23:32:49 +03:00
<td class="normal">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*/
</td></tr>
<tr><td>242</td>
2007-11-25 23:32:49 +03:00
<td class="normal">&nbsp;&nbsp;&nbsp;&nbsp;public&nbsp;function&nbsp;buildDefinition()
</td></tr>
<tr><td>243</td>
2007-11-25 23:32:49 +03:00
<td class="normal">&nbsp;&nbsp;&nbsp;&nbsp;{
</td></tr>
<tr><td>244</td>
2007-11-25 23:32:49 +03:00
<td class="covered">&nbsp;&nbsp;&nbsp;&nbsp; if&nbsp;($this-&gt;_built)&nbsp;{
</td></tr>
<tr><td>245</td>
2007-11-25 23:32:49 +03:00
<td class="covered">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;return&nbsp;true;
</td></tr>
<tr><td>246</td>
2007-11-25 23:32:49 +03:00
<td class="orange">&nbsp;&nbsp;&nbsp;&nbsp; }
</td></tr>
<tr><td>247</td>
2007-11-25 23:32:49 +03:00
<td class="covered">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;$this-&gt;_built&nbsp;=&nbsp;true;
</td></tr>
<tr><td>248</td>
2007-11-25 23:32:49 +03:00
<td class="normal">
</td></tr>
<tr><td>249</td>
2007-11-25 23:32:49 +03:00
<td class="covered">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;$componentName&nbsp;=&nbsp;$this-&gt;_options['resource']-&gt;getComponentName();
</td></tr>
<tr><td>250</td>
2007-11-25 23:32:49 +03:00
<td class="normal">
</td></tr>
<tr><td>251</td>
2007-11-25 23:32:49 +03:00
<td class="normal">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;//&nbsp;check&nbsp;for&nbsp;placeholders
</td></tr>
<tr><td>252</td>
2007-11-25 23:32:49 +03:00
<td class="covered">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;if&nbsp;(strpos($this-&gt;_options['className'],&nbsp;'%')&nbsp;!==&nbsp;false)&nbsp;{
</td></tr>
<tr><td>253</td>
2007-11-25 23:32:49 +03:00
<td class="covered">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;$this-&gt;_options['className']&nbsp;=&nbsp;str_replace('%CLASS%',&nbsp;$componentName,&nbsp;$this-&gt;_options['className']);
</td></tr>
<tr><td>254</td>
2007-11-25 23:32:49 +03:00
<td class="covered">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}
</td></tr>
<tr><td>255</td>
2007-11-25 23:32:49 +03:00
<td class="normal">
</td></tr>
<tr><td>256</td>
2007-11-25 23:32:49 +03:00
<td class="covered">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;$className&nbsp;=&nbsp;$this-&gt;getOption('className');
</td></tr>
<tr><td>257</td>
<td class="normal">
</td></tr>
<tr><td>258</td>
<td class="covered">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;if&nbsp;(class_exists($className))&nbsp;{
</td></tr>
<tr><td>259</td>
<td class="covered">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;return&nbsp;false;
</td></tr>
<tr><td>260</td>
<td class="orange">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}
</td></tr>
<tr><td>261</td>
<td class="normal">
</td></tr>
<tr><td>262</td>
<td class="covered">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;$columns&nbsp;=&nbsp;array('keyword'&nbsp;&nbsp;=&gt;&nbsp;array('type'&nbsp;&nbsp;&nbsp;&nbsp;=&gt;&nbsp;'string',
</td></tr>
<tr><td>263</td>
<td class="covered">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;'length'&nbsp;&nbsp;=&gt;&nbsp;200,
</td></tr>
<tr><td>264</td>
<td class="covered">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;'primary'&nbsp;=&gt;&nbsp;true,
</td></tr>
<tr><td>265</td>
<td class="covered">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;),
</td></tr>
<tr><td>266</td>
<td class="covered">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;'field'&nbsp;&nbsp;&nbsp;&nbsp;=&gt;&nbsp;array('type'&nbsp;&nbsp;&nbsp;&nbsp;=&gt;&nbsp;'string',
</td></tr>
<tr><td>267</td>
<td class="covered">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;'length'&nbsp;&nbsp;=&gt;&nbsp;50,
</td></tr>
<tr><td>268</td>
<td class="covered">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;'primary'&nbsp;=&gt;&nbsp;true),
</td></tr>
<tr><td>269</td>
<td class="covered">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;'position'&nbsp;=&gt;&nbsp;array('type'&nbsp;&nbsp;&nbsp;&nbsp;=&gt;&nbsp;'integer',
</td></tr>
<tr><td>270</td>
<td class="covered">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;'length'&nbsp;&nbsp;=&gt;&nbsp;8,
</td></tr>
<tr><td>271</td>
<td class="covered">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;'primary'&nbsp;=&gt;&nbsp;true,
</td></tr>
<tr><td>272</td>
<td class="covered">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;));
</td></tr>
<tr><td>273</td>
<td class="normal">
</td></tr>
<tr><td>274</td>
<td class="covered">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;$id&nbsp;=&nbsp;$this-&gt;_options['resource']-&gt;getIdentifier();
</td></tr>
<tr><td>275</td>
<td class="normal">
</td></tr>
<tr><td>276</td>
<td class="covered">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;$options&nbsp;=&nbsp;array('className'&nbsp;=&gt;&nbsp;$className);
</td></tr>
<tr><td>277</td>
<td class="normal">
</td></tr>
<tr><td>278</td>
<td class="covered">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;$fk&nbsp;=&nbsp;$this-&gt;generateForeignKeys($this-&gt;_options['resource']);
</td></tr>
<tr><td>279</td>
<td class="covered">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;$columns&nbsp;+=&nbsp;$fk;
</td></tr>
<tr><td>280</td>
<td class="normal">
</td></tr>
<tr><td>281</td>
<td class="covered">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;$relations&nbsp;=&nbsp;array();
</td></tr>
<tr><td>282</td>
<td class="normal">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;//&nbsp;only&nbsp;generate&nbsp;relations&nbsp;for&nbsp;database&nbsp;based&nbsp;searches
</td></tr>
<tr><td>283</td>
<td class="covered">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;if&nbsp;(&nbsp;!&nbsp;$this&nbsp;instanceof&nbsp;Doctrine_Search_File)&nbsp;{
</td></tr>
<tr><td>284</td>
<td class="covered">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;$relations&nbsp;=&nbsp;$this-&gt;generateRelation($this-&gt;_options['resource'],&nbsp;$fk);
</td></tr>
<tr><td>285</td>
<td class="covered">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}
</td></tr>
<tr><td>286</td>
<td class="normal">
</td></tr>
<tr><td>287</td>
<td class="covered">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;$this-&gt;generateClass($options,&nbsp;$columns,&nbsp;$relations);
</td></tr>
<tr><td>288</td>
<td class="normal">
</td></tr>
<tr><td>289</td>
<td class="covered">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;$this-&gt;_options['pluginTable']&nbsp;=&nbsp;$this-&gt;_options['connection']-&gt;getTable($this-&gt;_options['className']);
</td></tr>
<tr><td>290</td>
<td class="normal">
</td></tr>
<tr><td>291</td>
<td class="covered">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;return&nbsp;true;
</td></tr>
<tr><td>292</td>
<td class="orange">&nbsp;&nbsp;&nbsp;&nbsp;}
</td></tr>
<tr><td>293</td>
<td class="normal">}
</td></tr>
</table></body></html>