2007-10-14 01:45:08 +04:00
|
|
|
<html>
|
|
|
|
<head>
|
|
|
|
<title>Coverage for Doctrine_Table</title>
|
|
|
|
<style type="text/css">
|
|
|
|
.covered{ background: green;}
|
|
|
|
.normal{ background: white;}
|
|
|
|
.red{ background: red;}
|
|
|
|
.orange{ background: #f90;}
|
|
|
|
</style>
|
|
|
|
</head>
|
|
|
|
<body><h1>Coverage for Doctrine_Table</h1><p><a href="index.php">Back to coverage report</a></p><table>
|
|
|
|
<tr><td>1</td>
|
|
|
|
<td class="normal"><?php
|
|
|
|
</td></tr>
|
|
|
|
<tr><td>2</td>
|
|
|
|
<td class="normal">/*
|
|
|
|
</td></tr>
|
|
|
|
<tr><td>3</td>
|
2007-11-02 19:07:11 +03:00
|
|
|
<td class="normal"> * $Id: Table.php 3038 2007-10-30 13:30:50Z romanb $
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>4</td>
|
|
|
|
<td class="normal"> *
|
|
|
|
</td></tr>
|
|
|
|
<tr><td>5</td>
|
|
|
|
<td class="normal"> * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
|
|
|
</td></tr>
|
|
|
|
<tr><td>6</td>
|
|
|
|
<td class="normal"> * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
|
|
|
</td></tr>
|
|
|
|
<tr><td>7</td>
|
|
|
|
<td class="normal"> * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
|
|
|
|
</td></tr>
|
|
|
|
<tr><td>8</td>
|
|
|
|
<td class="normal"> * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
|
|
|
|
</td></tr>
|
|
|
|
<tr><td>9</td>
|
|
|
|
<td class="normal"> * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
|
|
|
</td></tr>
|
|
|
|
<tr><td>10</td>
|
|
|
|
<td class="normal"> * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
|
|
|
|
</td></tr>
|
|
|
|
<tr><td>11</td>
|
|
|
|
<td class="normal"> * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
|
|
|
</td></tr>
|
|
|
|
<tr><td>12</td>
|
|
|
|
<td class="normal"> * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
|
|
|
</td></tr>
|
|
|
|
<tr><td>13</td>
|
|
|
|
<td class="normal"> * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
|
|
|
</td></tr>
|
|
|
|
<tr><td>14</td>
|
|
|
|
<td class="normal"> * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
|
|
|
</td></tr>
|
|
|
|
<tr><td>15</td>
|
|
|
|
<td class="normal"> * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|
|
|
</td></tr>
|
|
|
|
<tr><td>16</td>
|
|
|
|
<td class="normal"> *
|
|
|
|
</td></tr>
|
|
|
|
<tr><td>17</td>
|
|
|
|
<td class="normal"> * This software consists of voluntary contributions made by many individuals
|
|
|
|
</td></tr>
|
|
|
|
<tr><td>18</td>
|
|
|
|
<td class="normal"> * and is licensed under the LGPL. For more information, see
|
|
|
|
</td></tr>
|
|
|
|
<tr><td>19</td>
|
|
|
|
<td class="normal"> * <http://www.phpdoctrine.com>.
|
|
|
|
</td></tr>
|
|
|
|
<tr><td>20</td>
|
|
|
|
<td class="normal"> */
|
|
|
|
</td></tr>
|
|
|
|
<tr><td>21</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="normal">
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>22</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="normal">/**
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>23</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="normal"> * Doctrine_Table represents a database table
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>24</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="normal"> * each Doctrine_Table holds the information of foreignKeys and associations
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>25</td>
|
|
|
|
<td class="normal"> *
|
|
|
|
</td></tr>
|
|
|
|
<tr><td>26</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="normal"> *
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>27</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="normal"> * @author Konsta Vesterinen <kvesteri@cc.hut.fi>
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>28</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="normal"> * @package Doctrine
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>29</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="normal"> * @subpackage Table
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>30</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="normal"> * @license http://www.opensource.org/licenses/lgpl-license.php LGPL
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>31</td>
|
2007-11-02 19:07:11 +03:00
|
|
|
<td class="normal"> * @version $Revision: 3038 $
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>32</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="normal"> * @link www.phpdoctrine.com
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>33</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="normal"> * @since 1.0
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>34</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="normal"> */
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>35</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="normal">class Doctrine_Table extends Doctrine_Configurable implements Countable
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>36</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="normal">{
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>37</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="normal"> /**
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>38</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="normal"> * @var array $data temporary data which is then loaded into Doctrine_Record::$data
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>39</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="normal"> */
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>40</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="normal"> protected $_data = array();
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>41</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="normal">
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>42</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="normal"> /**
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>43</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="normal"> * @var mixed $identifier
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>44</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="normal"> */
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>45</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="normal"> protected $_identifier;
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>46</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="normal">
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>47</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="normal"> /**
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>48</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="normal"> * @see Doctrine_Identifier constants
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>49</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="normal"> * @var integer $identifierType the type of identifier this table uses
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>50</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="normal"> */
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>51</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="normal"> protected $_identifierType;
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>52</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="normal">
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>53</td>
|
|
|
|
<td class="normal"> /**
|
|
|
|
</td></tr>
|
|
|
|
<tr><td>54</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="normal"> * @var Doctrine_Connection $conn Doctrine_Connection object that created this table
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>55</td>
|
|
|
|
<td class="normal"> */
|
|
|
|
</td></tr>
|
|
|
|
<tr><td>56</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="normal"> protected $_conn;
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>57</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="normal">
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>58</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="normal"> /**
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>59</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="normal"> * @var array $identityMap first level cache
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>60</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="normal"> */
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>61</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="normal"> protected $_identityMap = array();
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>62</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="normal">
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>63</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="normal"> /**
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>64</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="normal"> * @var Doctrine_Table_Repository $repository record repository
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>65</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="normal"> */
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>66</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="normal"> protected $_repository;
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>67</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="normal">
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>68</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="normal"> /**
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>69</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="normal"> * @var array $columns an array of column definitions,
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>70</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="normal"> * keys as column names and values as column definitions
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>71</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="normal"> *
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>72</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="normal"> * the definition array has atleast the following values:
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>73</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="normal"> *
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>74</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="normal"> * -- type the column type, eg. 'integer'
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>75</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="normal"> * -- length the column length, eg. 11
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>76</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="normal"> *
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>77</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="normal"> * additional keys:
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>78</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="normal"> * -- notnull whether or not the column is marked as notnull
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>79</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="normal"> * -- values enum values
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>80</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="normal"> * -- notblank notblank validator + notnull constraint
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>81</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="normal"> * ... many more
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>82</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="normal"> */
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>83</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="normal"> protected $_columns = array();
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>84</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="normal">
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>85</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="normal"> /**
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>86</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="normal"> * @var array $columnAliases an array of column aliases
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>87</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="normal"> * keys as column aliases and values as column names
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>88</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="normal"> */
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>89</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="normal"> protected $_columnAliases = array();
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>90</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="normal">
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>91</td>
|
|
|
|
<td class="normal"> /**
|
|
|
|
</td></tr>
|
|
|
|
<tr><td>92</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="normal"> * @var integer $columnCount cached column count, Doctrine_Record uses this column count in when
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>93</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="normal"> * determining its state
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>94</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="normal"> */
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>95</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="normal"> protected $columnCount;
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>96</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="normal">
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>97</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="normal"> /**
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>98</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="normal"> * @var boolean $hasDefaultValues whether or not this table has default values
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>99</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="normal"> */
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>100</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="normal"> protected $hasDefaultValues;
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>101</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="normal">
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>102</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="normal"> /**
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>103</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="normal"> * @var array $options an array containing all options
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>104</td>
|
|
|
|
<td class="normal"> *
|
|
|
|
</td></tr>
|
|
|
|
<tr><td>105</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="normal"> * -- name name of the component, for example component name of the GroupTable is 'Group'
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>106</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="normal"> *
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>107</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="normal"> * -- parents the parent classes of this component
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>108</td>
|
|
|
|
<td class="normal"> *
|
|
|
|
</td></tr>
|
|
|
|
<tr><td>109</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="normal"> * -- declaringClass name of the table definition declaring class (when using inheritance the class
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>110</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="normal"> * that defines the table structure can be any class in the inheritance hierarchy,
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>111</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="normal"> * hence we need reflection to check out which class actually calls setTableDefinition)
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>112</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="normal"> *
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>113</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="normal"> * -- tableName database table name, in most cases this is the same as component name but in some cases
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>114</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="normal"> * where one-table-multi-class inheritance is used this will be the name of the inherited table
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>115</td>
|
|
|
|
<td class="normal"> *
|
|
|
|
</td></tr>
|
|
|
|
<tr><td>116</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="normal"> * -- sequenceName Some databases need sequences instead of auto incrementation primary keys,
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>117</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="normal"> * you can set specific sequence for your table by calling setOption('sequenceName', $seqName)
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>118</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="normal"> * where $seqName is the name of the desired sequence
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>119</td>
|
|
|
|
<td class="normal"> *
|
|
|
|
</td></tr>
|
|
|
|
<tr><td>120</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="normal"> * -- enumMap enum value arrays
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>121</td>
|
|
|
|
<td class="normal"> *
|
|
|
|
</td></tr>
|
|
|
|
<tr><td>122</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="normal"> * -- inheritanceMap inheritanceMap is used for inheritance mapping, keys representing columns and values
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>123</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="normal"> * the column values that should correspond to child classes
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>124</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="normal"> *
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>125</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="normal"> * -- type table type (mysql example: INNODB)
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>126</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="normal"> *
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>127</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="normal"> * -- charset character set
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>128</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="normal"> *
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>129</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="normal"> * -- foreignKeys the foreign keys of this table
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>130</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="normal"> *
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>131</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="normal"> * -- checks the check constraints of this table, eg. 'price > dicounted_price'
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>132</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="normal"> *
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>133</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="normal"> * -- collation collation attribute
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>134</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="normal"> *
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>135</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="normal"> * -- indexes the index definitions of this table
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>136</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="normal"> *
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>137</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="normal"> * -- treeImpl the tree implementation of this table (if any)
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>138</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="normal"> *
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>139</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="normal"> * -- treeOptions the tree options
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>140</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="normal"> *
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>141</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="normal"> * -- queryParts the bound query parts
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>142</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="normal"> *
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>143</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="normal"> * -- versioning
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>144</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="normal"> */
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>145</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="normal"> protected $_options = array('name' => null,
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>146</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="normal"> 'tableName' => null,
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>147</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="normal"> 'sequenceName' => null,
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>148</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="normal"> 'inheritanceMap' => array(),
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>149</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="normal"> 'enumMap' => array(),
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>150</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="normal"> 'type' => null,
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>151</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="normal"> 'charset' => null,
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>152</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="normal"> 'collation' => null,
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>153</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="normal"> 'treeImpl' => null,
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>154</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="normal"> 'treeOptions' => null,
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>155</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="normal"> 'indexes' => array(),
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>156</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="normal"> 'parents' => array(),
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>157</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="normal"> 'queryParts' => array(),
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>158</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="normal"> 'versioning' => null,
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>159</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="normal"> );
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>160</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="normal">
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>161</td>
|
|
|
|
<td class="normal"> /**
|
|
|
|
</td></tr>
|
|
|
|
<tr><td>162</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="normal"> * @var Doctrine_Tree $tree tree object associated with this table
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>163</td>
|
|
|
|
<td class="normal"> */
|
|
|
|
</td></tr>
|
|
|
|
<tr><td>164</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="normal"> protected $_tree;
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>165</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="normal">
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>166</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="normal"> /**
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>167</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="normal"> * @var Doctrine_Relation_Parser $_parser relation parser object
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>168</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="normal"> */
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>169</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="normal"> protected $_parser;
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>170</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="normal">
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>171</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="normal"> /**
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>172</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="normal"> * @var array $_templates an array containing all templates attached to this table
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>173</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="normal"> */
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>174</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="normal"> protected $_templates = array();
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>175</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="normal">
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>176</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="normal"> /**
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>177</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="normal"> * @var array $_filters an array containing all record filters attached to this table
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>178</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="normal"> */
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>179</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="normal"> protected $_filters = array();
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>180</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="normal">
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>181</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="normal"> /**
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>182</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="normal"> * @var array $_invokedMethods method invoker cache
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>183</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="normal"> */
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>184</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="normal"> protected $_invokedMethods = array();
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>185</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="normal">
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>186</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="normal">
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>187</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="normal">
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>188</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="normal"> /**
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>189</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="normal"> * the constructor
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>190</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="normal"> *
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>191</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="normal"> * @throws Doctrine_Connection_Exception if there are no opened connections
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>192</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="normal"> * @param string $name the name of the component
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>193</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="normal"> * @param Doctrine_Connection $conn the connection associated with this table
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>194</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="normal"> */
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>195</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="normal"> public function __construct($name, Doctrine_Connection $conn, $initDefinition = false)
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>196</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="normal"> {
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>197</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="covered"> $this->_conn = $conn;
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>198</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="normal">
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>199</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="covered"> $this->setParent($this->_conn);
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>200</td>
|
|
|
|
<td class="normal">
|
|
|
|
</td></tr>
|
|
|
|
<tr><td>201</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="covered"> $this->_options['name'] = $name;
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>202</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="covered"> $this->_parser = new Doctrine_Relation_Parser($this);
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>203</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="normal">
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>204</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="covered"> if ($initDefinition) {
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>205</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="covered"> $record = $this->initDefinition($name);
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>206</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="normal">
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>207</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="covered"> $this->initIdentifier();
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>208</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="normal">
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>209</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="covered"> $record->setUp();
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>210</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="normal">
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>211</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="normal"> // if tree, set up tree
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>212</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="covered"> if ($this->isTree()) {
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>213</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="covered"> $this->getTree()->setUp();
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>214</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="covered"> }
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>215</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="covered"> }
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>216</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="covered"> $this->_filters[] = new Doctrine_Record_Filter_Standard();
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>217</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="covered"> $this->_repository = new Doctrine_Table_Repository($this);
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>218</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="covered"> }
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>219</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="normal"> public function initDefinition($name)
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>220</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="normal"> {
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>221</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="covered"> if ( ! class_exists($name) || empty($name)) {
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>222</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="covered"> throw new Doctrine_Exception("Couldn't find class " . $name);
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>223</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="orange"> }
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>224</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="covered"> $record = new $name($this);
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>225</td>
|
|
|
|
<td class="normal">
|
|
|
|
</td></tr>
|
|
|
|
<tr><td>226</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="covered"> $names = array();
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>227</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="normal">
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>228</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="covered"> $class = $name;
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>229</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="normal">
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>230</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="normal"> // get parent classes
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>231</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="normal">
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>232</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="normal"> do {
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>233</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="covered"> if ($class === 'Doctrine_Record') {
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>234</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="covered"> break;
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>235</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="orange"> }
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>236</td>
|
|
|
|
<td class="normal">
|
|
|
|
</td></tr>
|
|
|
|
<tr><td>237</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="covered"> $name = $class;
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>238</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="covered"> $names[] = $name;
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>239</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="covered"> } while ($class = get_parent_class($class));
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>240</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="normal">
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>241</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="covered"> if ($class === false) {
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>242</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="red"> throw new Doctrine_Table_Exception('Unknown component.');
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>243</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="orange"> }
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>244</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="normal">
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>245</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="normal"> // reverse names
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>246</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="covered"> $names = array_reverse($names);
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>247</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="normal"> // save parents
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>248</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="covered"> array_pop($names);
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>249</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="covered"> $this->_options['parents'] = $names;
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>250</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="normal">
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>251</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="normal"> // create database table
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>252</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="covered"> if (method_exists($record, 'setTableDefinition')) {
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>253</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="covered"> $record->setTableDefinition();
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>254</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="normal"> // get the declaring class of setTableDefinition method
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>255</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="covered"> $method = new ReflectionMethod($this->_options['name'], 'setTableDefinition');
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>256</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="covered"> $class = $method->getDeclaringClass();
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>257</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="covered"> } else {
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>258</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="covered"> $class = new ReflectionClass($class);
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>259</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="normal"> }
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>260</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="covered"> $this->_options['declaringClass'] = $class;
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>261</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="normal">
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>262</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="normal"> // set the table definition for the given tree implementation
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>263</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="covered"> if ($this->isTree()) {
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>264</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="covered"> $this->getTree()->setTableDefinition();
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>265</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="covered"> }
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>266</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="normal">
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>267</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="covered"> $this->columnCount = count($this->_columns);
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>268</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="normal">
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>269</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="covered"> if ( ! isset($this->_options['tableName'])) {
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>270</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="covered"> $this->_options['tableName'] = Doctrine::tableize($class->getName());
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>271</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="covered"> }
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>272</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="normal">
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>273</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="covered"> return $record;
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>274</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="orange"> }
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>275</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="normal"> public function initIdentifier()
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>276</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="normal"> {
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>277</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="covered"> switch (count($this->_identifier)) {
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>278</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="covered"> case 0:
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>279</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="covered"> $this->_columns = array_merge(array('id' =>
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>280</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="covered"> array('type' => 'integer',
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>281</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="covered"> 'length' => 20,
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>282</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="covered"> 'autoincrement' => true,
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>283</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="covered"> 'primary' => true)), $this->_columns);
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>284</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="covered"> $this->_identifier = 'id';
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>285</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="covered"> $this->_identifierType = Doctrine::IDENTIFIER_AUTOINC;
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>286</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="covered"> $this->columnCount++;
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>287</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="covered"> break;
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>288</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="covered"> case 1:
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>289</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="covered"> foreach ($this->_identifier as $pk) {
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>290</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="covered"> $e = $this->_columns[$pk];
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>291</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="normal">
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>292</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="covered"> $found = false;
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>293</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="normal">
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>294</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="covered"> foreach ($e as $option => $value) {
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>295</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="covered"> if ($found) {
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>296</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="covered"> break;
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>297</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="orange"> }
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>298</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="normal">
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>299</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="covered"> $e2 = explode(':', $option);
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>300</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="normal">
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>301</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="covered"> switch (strtolower($e2[0])) {
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>302</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="covered"> case 'autoincrement':
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>303</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="covered"> case 'autoinc':
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>304</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="covered"> $this->_identifierType = Doctrine::IDENTIFIER_AUTOINC;
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>305</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="covered"> $found = true;
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>306</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="covered"> break;
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>307</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="covered"> case 'seq':
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>308</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="covered"> case 'sequence':
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>309</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="covered"> $this->_identifierType = Doctrine::IDENTIFIER_SEQUENCE;
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>310</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="covered"> $found = true;
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>311</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="normal">
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>312</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="covered"> if ($value) {
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>313</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="covered"> $this->_options['sequenceName'] = $value;
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>314</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="covered"> } else {
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>315</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="red"> if (($sequence = $this->getAttribute(Doctrine::ATTR_DEFAULT_SEQUENCE)) !== null) {
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>316</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="red"> $this->_options['sequenceName'] = $sequence;
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>317</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="red"> } else {
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>318</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="red"> $this->_options['sequenceName'] = $this->_conn->getSequenceName($this->_options['tableName']);
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>319</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="normal"> }
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>320</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="normal"> }
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>321</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="covered"> break;
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>322</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="red"> }
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>323</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="covered"> }
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>324</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="covered"> if ( ! isset($this->_identifierType)) {
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>325</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="covered"> $this->_identifierType = Doctrine::IDENTIFIER_NATURAL;
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>326</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="covered"> }
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>327</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="covered"> }
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>328</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="normal">
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>329</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="covered"> $this->_identifier = $pk;
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>330</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="normal">
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>331</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="covered"> break;
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>332</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="covered"> default:
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>333</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="covered"> $this->_identifierType = Doctrine::IDENTIFIER_COMPOSITE;
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>334</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="covered"> }
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>335</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="covered"> }
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>336</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="normal">
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>337</td>
|
2007-10-24 00:21:22 +04:00
|
|
|
<td class="normal"> public function isIdentifier($identifier)
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>338</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="normal"> {
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>339</td>
|
2007-10-24 00:21:22 +04:00
|
|
|
<td class="covered"> return ($identifier === $this->_identifier ||
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>340</td>
|
2007-10-24 00:21:22 +04:00
|
|
|
<td class="covered"> in_array($identifier, (array) $this->_identifier));
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>341</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="orange"> }
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>342</td>
|
2007-10-24 00:21:22 +04:00
|
|
|
<td class="normal">
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>343</td>
|
2007-10-24 00:21:22 +04:00
|
|
|
<td class="normal"> public function getMethodOwner($method)
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>344</td>
|
|
|
|
<td class="normal"> {
|
|
|
|
</td></tr>
|
|
|
|
<tr><td>345</td>
|
2007-10-24 00:21:22 +04:00
|
|
|
<td class="covered"> return (isset($this->_invokedMethods[$method])) ?
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>346</td>
|
2007-10-24 00:21:22 +04:00
|
|
|
<td class="covered"> $this->_invokedMethods[$method] : false;
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>347</td>
|
2007-10-24 00:21:22 +04:00
|
|
|
<td class="orange"> }
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>348</td>
|
2007-10-24 00:21:22 +04:00
|
|
|
<td class="normal">
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>349</td>
|
2007-10-24 00:21:22 +04:00
|
|
|
<td class="normal"> public function setMethodOwner($method, $class)
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>350</td>
|
2007-10-24 00:21:22 +04:00
|
|
|
<td class="normal"> {
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>351</td>
|
2007-10-24 00:21:22 +04:00
|
|
|
<td class="covered"> $this->_invokedMethods[$method] = $class;
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>352</td>
|
2007-10-24 00:21:22 +04:00
|
|
|
<td class="covered"> }
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>353</td>
|
2007-10-24 00:21:22 +04:00
|
|
|
<td class="normal">
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>354</td>
|
2007-10-24 00:21:22 +04:00
|
|
|
<td class="normal"> /**
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>355</td>
|
2007-10-24 00:21:22 +04:00
|
|
|
<td class="normal"> * getTemplates
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>356</td>
|
2007-10-24 00:21:22 +04:00
|
|
|
<td class="normal"> * returns all templates attached to this table
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>357</td>
|
2007-10-24 00:21:22 +04:00
|
|
|
<td class="normal"> *
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>358</td>
|
2007-10-24 00:21:22 +04:00
|
|
|
<td class="normal"> * @return array an array containing all templates
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>359</td>
|
2007-10-24 00:21:22 +04:00
|
|
|
<td class="normal"> */
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>360</td>
|
2007-10-24 00:21:22 +04:00
|
|
|
<td class="normal"> public function getTemplates()
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>361</td>
|
2007-10-24 00:21:22 +04:00
|
|
|
<td class="normal"> {
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>362</td>
|
2007-10-24 00:21:22 +04:00
|
|
|
<td class="covered"> return $this->_templates;
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>363</td>
|
2007-10-24 00:21:22 +04:00
|
|
|
<td class="orange"> }
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>364</td>
|
2007-10-24 00:21:22 +04:00
|
|
|
<td class="normal">
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>365</td>
|
2007-10-24 00:21:22 +04:00
|
|
|
<td class="normal"> /**
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>366</td>
|
2007-10-24 00:21:22 +04:00
|
|
|
<td class="normal"> * export
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>367</td>
|
2007-10-24 00:21:22 +04:00
|
|
|
<td class="normal"> * exports this table to database based on column and option definitions
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>368</td>
|
2007-10-24 00:21:22 +04:00
|
|
|
<td class="normal"> *
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>369</td>
|
2007-10-24 00:21:22 +04:00
|
|
|
<td class="normal"> * @throws Doctrine_Connection_Exception if some error other than Doctrine::ERR_ALREADY_EXISTS
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>370</td>
|
2007-10-24 00:21:22 +04:00
|
|
|
<td class="normal"> * occurred during the create table operation
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>371</td>
|
2007-10-24 00:21:22 +04:00
|
|
|
<td class="normal"> * @return boolean whether or not the export operation was successful
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>372</td>
|
2007-10-24 00:21:22 +04:00
|
|
|
<td class="normal"> * false if table already existed in the database
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>373</td>
|
2007-10-24 00:21:22 +04:00
|
|
|
<td class="normal"> */
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>374</td>
|
2007-10-24 00:21:22 +04:00
|
|
|
<td class="normal"> public function export()
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>375</td>
|
2007-10-24 00:21:22 +04:00
|
|
|
<td class="normal"> {
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>376</td>
|
2007-10-24 00:21:22 +04:00
|
|
|
<td class="red"> $this->_conn->export->exportTable($this);
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>377</td>
|
2007-10-24 00:21:22 +04:00
|
|
|
<td class="red"> }
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>378</td>
|
2007-10-24 00:21:22 +04:00
|
|
|
<td class="normal">
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>379</td>
|
2007-10-24 00:21:22 +04:00
|
|
|
<td class="normal"> /**
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>380</td>
|
2007-10-24 00:21:22 +04:00
|
|
|
<td class="normal"> * getExportableFormat
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>381</td>
|
2007-10-24 00:21:22 +04:00
|
|
|
<td class="normal"> * returns exportable presentation of this object
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>382</td>
|
2007-10-24 00:21:22 +04:00
|
|
|
<td class="normal"> *
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>383</td>
|
2007-10-24 00:21:22 +04:00
|
|
|
<td class="normal"> * @return array
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>384</td>
|
2007-10-24 00:21:22 +04:00
|
|
|
<td class="normal"> */
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>385</td>
|
2007-10-24 00:21:22 +04:00
|
|
|
<td class="normal"> public function getExportableFormat($parseForeignKeys = true)
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>386</td>
|
2007-10-24 00:21:22 +04:00
|
|
|
<td class="normal"> {
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>387</td>
|
2007-10-24 00:21:22 +04:00
|
|
|
<td class="covered"> $columns = array();
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>388</td>
|
2007-10-24 00:21:22 +04:00
|
|
|
<td class="covered"> $primary = array();
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>389</td>
|
2007-10-24 00:21:22 +04:00
|
|
|
<td class="normal">
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>390</td>
|
2007-10-24 00:21:22 +04:00
|
|
|
<td class="covered"> foreach ($this->getColumns() as $name => $column) {
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>391</td>
|
2007-10-24 00:21:22 +04:00
|
|
|
<td class="covered"> $definition = $column;
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>392</td>
|
2007-10-24 00:21:22 +04:00
|
|
|
<td class="normal">
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>393</td>
|
2007-10-24 00:21:22 +04:00
|
|
|
<td class="covered"> switch ($definition['type']) {
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>394</td>
|
2007-10-24 00:21:22 +04:00
|
|
|
<td class="covered"> case 'enum':
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>395</td>
|
2007-10-24 00:21:22 +04:00
|
|
|
<td class="covered"> if (isset($definition['default'])) {
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>396</td>
|
2007-10-24 00:21:22 +04:00
|
|
|
<td class="covered"> $definition['default'] = $this->enumIndex($name, $definition['default']);
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>397</td>
|
2007-10-24 00:21:22 +04:00
|
|
|
<td class="covered"> }
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>398</td>
|
2007-10-24 00:21:22 +04:00
|
|
|
<td class="covered"> break;
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>399</td>
|
2007-10-24 00:21:22 +04:00
|
|
|
<td class="covered"> case 'boolean':
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>400</td>
|
2007-10-24 00:21:22 +04:00
|
|
|
<td class="covered"> if (isset($definition['default'])) {
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>401</td>
|
2007-10-24 00:21:22 +04:00
|
|
|
<td class="covered"> $definition['default'] = $this->getConnection()->convertBooleans($definition['default']);
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>402</td>
|
2007-10-24 00:21:22 +04:00
|
|
|
<td class="covered"> }
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>403</td>
|
2007-10-24 00:21:22 +04:00
|
|
|
<td class="covered"> break;
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>404</td>
|
2007-10-24 00:21:22 +04:00
|
|
|
<td class="red"> }
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>405</td>
|
2007-10-24 00:21:22 +04:00
|
|
|
<td class="covered"> $columns[$name] = $definition;
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>406</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="normal">
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>407</td>
|
2007-10-24 00:21:22 +04:00
|
|
|
<td class="covered"> if (isset($definition['primary']) && $definition['primary']) {
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>408</td>
|
2007-10-24 00:21:22 +04:00
|
|
|
<td class="covered"> $primary[] = $name;
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>409</td>
|
2007-10-24 00:21:22 +04:00
|
|
|
<td class="covered"> }
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>410</td>
|
2007-10-24 00:21:22 +04:00
|
|
|
<td class="covered"> }
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>411</td>
|
2007-10-24 00:21:22 +04:00
|
|
|
<td class="covered"> $options['foreignKeys'] = array();
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>412</td>
|
2007-10-24 00:21:22 +04:00
|
|
|
<td class="normal">
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>413</td>
|
2007-10-24 00:21:22 +04:00
|
|
|
<td class="covered"> if ($parseForeignKeys) {
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>414</td>
|
2007-10-24 00:21:22 +04:00
|
|
|
<td class="covered"> if ($this->getAttribute(Doctrine::ATTR_EXPORT) & Doctrine::EXPORT_CONSTRAINTS) {
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>415</td>
|
2007-10-24 00:21:22 +04:00
|
|
|
<td class="normal">
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>416</td>
|
2007-10-24 00:21:22 +04:00
|
|
|
<td class="covered"> $constraints = array();
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>417</td>
|
2007-10-24 00:21:22 +04:00
|
|
|
<td class="normal">
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>418</td>
|
2007-10-24 00:21:22 +04:00
|
|
|
<td class="covered"> $emptyIntegrity = array('onUpdate' => null,
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>419</td>
|
2007-10-24 00:21:22 +04:00
|
|
|
<td class="covered"> 'onDelete' => null);
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>420</td>
|
2007-10-24 00:21:22 +04:00
|
|
|
<td class="normal">
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>421</td>
|
2007-10-24 00:21:22 +04:00
|
|
|
<td class="covered"> foreach ($this->getRelations() as $name => $relation) {
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>422</td>
|
2007-10-24 00:21:22 +04:00
|
|
|
<td class="covered"> $fk = $relation->toArray();
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>423</td>
|
2007-10-24 00:21:22 +04:00
|
|
|
<td class="covered"> $fk['foreignTable'] = $relation->getTable()->getTableName();
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>424</td>
|
2007-10-24 00:21:22 +04:00
|
|
|
<td class="normal">
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>425</td>
|
2007-10-24 00:21:22 +04:00
|
|
|
<td class="covered"> if ($relation->getTable() === $this && in_array($relation->getLocal(), $primary)) {
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>426</td>
|
2007-10-24 00:21:22 +04:00
|
|
|
<td class="covered"> if ($relation->hasConstraint()) {
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>427</td>
|
2007-10-24 00:21:22 +04:00
|
|
|
<td class="red"> throw new Doctrine_Table_Exception("Badly constructed integrity constraints.");
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>428</td>
|
2007-10-24 00:21:22 +04:00
|
|
|
<td class="orange"> }
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>429</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="normal">
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>430</td>
|
2007-10-24 00:21:22 +04:00
|
|
|
<td class="covered"> continue;
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>431</td>
|
2007-10-24 00:21:22 +04:00
|
|
|
<td class="orange"> }
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>432</td>
|
2007-10-24 00:21:22 +04:00
|
|
|
<td class="normal">
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>433</td>
|
2007-10-24 00:21:22 +04:00
|
|
|
<td class="covered"> $integrity = array('onUpdate' => $fk['onUpdate'],
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>434</td>
|
2007-10-24 00:21:22 +04:00
|
|
|
<td class="covered"> 'onDelete' => $fk['onDelete']);
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>435</td>
|
2007-10-24 00:21:22 +04:00
|
|
|
<td class="normal">
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>436</td>
|
2007-10-24 00:21:22 +04:00
|
|
|
<td class="covered"> if ($relation instanceof Doctrine_Relation_LocalKey) {
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>437</td>
|
2007-10-24 00:21:22 +04:00
|
|
|
<td class="covered"> $def = array('local' => $relation->getLocal(),
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>438</td>
|
2007-10-24 00:21:22 +04:00
|
|
|
<td class="covered"> 'foreign' => $relation->getForeign(),
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>439</td>
|
2007-10-24 00:21:22 +04:00
|
|
|
<td class="covered"> 'foreignTable' => $relation->getTable()->getTableName());
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>440</td>
|
2007-10-24 00:21:22 +04:00
|
|
|
<td class="normal">
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>441</td>
|
2007-10-24 00:21:22 +04:00
|
|
|
<td class="covered"> if (($key = array_search($def, $options['foreignKeys'])) === false) {
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>442</td>
|
2007-10-24 00:21:22 +04:00
|
|
|
<td class="covered"> $options['foreignKeys'][] = $def;
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>443</td>
|
2007-10-24 00:21:22 +04:00
|
|
|
<td class="normal">
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>444</td>
|
2007-10-24 00:21:22 +04:00
|
|
|
<td class="covered"> $constraints[] = $integrity;
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>445</td>
|
2007-10-24 00:21:22 +04:00
|
|
|
<td class="covered"> } else {
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>446</td>
|
2007-10-24 00:21:22 +04:00
|
|
|
<td class="covered"> if ($integrity !== $emptyIntegrity) {
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>447</td>
|
2007-10-24 00:21:22 +04:00
|
|
|
<td class="covered"> $constraints[$key] = $integrity;
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>448</td>
|
2007-10-24 00:21:22 +04:00
|
|
|
<td class="covered"> }
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>449</td>
|
2007-10-24 00:21:22 +04:00
|
|
|
<td class="normal"> }
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>450</td>
|
2007-10-24 00:21:22 +04:00
|
|
|
<td class="covered"> }
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>451</td>
|
2007-10-24 00:21:22 +04:00
|
|
|
<td class="covered"> }
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>452</td>
|
2007-10-24 00:21:22 +04:00
|
|
|
<td class="normal">
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>453</td>
|
2007-10-24 00:21:22 +04:00
|
|
|
<td class="covered"> foreach ($constraints as $k => $def) {
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>454</td>
|
2007-10-24 00:21:22 +04:00
|
|
|
<td class="covered"> $options['foreignKeys'][$k] = array_merge($options['foreignKeys'][$k], $def);
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>455</td>
|
2007-10-24 00:21:22 +04:00
|
|
|
<td class="covered"> }
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>456</td>
|
2007-10-24 00:21:22 +04:00
|
|
|
<td class="normal">
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>457</td>
|
2007-10-24 00:21:22 +04:00
|
|
|
<td class="covered"> }
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>458</td>
|
2007-10-24 00:21:22 +04:00
|
|
|
<td class="covered"> }
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>459</td>
|
2007-10-24 00:21:22 +04:00
|
|
|
<td class="covered"> $options['primary'] = $primary;
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>460</td>
|
2007-10-24 00:21:22 +04:00
|
|
|
<td class="normal">
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>461</td>
|
2007-10-24 00:21:22 +04:00
|
|
|
<td class="covered"> return array('tableName' => $this->getOption('tableName'),
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>462</td>
|
2007-10-24 00:21:22 +04:00
|
|
|
<td class="covered"> 'columns' => $columns,
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>463</td>
|
2007-10-24 00:21:22 +04:00
|
|
|
<td class="covered"> 'options' => array_merge($this->getOptions(), $options));
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>464</td>
|
2007-10-24 00:21:22 +04:00
|
|
|
<td class="orange"> }
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>465</td>
|
2007-10-24 00:21:22 +04:00
|
|
|
<td class="normal">
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>466</td>
|
2007-10-24 00:21:22 +04:00
|
|
|
<td class="normal"> /**
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>467</td>
|
2007-10-24 00:21:22 +04:00
|
|
|
<td class="normal"> * exportConstraints
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>468</td>
|
2007-10-24 00:21:22 +04:00
|
|
|
<td class="normal"> * exports the constraints of this table into database based on option definitions
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>469</td>
|
2007-10-24 00:21:22 +04:00
|
|
|
<td class="normal"> *
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>470</td>
|
2007-10-24 00:21:22 +04:00
|
|
|
<td class="normal"> * @throws Doctrine_Connection_Exception if something went wrong on db level
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>471</td>
|
2007-10-24 00:21:22 +04:00
|
|
|
<td class="normal"> * @return void
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>472</td>
|
2007-10-24 00:21:22 +04:00
|
|
|
<td class="normal"> */
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>473</td>
|
2007-10-24 00:21:22 +04:00
|
|
|
<td class="normal"> public function exportConstraints()
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>474</td>
|
2007-10-24 00:21:22 +04:00
|
|
|
<td class="normal"> {
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>475</td>
|
2007-10-24 00:21:22 +04:00
|
|
|
<td class="normal"> try {
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>476</td>
|
2007-10-24 00:21:22 +04:00
|
|
|
<td class="red"> $this->_conn->beginTransaction();
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>477</td>
|
2007-10-24 00:21:22 +04:00
|
|
|
<td class="normal">
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>478</td>
|
2007-10-24 00:21:22 +04:00
|
|
|
<td class="red"> foreach ($this->_options['index'] as $index => $definition) {
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>479</td>
|
2007-10-24 00:21:22 +04:00
|
|
|
<td class="red"> $this->_conn->export->createIndex($this->_options['tableName'], $index, $definition);
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>480</td>
|
2007-10-24 00:21:22 +04:00
|
|
|
<td class="red"> }
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>481</td>
|
2007-10-24 00:21:22 +04:00
|
|
|
<td class="red"> $this->_conn->commit();
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>482</td>
|
2007-10-24 00:21:22 +04:00
|
|
|
<td class="red"> } catch(Doctrine_Connection_Exception $e) {
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>483</td>
|
2007-10-24 00:21:22 +04:00
|
|
|
<td class="orange"> $this->_conn->rollback();
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>484</td>
|
2007-10-24 00:21:22 +04:00
|
|
|
<td class="normal">
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>485</td>
|
2007-10-24 00:21:22 +04:00
|
|
|
<td class="orange"> throw $e;
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>486</td>
|
2007-10-24 00:21:22 +04:00
|
|
|
<td class="normal"> }
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>487</td>
|
2007-10-24 00:21:22 +04:00
|
|
|
<td class="red"> }
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>488</td>
|
2007-10-24 00:21:22 +04:00
|
|
|
<td class="normal">
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>489</td>
|
2007-10-24 00:21:22 +04:00
|
|
|
<td class="normal"> /**
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>490</td>
|
2007-10-24 00:21:22 +04:00
|
|
|
<td class="normal"> * getRelationParser
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>491</td>
|
2007-10-24 00:21:22 +04:00
|
|
|
<td class="normal"> * return the relation parser associated with this table
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>492</td>
|
2007-10-24 00:21:22 +04:00
|
|
|
<td class="normal"> *
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>493</td>
|
2007-10-24 00:21:22 +04:00
|
|
|
<td class="normal"> * @return Doctrine_Relation_Parser relation parser object
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>494</td>
|
2007-10-24 00:21:22 +04:00
|
|
|
<td class="normal"> */
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>495</td>
|
2007-10-24 00:21:22 +04:00
|
|
|
<td class="normal"> public function getRelationParser()
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>496</td>
|
2007-10-24 00:21:22 +04:00
|
|
|
<td class="normal"> {
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>497</td>
|
2007-10-24 00:21:22 +04:00
|
|
|
<td class="covered"> return $this->_parser;
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>498</td>
|
2007-10-24 00:21:22 +04:00
|
|
|
<td class="orange"> }
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>499</td>
|
2007-10-24 00:21:22 +04:00
|
|
|
<td class="normal">
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>500</td>
|
2007-10-24 00:21:22 +04:00
|
|
|
<td class="normal"> /**
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>501</td>
|
2007-10-24 00:21:22 +04:00
|
|
|
<td class="normal"> * __get
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>502</td>
|
2007-10-24 00:21:22 +04:00
|
|
|
<td class="normal"> * an alias for getOption
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>503</td>
|
2007-10-24 00:21:22 +04:00
|
|
|
<td class="normal"> *
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>504</td>
|
2007-10-24 00:21:22 +04:00
|
|
|
<td class="normal"> * @param string $option
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>505</td>
|
2007-10-24 00:21:22 +04:00
|
|
|
<td class="normal"> */
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>506</td>
|
2007-10-24 00:21:22 +04:00
|
|
|
<td class="normal"> public function __get($option)
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>507</td>
|
2007-10-24 00:21:22 +04:00
|
|
|
<td class="normal"> {
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>508</td>
|
2007-10-24 00:21:22 +04:00
|
|
|
<td class="covered"> if (isset($this->_options[$option])) {
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>509</td>
|
2007-10-24 00:21:22 +04:00
|
|
|
<td class="covered"> return $this->_options[$option];
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>510</td>
|
2007-10-24 00:21:22 +04:00
|
|
|
<td class="orange"> }
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>511</td>
|
2007-10-24 00:21:22 +04:00
|
|
|
<td class="covered"> return null;
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>512</td>
|
2007-10-24 00:21:22 +04:00
|
|
|
<td class="orange"> }
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>513</td>
|
2007-10-24 00:21:22 +04:00
|
|
|
<td class="normal">
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>514</td>
|
2007-10-24 00:21:22 +04:00
|
|
|
<td class="normal"> /**
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>515</td>
|
2007-10-24 00:21:22 +04:00
|
|
|
<td class="normal"> * __isset
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>516</td>
|
2007-10-24 00:21:22 +04:00
|
|
|
<td class="normal"> *
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>517</td>
|
2007-10-24 00:21:22 +04:00
|
|
|
<td class="normal"> * @param string $option
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>518</td>
|
2007-10-24 00:21:22 +04:00
|
|
|
<td class="normal"> */
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>519</td>
|
2007-10-24 00:21:22 +04:00
|
|
|
<td class="normal"> public function __isset($option)
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>520</td>
|
2007-10-24 00:21:22 +04:00
|
|
|
<td class="normal"> {
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>521</td>
|
2007-10-24 00:21:22 +04:00
|
|
|
<td class="red"> return isset($this->_options[$option]);
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>522</td>
|
2007-10-24 00:21:22 +04:00
|
|
|
<td class="orange"> }
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>523</td>
|
2007-10-24 00:21:22 +04:00
|
|
|
<td class="normal">
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>524</td>
|
2007-10-24 00:21:22 +04:00
|
|
|
<td class="normal"> /**
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>525</td>
|
2007-10-24 00:21:22 +04:00
|
|
|
<td class="normal"> * getOptions
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>526</td>
|
2007-10-24 00:21:22 +04:00
|
|
|
<td class="normal"> * returns all options of this table and the associated values
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>527</td>
|
2007-10-24 00:21:22 +04:00
|
|
|
<td class="normal"> *
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>528</td>
|
2007-10-24 00:21:22 +04:00
|
|
|
<td class="normal"> * @return array all options and their values
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>529</td>
|
2007-10-24 00:21:22 +04:00
|
|
|
<td class="normal"> */
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>530</td>
|
2007-10-24 00:21:22 +04:00
|
|
|
<td class="normal"> public function getOptions()
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>531</td>
|
2007-10-24 00:21:22 +04:00
|
|
|
<td class="normal"> {
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>532</td>
|
2007-10-24 00:21:22 +04:00
|
|
|
<td class="covered"> return $this->_options;
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>533</td>
|
2007-10-24 00:21:22 +04:00
|
|
|
<td class="orange"> }
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>534</td>
|
2007-10-24 00:21:22 +04:00
|
|
|
<td class="normal">
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>535</td>
|
2007-10-24 00:21:22 +04:00
|
|
|
<td class="normal"> /**
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>536</td>
|
2007-10-24 00:21:22 +04:00
|
|
|
<td class="normal"> * addForeignKey
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>537</td>
|
2007-10-24 00:21:22 +04:00
|
|
|
<td class="normal"> *
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>538</td>
|
2007-10-24 00:21:22 +04:00
|
|
|
<td class="normal"> * adds a foreignKey to this table
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>539</td>
|
2007-10-24 00:21:22 +04:00
|
|
|
<td class="normal"> *
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>540</td>
|
2007-10-24 00:21:22 +04:00
|
|
|
<td class="normal"> * @return void
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>541</td>
|
2007-10-24 00:21:22 +04:00
|
|
|
<td class="normal"> */
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>542</td>
|
2007-10-24 00:21:22 +04:00
|
|
|
<td class="normal"> public function addForeignKey(array $definition)
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>543</td>
|
2007-10-24 00:21:22 +04:00
|
|
|
<td class="normal"> {
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>544</td>
|
2007-10-24 00:21:22 +04:00
|
|
|
<td class="red"> $this->_options['foreignKeys'][] = $definition;
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>545</td>
|
2007-10-24 00:21:22 +04:00
|
|
|
<td class="red"> }
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>546</td>
|
2007-10-24 00:21:22 +04:00
|
|
|
<td class="normal">
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>547</td>
|
2007-10-24 00:21:22 +04:00
|
|
|
<td class="normal"> /**
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>548</td>
|
2007-10-24 00:21:22 +04:00
|
|
|
<td class="normal"> * addCheckConstraint
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>549</td>
|
2007-10-24 00:21:22 +04:00
|
|
|
<td class="normal"> *
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>550</td>
|
2007-10-24 00:21:22 +04:00
|
|
|
<td class="normal"> * adds a check constraint to this table
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>551</td>
|
2007-10-24 00:21:22 +04:00
|
|
|
<td class="normal"> *
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>552</td>
|
2007-10-24 00:21:22 +04:00
|
|
|
<td class="normal"> * @return void
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>553</td>
|
2007-10-24 00:21:22 +04:00
|
|
|
<td class="normal"> */
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>554</td>
|
2007-10-24 00:21:22 +04:00
|
|
|
<td class="normal"> public function addCheckConstraint($definition, $name)
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>555</td>
|
2007-10-24 00:21:22 +04:00
|
|
|
<td class="normal"> {
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>556</td>
|
2007-10-24 00:21:22 +04:00
|
|
|
<td class="red"> if (is_string($name)) {
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>557</td>
|
2007-10-24 00:21:22 +04:00
|
|
|
<td class="red"> $this->_options['checks'][$name] = $definition;
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>558</td>
|
2007-10-24 00:21:22 +04:00
|
|
|
<td class="red"> } else {
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>559</td>
|
2007-10-24 00:21:22 +04:00
|
|
|
<td class="red"> $this->_options['checks'][] = $definition;
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>560</td>
|
2007-10-24 00:21:22 +04:00
|
|
|
<td class="normal"> }
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>561</td>
|
2007-10-24 00:21:22 +04:00
|
|
|
<td class="normal">
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>562</td>
|
2007-10-24 00:21:22 +04:00
|
|
|
<td class="red"> return $this;
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>563</td>
|
2007-10-24 00:21:22 +04:00
|
|
|
<td class="orange"> }
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>564</td>
|
2007-10-24 00:21:22 +04:00
|
|
|
<td class="normal">
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>565</td>
|
2007-10-24 00:21:22 +04:00
|
|
|
<td class="normal"> /**
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>566</td>
|
2007-10-24 00:21:22 +04:00
|
|
|
<td class="normal"> * addIndex
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>567</td>
|
2007-10-24 00:21:22 +04:00
|
|
|
<td class="normal"> *
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>568</td>
|
2007-10-24 00:21:22 +04:00
|
|
|
<td class="normal"> * adds an index to this table
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>569</td>
|
2007-10-24 00:21:22 +04:00
|
|
|
<td class="normal"> *
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>570</td>
|
2007-10-24 00:21:22 +04:00
|
|
|
<td class="normal"> * @return void
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>571</td>
|
2007-10-24 00:21:22 +04:00
|
|
|
<td class="normal"> */
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>572</td>
|
2007-10-24 00:21:22 +04:00
|
|
|
<td class="normal"> public function addIndex($index, array $definition)
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>573</td>
|
2007-10-24 00:21:22 +04:00
|
|
|
<td class="normal"> {
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>574</td>
|
2007-10-24 00:21:22 +04:00
|
|
|
<td class="covered"> $this->_options['indexes'][$index] = $definition;
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>575</td>
|
2007-10-24 00:21:22 +04:00
|
|
|
<td class="covered"> }
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>576</td>
|
2007-10-24 00:21:22 +04:00
|
|
|
<td class="normal">
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>577</td>
|
2007-10-24 00:21:22 +04:00
|
|
|
<td class="normal"> /**
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>578</td>
|
2007-10-24 00:21:22 +04:00
|
|
|
<td class="normal"> * getIndex
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>579</td>
|
2007-10-24 00:21:22 +04:00
|
|
|
<td class="normal"> *
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>580</td>
|
2007-10-24 00:21:22 +04:00
|
|
|
<td class="normal"> * @return array|boolean array on success, FALSE on failure
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>581</td>
|
2007-10-24 00:21:22 +04:00
|
|
|
<td class="normal"> */
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>582</td>
|
2007-10-24 00:21:22 +04:00
|
|
|
<td class="normal"> public function getIndex($index)
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>583</td>
|
2007-10-24 00:21:22 +04:00
|
|
|
<td class="normal"> {
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>584</td>
|
2007-10-24 00:21:22 +04:00
|
|
|
<td class="red"> if (isset($this->_options['indexes'][$index])) {
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>585</td>
|
2007-10-24 00:21:22 +04:00
|
|
|
<td class="red"> return $this->_options['indexes'][$index];
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>586</td>
|
2007-10-24 00:21:22 +04:00
|
|
|
<td class="orange"> }
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>587</td>
|
2007-10-24 00:21:22 +04:00
|
|
|
<td class="normal">
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>588</td>
|
2007-10-24 00:21:22 +04:00
|
|
|
<td class="red"> return false;
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>589</td>
|
2007-10-24 00:21:22 +04:00
|
|
|
<td class="orange"> }
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>590</td>
|
2007-10-24 00:21:22 +04:00
|
|
|
<td class="normal"> public function bind($args, $type)
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>591</td>
|
2007-10-24 00:21:22 +04:00
|
|
|
<td class="normal"> {
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>592</td>
|
2007-10-24 00:21:22 +04:00
|
|
|
<td class="covered"> $options = array();
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>593</td>
|
2007-10-24 00:21:22 +04:00
|
|
|
<td class="covered"> $options['type'] = $type;
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>594</td>
|
2007-10-24 00:21:22 +04:00
|
|
|
<td class="normal">
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>595</td>
|
2007-10-24 00:21:22 +04:00
|
|
|
<td class="covered"> if ( ! isset($args[1])) {
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>596</td>
|
2007-10-24 00:21:22 +04:00
|
|
|
<td class="red"> $args[1] = array();
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>597</td>
|
2007-10-24 00:21:22 +04:00
|
|
|
<td class="red"> }
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>598</td>
|
2007-10-24 00:21:22 +04:00
|
|
|
<td class="normal">
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>599</td>
|
2007-10-24 00:21:22 +04:00
|
|
|
<td class="normal"> // the following is needed for backwards compatibility
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>600</td>
|
2007-10-24 00:21:22 +04:00
|
|
|
<td class="covered"> if (is_string($args[1])) {
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>601</td>
|
2007-10-24 00:21:22 +04:00
|
|
|
<td class="covered"> if ( ! isset($args[2])) {
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>602</td>
|
2007-10-24 00:21:22 +04:00
|
|
|
<td class="covered"> $args[2] = array();
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>603</td>
|
2007-10-24 00:21:22 +04:00
|
|
|
<td class="covered"> } elseif (is_string($args[2])) {
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>604</td>
|
2007-10-24 00:21:22 +04:00
|
|
|
<td class="covered"> $args[2] = (array) $args[2];
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>605</td>
|
2007-10-24 00:21:22 +04:00
|
|
|
<td class="covered"> }
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>606</td>
|
2007-10-24 00:21:22 +04:00
|
|
|
<td class="normal">
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>607</td>
|
2007-10-24 00:21:22 +04:00
|
|
|
<td class="covered"> $classes = array_merge($this->_options['parents'], array($this->getComponentName()));
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>608</td>
|
2007-10-24 00:21:22 +04:00
|
|
|
<td class="normal">
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>609</td>
|
2007-10-24 00:21:22 +04:00
|
|
|
<td class="normal">
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>610</td>
|
2007-10-24 00:21:22 +04:00
|
|
|
<td class="covered"> $e = explode('.', $args[1]);
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>611</td>
|
2007-10-24 00:21:22 +04:00
|
|
|
<td class="covered"> if (in_array($e[0], $classes)) {
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>612</td>
|
2007-10-24 00:21:22 +04:00
|
|
|
<td class="covered"> if ($options['type'] >= Doctrine_Relation::MANY) {
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>613</td>
|
2007-10-24 00:21:22 +04:00
|
|
|
<td class="covered"> $options['foreign'] = $e[1];
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>614</td>
|
2007-10-24 00:21:22 +04:00
|
|
|
<td class="covered"> } else {
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>615</td>
|
2007-10-24 00:21:22 +04:00
|
|
|
<td class="covered"> $options['local'] = $e[1];
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>616</td>
|
2007-10-24 00:21:22 +04:00
|
|
|
<td class="normal"> }
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>617</td>
|
2007-10-24 00:21:22 +04:00
|
|
|
<td class="covered"> } else {
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>618</td>
|
2007-10-24 00:21:22 +04:00
|
|
|
<td class="covered"> $e2 = explode(' as ', $args[0]);
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>619</td>
|
2007-10-24 00:21:22 +04:00
|
|
|
<td class="covered"> if ($e[0] !== $e2[0] && ( ! isset($e2[1]) || $e[0] !== $e2[1])) {
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>620</td>
|
2007-10-24 00:21:22 +04:00
|
|
|
<td class="covered"> $options['refClass'] = $e[0];
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>621</td>
|
2007-10-24 00:21:22 +04:00
|
|
|
<td class="covered"> }
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>622</td>
|
2007-10-24 00:21:22 +04:00
|
|
|
<td class="normal">
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>623</td>
|
2007-10-24 00:21:22 +04:00
|
|
|
<td class="covered"> $options['foreign'] = $e[1];
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>624</td>
|
2007-10-24 00:21:22 +04:00
|
|
|
<td class="normal"> }
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>625</td>
|
2007-10-24 00:21:22 +04:00
|
|
|
<td class="normal">
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>626</td>
|
2007-10-24 00:21:22 +04:00
|
|
|
<td class="covered"> $options = array_merge($args[2], $options);
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>627</td>
|
2007-10-24 00:21:22 +04:00
|
|
|
<td class="normal">
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>628</td>
|
2007-10-24 00:21:22 +04:00
|
|
|
<td class="covered"> $this->_parser->bind($args[0], $options);
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>629</td>
|
2007-10-24 00:21:22 +04:00
|
|
|
<td class="covered"> } else {
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>630</td>
|
2007-10-24 00:21:22 +04:00
|
|
|
<td class="covered"> $options = array_merge($args[1], $options);
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>631</td>
|
2007-10-24 00:21:22 +04:00
|
|
|
<td class="covered"> $this->_parser->bind($args[0], $options);
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>632</td>
|
2007-10-24 00:21:22 +04:00
|
|
|
<td class="normal"> }
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>633</td>
|
2007-10-24 00:21:22 +04:00
|
|
|
<td class="covered"> }
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>634</td>
|
2007-10-24 00:21:22 +04:00
|
|
|
<td class="normal">
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>635</td>
|
2007-10-24 00:21:22 +04:00
|
|
|
<td class="normal"> /**
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>636</td>
|
2007-10-24 00:21:22 +04:00
|
|
|
<td class="normal"> * hasRelation
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>637</td>
|
2007-10-24 00:21:22 +04:00
|
|
|
<td class="normal"> *
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>638</td>
|
2007-10-24 00:21:22 +04:00
|
|
|
<td class="normal"> * @param string $alias the relation to check if exists
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>639</td>
|
2007-10-24 00:21:22 +04:00
|
|
|
<td class="normal"> * @return boolean true if the relation exists otherwise false
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>640</td>
|
2007-10-24 00:21:22 +04:00
|
|
|
<td class="normal"> */
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>641</td>
|
2007-10-24 00:21:22 +04:00
|
|
|
<td class="normal"> public function hasRelation($alias)
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>642</td>
|
2007-10-24 00:21:22 +04:00
|
|
|
<td class="normal"> {
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>643</td>
|
2007-10-24 00:21:22 +04:00
|
|
|
<td class="red"> return $this->_parser->hasRelation($alias);
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>644</td>
|
2007-10-24 00:21:22 +04:00
|
|
|
<td class="orange"> }
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>645</td>
|
2007-10-24 00:21:22 +04:00
|
|
|
<td class="normal">
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>646</td>
|
2007-10-24 00:21:22 +04:00
|
|
|
<td class="normal"> /**
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>647</td>
|
2007-10-24 00:21:22 +04:00
|
|
|
<td class="normal"> * getRelation
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>648</td>
|
2007-10-24 00:21:22 +04:00
|
|
|
<td class="normal"> *
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>649</td>
|
2007-10-24 00:21:22 +04:00
|
|
|
<td class="normal"> * @param string $alias relation alias
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>650</td>
|
2007-10-24 00:21:22 +04:00
|
|
|
<td class="normal"> */
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>651</td>
|
2007-10-24 00:21:22 +04:00
|
|
|
<td class="normal"> public function getRelation($alias, $recursive = true)
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>652</td>
|
2007-10-24 00:21:22 +04:00
|
|
|
<td class="normal"> {
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>653</td>
|
2007-10-24 00:21:22 +04:00
|
|
|
<td class="covered"> return $this->_parser->getRelation($alias, $recursive);
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>654</td>
|
2007-10-24 00:21:22 +04:00
|
|
|
<td class="orange"> }
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>655</td>
|
2007-10-24 00:21:22 +04:00
|
|
|
<td class="normal">
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>656</td>
|
2007-10-24 00:21:22 +04:00
|
|
|
<td class="normal"> /**
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>657</td>
|
2007-10-24 00:21:22 +04:00
|
|
|
<td class="normal"> * getRelations
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>658</td>
|
2007-10-24 00:21:22 +04:00
|
|
|
<td class="normal"> * returns an array containing all relation objects
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>659</td>
|
2007-10-24 00:21:22 +04:00
|
|
|
<td class="normal"> *
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>660</td>
|
2007-10-24 00:21:22 +04:00
|
|
|
<td class="normal"> * @return array an array of Doctrine_Relation objects
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>661</td>
|
2007-10-24 00:21:22 +04:00
|
|
|
<td class="normal"> */
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>662</td>
|
2007-10-24 00:21:22 +04:00
|
|
|
<td class="normal"> public function getRelations()
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>663</td>
|
2007-10-24 00:21:22 +04:00
|
|
|
<td class="normal"> {
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>664</td>
|
2007-10-24 00:21:22 +04:00
|
|
|
<td class="covered"> return $this->_parser->getRelations();
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>665</td>
|
2007-10-24 00:21:22 +04:00
|
|
|
<td class="orange"> }
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>666</td>
|
2007-10-24 00:21:22 +04:00
|
|
|
<td class="normal">
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>667</td>
|
2007-10-24 00:21:22 +04:00
|
|
|
<td class="normal"> /**
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>668</td>
|
2007-10-24 00:21:22 +04:00
|
|
|
<td class="normal"> * createQuery
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>669</td>
|
2007-10-24 00:21:22 +04:00
|
|
|
<td class="normal"> * creates a new Doctrine_Query object and adds the component name
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>670</td>
|
2007-10-24 00:21:22 +04:00
|
|
|
<td class="normal"> * of this table as the query 'from' part
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>671</td>
|
2007-10-24 00:21:22 +04:00
|
|
|
<td class="normal"> *
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>672</td>
|
2007-10-24 00:21:22 +04:00
|
|
|
<td class="normal"> * @param string Optional alias name for component aliasing.
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>673</td>
|
2007-10-24 00:21:22 +04:00
|
|
|
<td class="normal"> *
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>674</td>
|
2007-10-24 00:21:22 +04:00
|
|
|
<td class="normal"> * @return Doctrine_Query
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>675</td>
|
2007-10-24 00:21:22 +04:00
|
|
|
<td class="normal"> */
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>676</td>
|
2007-10-24 00:21:22 +04:00
|
|
|
<td class="normal"> public function createQuery($alias = '')
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>677</td>
|
2007-10-24 00:21:22 +04:00
|
|
|
<td class="normal"> {
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>678</td>
|
2007-10-24 00:21:22 +04:00
|
|
|
<td class="covered"> if ( ! empty($alias)) {
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>679</td>
|
2007-10-24 00:21:22 +04:00
|
|
|
<td class="red"> $alias = ' ' . trim($alias);
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>680</td>
|
2007-10-24 00:21:22 +04:00
|
|
|
<td class="red"> }
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>681</td>
|
2007-10-24 00:21:22 +04:00
|
|
|
<td class="covered"> return Doctrine_Query::create($this->_conn)->from($this->getComponentName() . $alias);
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>682</td>
|
2007-10-24 00:21:22 +04:00
|
|
|
<td class="orange"> }
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>683</td>
|
2007-10-24 00:21:22 +04:00
|
|
|
<td class="normal">
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>684</td>
|
2007-10-24 00:21:22 +04:00
|
|
|
<td class="normal"> /**
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>685</td>
|
2007-10-24 00:21:22 +04:00
|
|
|
<td class="normal"> * getRepository
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>686</td>
|
2007-10-24 00:21:22 +04:00
|
|
|
<td class="normal"> *
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>687</td>
|
2007-10-24 00:21:22 +04:00
|
|
|
<td class="normal"> * @return Doctrine_Table_Repository
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>688</td>
|
2007-10-24 00:21:22 +04:00
|
|
|
<td class="normal"> */
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>689</td>
|
2007-10-24 00:21:22 +04:00
|
|
|
<td class="normal"> public function getRepository()
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>690</td>
|
2007-10-24 00:21:22 +04:00
|
|
|
<td class="normal"> {
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>691</td>
|
2007-10-24 00:21:22 +04:00
|
|
|
<td class="covered"> return $this->_repository;
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>692</td>
|
2007-10-24 00:21:22 +04:00
|
|
|
<td class="orange"> }
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>693</td>
|
2007-10-24 00:21:22 +04:00
|
|
|
<td class="normal">
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>694</td>
|
2007-10-24 00:21:22 +04:00
|
|
|
<td class="normal"> /**
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>695</td>
|
2007-10-24 00:21:22 +04:00
|
|
|
<td class="normal"> * setOption
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>696</td>
|
2007-10-24 00:21:22 +04:00
|
|
|
<td class="normal"> * sets an option and returns this object in order to
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>697</td>
|
2007-10-24 00:21:22 +04:00
|
|
|
<td class="normal"> * allow flexible method chaining
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>698</td>
|
2007-10-24 00:21:22 +04:00
|
|
|
<td class="normal"> *
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>699</td>
|
2007-10-24 00:21:22 +04:00
|
|
|
<td class="normal"> * @see Doctrine_Table::$_options for available options
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>700</td>
|
2007-10-24 00:21:22 +04:00
|
|
|
<td class="normal"> * @param string $name the name of the option to set
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>701</td>
|
2007-10-24 00:21:22 +04:00
|
|
|
<td class="normal"> * @param mixed $value the value of the option
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>702</td>
|
2007-10-24 00:21:22 +04:00
|
|
|
<td class="normal"> * @return Doctrine_Table this object
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>703</td>
|
2007-10-24 00:21:22 +04:00
|
|
|
<td class="normal"> */
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>704</td>
|
2007-10-24 00:21:22 +04:00
|
|
|
<td class="normal"> public function setOption($name, $value)
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>705</td>
|
2007-10-24 00:21:22 +04:00
|
|
|
<td class="normal"> {
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>706</td>
|
2007-10-24 00:21:22 +04:00
|
|
|
<td class="normal"> switch ($name) {
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>707</td>
|
2007-10-24 00:21:22 +04:00
|
|
|
<td class="covered"> case 'name':
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>708</td>
|
2007-10-24 00:21:22 +04:00
|
|
|
<td class="covered"> case 'tableName':
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>709</td>
|
2007-10-24 00:21:22 +04:00
|
|
|
<td class="covered"> break;
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>710</td>
|
2007-10-24 00:21:22 +04:00
|
|
|
<td class="covered"> case 'enumMap':
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>711</td>
|
2007-10-24 00:21:22 +04:00
|
|
|
<td class="covered"> case 'inheritanceMap':
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>712</td>
|
2007-10-24 00:21:22 +04:00
|
|
|
<td class="covered"> case 'index':
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>713</td>
|
2007-10-24 00:21:22 +04:00
|
|
|
<td class="covered"> case 'treeOptions':
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>714</td>
|
2007-10-24 00:21:22 +04:00
|
|
|
<td class="covered"> if ( ! is_array($value)) {
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>715</td>
|
2007-10-24 00:21:22 +04:00
|
|
|
<td class="red"> throw new Doctrine_Table_Exception($name . ' should be an array.');
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>716</td>
|
2007-10-24 00:21:22 +04:00
|
|
|
<td class="orange"> }
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>717</td>
|
2007-10-24 00:21:22 +04:00
|
|
|
<td class="covered"> break;
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>718</td>
|
2007-10-24 00:21:22 +04:00
|
|
|
<td class="orange"> }
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>719</td>
|
2007-10-24 00:21:22 +04:00
|
|
|
<td class="covered"> $this->_options[$name] = $value;
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>720</td>
|
2007-10-24 00:21:22 +04:00
|
|
|
<td class="covered"> }
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>721</td>
|
2007-10-24 00:21:22 +04:00
|
|
|
<td class="normal">
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>722</td>
|
2007-10-24 00:21:22 +04:00
|
|
|
<td class="normal"> /**
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>723</td>
|
2007-10-24 00:21:22 +04:00
|
|
|
<td class="normal"> * getOption
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>724</td>
|
2007-10-24 00:21:22 +04:00
|
|
|
<td class="normal"> * returns the value of given option
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>725</td>
|
2007-10-24 00:21:22 +04:00
|
|
|
<td class="normal"> *
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>726</td>
|
2007-10-24 00:21:22 +04:00
|
|
|
<td class="normal"> * @param string $name the name of the option
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>727</td>
|
2007-10-24 00:21:22 +04:00
|
|
|
<td class="normal"> * @return mixed the value of given option
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>728</td>
|
2007-10-24 00:21:22 +04:00
|
|
|
<td class="normal"> */
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>729</td>
|
2007-10-24 00:21:22 +04:00
|
|
|
<td class="normal"> public function getOption($name)
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>730</td>
|
2007-10-24 00:21:22 +04:00
|
|
|
<td class="normal"> {
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>731</td>
|
2007-10-24 00:21:22 +04:00
|
|
|
<td class="covered"> if (isset($this->_options[$name])) {
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>732</td>
|
2007-10-24 00:21:22 +04:00
|
|
|
<td class="covered"> return $this->_options[$name];
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>733</td>
|
2007-10-24 00:21:22 +04:00
|
|
|
<td class="orange"> }
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>734</td>
|
2007-10-24 00:21:22 +04:00
|
|
|
<td class="red"> return null;
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>735</td>
|
2007-10-24 00:21:22 +04:00
|
|
|
<td class="orange"> }
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>736</td>
|
2007-10-24 00:21:22 +04:00
|
|
|
<td class="normal">
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>737</td>
|
2007-10-24 00:21:22 +04:00
|
|
|
<td class="normal"> /**
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>738</td>
|
2007-10-24 00:21:22 +04:00
|
|
|
<td class="normal"> * getColumnName
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>739</td>
|
2007-10-24 00:21:22 +04:00
|
|
|
<td class="normal"> *
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>740</td>
|
2007-10-24 00:21:22 +04:00
|
|
|
<td class="normal"> * returns a column name for column alias
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>741</td>
|
2007-10-24 00:21:22 +04:00
|
|
|
<td class="normal"> * if the actual name for the alias cannot be found
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>742</td>
|
2007-10-24 00:21:22 +04:00
|
|
|
<td class="normal"> * this method returns the given alias
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>743</td>
|
2007-10-24 00:21:22 +04:00
|
|
|
<td class="normal"> *
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>744</td>
|
2007-10-24 00:21:22 +04:00
|
|
|
<td class="normal"> * @param string $alias column alias
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>745</td>
|
2007-10-24 00:21:22 +04:00
|
|
|
<td class="normal"> * @return string column name
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>746</td>
|
2007-10-24 00:21:22 +04:00
|
|
|
<td class="normal"> */
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>747</td>
|
2007-10-24 00:21:22 +04:00
|
|
|
<td class="normal"> public function getColumnName($alias)
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>748</td>
|
2007-10-24 00:21:22 +04:00
|
|
|
<td class="normal"> {
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>749</td>
|
2007-10-24 00:21:22 +04:00
|
|
|
<td class="covered"> $alias = strtolower($alias);
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>750</td>
|
2007-10-24 00:21:22 +04:00
|
|
|
<td class="covered"> if (isset($this->_columnAliases[$alias])) {
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>751</td>
|
2007-10-24 00:21:22 +04:00
|
|
|
<td class="covered"> return $this->_columnAliases[$alias];
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>752</td>
|
2007-10-24 00:21:22 +04:00
|
|
|
<td class="orange"> }
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>753</td>
|
2007-10-24 00:21:22 +04:00
|
|
|
<td class="normal">
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>754</td>
|
2007-10-24 00:21:22 +04:00
|
|
|
<td class="covered"> return $alias;
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>755</td>
|
2007-10-24 00:21:22 +04:00
|
|
|
<td class="orange"> }
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>756</td>
|
2007-10-24 00:21:22 +04:00
|
|
|
<td class="normal">
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>757</td>
|
2007-10-24 00:21:22 +04:00
|
|
|
<td class="normal"> /**
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>758</td>
|
2007-10-24 00:21:22 +04:00
|
|
|
<td class="normal"> * setColumn
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>759</td>
|
2007-10-24 00:21:22 +04:00
|
|
|
<td class="normal"> *
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>760</td>
|
2007-10-24 00:21:22 +04:00
|
|
|
<td class="normal"> * @param string $name
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>761</td>
|
2007-10-24 00:21:22 +04:00
|
|
|
<td class="normal"> * @param string $type
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>762</td>
|
2007-10-24 00:21:22 +04:00
|
|
|
<td class="normal"> * @param integer $length
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>763</td>
|
2007-10-24 00:21:22 +04:00
|
|
|
<td class="normal"> * @param mixed $options
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>764</td>
|
2007-10-24 00:21:22 +04:00
|
|
|
<td class="normal"> * @throws Doctrine_Table_Exception if trying use wrongly typed parameter
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>765</td>
|
2007-10-24 00:21:22 +04:00
|
|
|
<td class="normal"> * @return void
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>766</td>
|
2007-10-24 00:21:22 +04:00
|
|
|
<td class="normal"> */
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>767</td>
|
2007-10-24 00:21:22 +04:00
|
|
|
<td class="normal"> public function setColumn($name, $type, $length = null, $options = array())
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>768</td>
|
2007-10-24 00:21:22 +04:00
|
|
|
<td class="normal"> {
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>769</td>
|
2007-10-24 00:21:22 +04:00
|
|
|
<td class="covered"> if (is_string($options)) {
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>770</td>
|
2007-10-24 00:21:22 +04:00
|
|
|
<td class="covered"> $options = explode('|', $options);
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>771</td>
|
2007-10-24 00:21:22 +04:00
|
|
|
<td class="covered"> }
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>772</td>
|
2007-10-24 00:21:22 +04:00
|
|
|
<td class="normal">
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>773</td>
|
2007-10-24 00:21:22 +04:00
|
|
|
<td class="covered"> foreach ($options as $k => $option) {
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>774</td>
|
2007-10-24 00:21:22 +04:00
|
|
|
<td class="covered"> if (is_numeric($k)) {
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>775</td>
|
2007-10-24 00:21:22 +04:00
|
|
|
<td class="covered"> if ( ! empty($option)) {
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>776</td>
|
2007-10-24 00:21:22 +04:00
|
|
|
<td class="covered"> $options[$option] = true;
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>777</td>
|
2007-10-24 00:21:22 +04:00
|
|
|
<td class="covered"> }
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>778</td>
|
2007-10-24 00:21:22 +04:00
|
|
|
<td class="covered"> unset($options[$k]);
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>779</td>
|
2007-10-24 00:21:22 +04:00
|
|
|
<td class="covered"> }
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>780</td>
|
2007-10-24 00:21:22 +04:00
|
|
|
<td class="covered"> }
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>781</td>
|
2007-10-24 00:21:22 +04:00
|
|
|
<td class="normal">
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>782</td>
|
2007-10-24 00:21:22 +04:00
|
|
|
<td class="covered"> $name = strtolower($name);
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>783</td>
|
2007-10-24 00:21:22 +04:00
|
|
|
<td class="covered"> $parts = explode(' as ', $name);
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>784</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="normal">
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>785</td>
|
2007-10-24 00:21:22 +04:00
|
|
|
<td class="covered"> if (count($parts) > 1) {
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>786</td>
|
2007-10-24 00:21:22 +04:00
|
|
|
<td class="covered"> $this->_columnAliases[$parts[1]] = $parts[0];
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>787</td>
|
2007-10-24 00:21:22 +04:00
|
|
|
<td class="covered"> $name = $parts[0];
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>788</td>
|
2007-10-24 00:21:22 +04:00
|
|
|
<td class="covered"> }
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>789</td>
|
2007-10-24 00:21:22 +04:00
|
|
|
<td class="normal">
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>790</td>
|
2007-10-24 00:21:22 +04:00
|
|
|
<td class="normal">
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>791</td>
|
2007-10-24 00:21:22 +04:00
|
|
|
<td class="normal">
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>792</td>
|
2007-10-24 00:21:22 +04:00
|
|
|
<td class="covered"> if ($length == null) {
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>793</td>
|
2007-10-24 00:21:22 +04:00
|
|
|
<td class="normal"> switch ($type) {
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>794</td>
|
2007-10-24 00:21:22 +04:00
|
|
|
<td class="covered"> case 'string':
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>795</td>
|
2007-10-24 00:21:22 +04:00
|
|
|
<td class="covered"> case 'clob':
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>796</td>
|
2007-10-24 00:21:22 +04:00
|
|
|
<td class="covered"> case 'float':
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>797</td>
|
2007-10-24 00:21:22 +04:00
|
|
|
<td class="covered"> case 'integer':
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>798</td>
|
2007-10-24 00:21:22 +04:00
|
|
|
<td class="covered"> case 'array':
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>799</td>
|
2007-10-24 00:21:22 +04:00
|
|
|
<td class="covered"> case 'object':
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>800</td>
|
2007-10-24 00:21:22 +04:00
|
|
|
<td class="covered"> case 'blob':
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>801</td>
|
2007-10-24 00:21:22 +04:00
|
|
|
<td class="covered"> case 'gzip':
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>802</td>
|
2007-10-24 00:21:22 +04:00
|
|
|
<td class="normal"> // use php int max
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>803</td>
|
2007-10-24 00:21:22 +04:00
|
|
|
<td class="covered"> $length = 2147483647;
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>804</td>
|
2007-10-24 00:21:22 +04:00
|
|
|
<td class="covered"> break;
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>805</td>
|
2007-10-24 00:21:22 +04:00
|
|
|
<td class="covered"> case 'boolean':
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>806</td>
|
2007-10-24 00:21:22 +04:00
|
|
|
<td class="covered"> $length = 1;
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>807</td>
|
2007-10-24 00:21:22 +04:00
|
|
|
<td class="covered"> case 'date':
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>808</td>
|
2007-10-24 00:21:22 +04:00
|
|
|
<td class="normal"> // YYYY-MM-DD ISO 8601
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>809</td>
|
2007-10-24 00:21:22 +04:00
|
|
|
<td class="covered"> $length = 10;
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>810</td>
|
2007-10-24 00:21:22 +04:00
|
|
|
<td class="covered"> case 'time':
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>811</td>
|
2007-10-24 00:21:22 +04:00
|
|
|
<td class="normal"> // HH:NN:SS+00:00 ISO 8601
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>812</td>
|
2007-10-24 00:21:22 +04:00
|
|
|
<td class="covered"> $length = 14;
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>813</td>
|
2007-10-24 00:21:22 +04:00
|
|
|
<td class="covered"> case 'timestamp':
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>814</td>
|
2007-10-24 00:21:22 +04:00
|
|
|
<td class="normal"> // YYYY-MM-DDTHH:MM:SS+00:00 ISO 8601
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>815</td>
|
2007-10-24 00:21:22 +04:00
|
|
|
<td class="covered"> $length = 25;
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>816</td>
|
2007-10-24 00:21:22 +04:00
|
|
|
<td class="covered"> break;
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>817</td>
|
2007-10-24 00:21:22 +04:00
|
|
|
<td class="orange"> }
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>818</td>
|
2007-10-24 00:21:22 +04:00
|
|
|
<td class="covered"> }
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>819</td>
|
2007-10-24 00:21:22 +04:00
|
|
|
<td class="normal">
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>820</td>
|
2007-10-24 00:21:22 +04:00
|
|
|
<td class="covered"> $this->_columns[$name] = $options;
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>821</td>
|
2007-10-24 00:21:22 +04:00
|
|
|
<td class="covered"> $this->_columns[$name]['type'] = $type;
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>822</td>
|
2007-10-24 00:21:22 +04:00
|
|
|
<td class="covered"> $this->_columns[$name]['length'] = $length;
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>823</td>
|
2007-10-24 00:21:22 +04:00
|
|
|
<td class="normal">
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>824</td>
|
2007-10-24 00:21:22 +04:00
|
|
|
<td class="covered"> if (isset($options['primary'])) {
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>825</td>
|
2007-10-24 00:21:22 +04:00
|
|
|
<td class="covered"> $this->_identifier[] = $name;
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>826</td>
|
2007-10-24 00:21:22 +04:00
|
|
|
<td class="covered"> }
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>827</td>
|
2007-10-24 00:21:22 +04:00
|
|
|
<td class="covered"> if (isset($options['default'])) {
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>828</td>
|
2007-10-24 00:21:22 +04:00
|
|
|
<td class="covered"> $this->hasDefaultValues = true;
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>829</td>
|
2007-10-24 00:21:22 +04:00
|
|
|
<td class="covered"> }
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>830</td>
|
2007-10-24 00:21:22 +04:00
|
|
|
<td class="covered"> }
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>831</td>
|
2007-10-24 00:21:22 +04:00
|
|
|
<td class="normal">
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>832</td>
|
2007-10-24 00:21:22 +04:00
|
|
|
<td class="normal"> /**
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>833</td>
|
2007-10-24 00:21:22 +04:00
|
|
|
<td class="normal"> * hasDefaultValues
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>834</td>
|
2007-10-24 00:21:22 +04:00
|
|
|
<td class="normal"> * returns true if this table has default values, otherwise false
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>835</td>
|
2007-10-24 00:21:22 +04:00
|
|
|
<td class="normal"> *
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>836</td>
|
2007-10-24 00:21:22 +04:00
|
|
|
<td class="normal"> * @return boolean
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>837</td>
|
2007-10-24 00:21:22 +04:00
|
|
|
<td class="normal"> */
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>838</td>
|
2007-10-24 00:21:22 +04:00
|
|
|
<td class="normal"> public function hasDefaultValues()
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>839</td>
|
2007-10-24 00:21:22 +04:00
|
|
|
<td class="normal"> {
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>840</td>
|
2007-10-24 00:21:22 +04:00
|
|
|
<td class="covered"> return $this->hasDefaultValues;
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>841</td>
|
2007-10-24 00:21:22 +04:00
|
|
|
<td class="orange"> }
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>842</td>
|
2007-10-24 00:21:22 +04:00
|
|
|
<td class="normal">
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>843</td>
|
2007-10-24 00:21:22 +04:00
|
|
|
<td class="normal"> /**
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>844</td>
|
2007-10-24 00:21:22 +04:00
|
|
|
<td class="normal"> * getDefaultValueOf
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>845</td>
|
2007-10-24 00:21:22 +04:00
|
|
|
<td class="normal"> * returns the default value(if any) for given column
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>846</td>
|
2007-10-24 00:21:22 +04:00
|
|
|
<td class="normal"> *
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>847</td>
|
2007-10-24 00:21:22 +04:00
|
|
|
<td class="normal"> * @param string $column
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>848</td>
|
2007-10-24 00:21:22 +04:00
|
|
|
<td class="normal"> * @return mixed
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>849</td>
|
2007-10-24 00:21:22 +04:00
|
|
|
<td class="normal"> */
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>850</td>
|
2007-10-24 00:21:22 +04:00
|
|
|
<td class="normal"> public function getDefaultValueOf($column)
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>851</td>
|
2007-10-24 00:21:22 +04:00
|
|
|
<td class="normal"> {
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>852</td>
|
2007-10-24 00:21:22 +04:00
|
|
|
<td class="covered"> $column = strtolower($column);
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>853</td>
|
2007-10-24 00:21:22 +04:00
|
|
|
<td class="covered"> if ( ! isset($this->_columns[$column])) {
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>854</td>
|
2007-10-24 00:21:22 +04:00
|
|
|
<td class="red"> throw new Doctrine_Table_Exception("Couldn't get default value. Column ".$column." doesn't exist.");
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>855</td>
|
2007-10-24 00:21:22 +04:00
|
|
|
<td class="orange"> }
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>856</td>
|
2007-10-24 00:21:22 +04:00
|
|
|
<td class="covered"> if (isset($this->_columns[$column]['default'])) {
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>857</td>
|
2007-10-24 00:21:22 +04:00
|
|
|
<td class="covered"> return $this->_columns[$column]['default'];
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>858</td>
|
2007-10-24 00:21:22 +04:00
|
|
|
<td class="orange"> } else {
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>859</td>
|
2007-10-24 00:21:22 +04:00
|
|
|
<td class="covered"> return null;
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>860</td>
|
2007-10-24 00:21:22 +04:00
|
|
|
<td class="normal"> }
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>861</td>
|
2007-10-24 00:21:22 +04:00
|
|
|
<td class="orange"> }
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>862</td>
|
2007-10-24 00:21:22 +04:00
|
|
|
<td class="normal">
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>863</td>
|
2007-10-24 00:21:22 +04:00
|
|
|
<td class="normal"> /**
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>864</td>
|
2007-10-24 00:21:22 +04:00
|
|
|
<td class="normal"> * @return mixed
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>865</td>
|
2007-10-24 00:21:22 +04:00
|
|
|
<td class="normal"> */
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>866</td>
|
2007-10-24 00:21:22 +04:00
|
|
|
<td class="normal"> public function getIdentifier()
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>867</td>
|
2007-10-24 00:21:22 +04:00
|
|
|
<td class="normal"> {
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>868</td>
|
2007-10-24 00:21:22 +04:00
|
|
|
<td class="covered"> return $this->_identifier;
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>869</td>
|
2007-10-24 00:21:22 +04:00
|
|
|
<td class="orange"> }
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>870</td>
|
2007-10-24 00:21:22 +04:00
|
|
|
<td class="normal">
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>871</td>
|
2007-10-24 00:21:22 +04:00
|
|
|
<td class="normal"> /**
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>872</td>
|
2007-10-24 00:21:22 +04:00
|
|
|
<td class="normal"> * @return integer
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>873</td>
|
2007-10-24 00:21:22 +04:00
|
|
|
<td class="normal"> */
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>874</td>
|
2007-10-24 00:21:22 +04:00
|
|
|
<td class="normal"> public function getIdentifierType()
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>875</td>
|
2007-10-24 00:21:22 +04:00
|
|
|
<td class="normal"> {
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>876</td>
|
2007-10-24 00:21:22 +04:00
|
|
|
<td class="covered"> return $this->_identifierType;
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>877</td>
|
2007-10-24 00:21:22 +04:00
|
|
|
<td class="orange"> }
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>878</td>
|
2007-10-24 00:21:22 +04:00
|
|
|
<td class="normal">
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>879</td>
|
2007-10-24 00:21:22 +04:00
|
|
|
<td class="normal"> /**
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>880</td>
|
2007-10-24 00:21:22 +04:00
|
|
|
<td class="normal"> * hasColumn
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>881</td>
|
2007-10-24 00:21:22 +04:00
|
|
|
<td class="normal"> * @return boolean
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>882</td>
|
2007-10-24 00:21:22 +04:00
|
|
|
<td class="normal"> */
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>883</td>
|
2007-10-24 00:21:22 +04:00
|
|
|
<td class="normal"> public function hasColumn($name)
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>884</td>
|
2007-10-24 00:21:22 +04:00
|
|
|
<td class="normal"> {
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>885</td>
|
2007-10-24 00:21:22 +04:00
|
|
|
<td class="covered"> return isset($this->_columns[$name]);
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>886</td>
|
2007-10-24 00:21:22 +04:00
|
|
|
<td class="orange"> }
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>887</td>
|
2007-10-24 00:21:22 +04:00
|
|
|
<td class="normal">
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>888</td>
|
2007-10-24 00:21:22 +04:00
|
|
|
<td class="normal"> /**
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>889</td>
|
2007-10-24 00:21:22 +04:00
|
|
|
<td class="normal"> * sets the connection for this class
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>890</td>
|
2007-10-24 00:21:22 +04:00
|
|
|
<td class="normal"> *
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>891</td>
|
2007-10-24 00:21:22 +04:00
|
|
|
<td class="normal"> * @params Doctrine_Connection a connection object
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>892</td>
|
2007-10-24 00:21:22 +04:00
|
|
|
<td class="normal"> * @return Doctrine_Table this object
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>893</td>
|
2007-10-24 00:21:22 +04:00
|
|
|
<td class="normal"> */
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>894</td>
|
2007-10-24 00:21:22 +04:00
|
|
|
<td class="normal"> public function setConnection(Doctrine_Connection $conn)
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>895</td>
|
2007-10-24 00:21:22 +04:00
|
|
|
<td class="normal"> {
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>896</td>
|
2007-10-24 00:21:22 +04:00
|
|
|
<td class="red"> $this->_conn = $conn;
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>897</td>
|
2007-10-24 00:21:22 +04:00
|
|
|
<td class="normal">
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>898</td>
|
2007-10-24 00:21:22 +04:00
|
|
|
<td class="red"> $this->setParent($this->_conn);
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>899</td>
|
2007-10-24 00:21:22 +04:00
|
|
|
<td class="normal">
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>900</td>
|
2007-10-24 00:21:22 +04:00
|
|
|
<td class="red"> return $this;
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>901</td>
|
2007-10-24 00:21:22 +04:00
|
|
|
<td class="orange"> }
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>902</td>
|
2007-10-24 00:21:22 +04:00
|
|
|
<td class="normal">
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>903</td>
|
2007-10-24 00:21:22 +04:00
|
|
|
<td class="normal"> /**
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>904</td>
|
2007-10-24 00:21:22 +04:00
|
|
|
<td class="normal"> * returns the connection associated with this table (if any)
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>905</td>
|
2007-10-24 00:21:22 +04:00
|
|
|
<td class="normal"> *
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>906</td>
|
2007-10-24 00:21:22 +04:00
|
|
|
<td class="normal"> * @return Doctrine_Connection|null the connection object
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>907</td>
|
2007-10-24 00:21:22 +04:00
|
|
|
<td class="normal"> */
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>908</td>
|
2007-10-24 00:21:22 +04:00
|
|
|
<td class="normal"> public function getConnection()
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>909</td>
|
2007-10-24 00:21:22 +04:00
|
|
|
<td class="normal"> {
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>910</td>
|
2007-10-24 00:21:22 +04:00
|
|
|
<td class="covered"> return $this->_conn;
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>911</td>
|
2007-10-24 00:21:22 +04:00
|
|
|
<td class="orange"> }
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>912</td>
|
2007-10-24 00:21:22 +04:00
|
|
|
<td class="normal">
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>913</td>
|
2007-10-24 00:21:22 +04:00
|
|
|
<td class="normal"> /**
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>914</td>
|
2007-10-24 00:21:22 +04:00
|
|
|
<td class="normal"> * creates a new record
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>915</td>
|
2007-10-24 00:21:22 +04:00
|
|
|
<td class="normal"> *
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>916</td>
|
2007-10-24 00:21:22 +04:00
|
|
|
<td class="normal"> * @param $array an array where keys are field names and
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>917</td>
|
2007-10-24 00:21:22 +04:00
|
|
|
<td class="normal"> * values representing field values
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>918</td>
|
2007-10-24 00:21:22 +04:00
|
|
|
<td class="normal"> * @return Doctrine_Record the created record object
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>919</td>
|
2007-10-24 00:21:22 +04:00
|
|
|
<td class="normal"> */
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>920</td>
|
2007-10-24 00:21:22 +04:00
|
|
|
<td class="normal"> public function create(array $array = array())
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>921</td>
|
2007-10-24 00:21:22 +04:00
|
|
|
<td class="normal"> {
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>922</td>
|
2007-10-24 00:21:22 +04:00
|
|
|
<td class="covered"> $this->_data = $array;
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>923</td>
|
2007-10-24 00:21:22 +04:00
|
|
|
<td class="covered"> $record = new $this->_options['name']($this, true);
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>924</td>
|
2007-10-24 00:21:22 +04:00
|
|
|
<td class="covered"> $this->_data = array();
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>925</td>
|
2007-10-24 00:21:22 +04:00
|
|
|
<td class="normal">
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>926</td>
|
2007-10-24 00:21:22 +04:00
|
|
|
<td class="covered"> return $record;
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>927</td>
|
2007-10-24 00:21:22 +04:00
|
|
|
<td class="orange"> }
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>928</td>
|
2007-10-24 00:21:22 +04:00
|
|
|
<td class="normal">
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>929</td>
|
2007-10-24 00:21:22 +04:00
|
|
|
<td class="normal"> /**
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>930</td>
|
2007-10-24 00:21:22 +04:00
|
|
|
<td class="normal"> * finds a record by its identifier
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>931</td>
|
2007-10-24 00:21:22 +04:00
|
|
|
<td class="normal"> *
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>932</td>
|
2007-10-24 00:21:22 +04:00
|
|
|
<td class="normal"> * @param $id database row id
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>933</td>
|
2007-10-24 00:21:22 +04:00
|
|
|
<td class="normal"> * @param int $hydrationMode Doctrine::HYDRATE_ARRAY or Doctrine::HYDRATE_RECORD
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>934</td>
|
2007-10-24 00:21:22 +04:00
|
|
|
<td class="normal"> * @return mixed Array or Doctrine_Record or false if no result
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>935</td>
|
2007-10-24 00:21:22 +04:00
|
|
|
<td class="normal"> */
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>936</td>
|
2007-10-24 00:21:22 +04:00
|
|
|
<td class="normal"> public function find($id, $hydrationMode = null)
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>937</td>
|
2007-10-24 00:21:22 +04:00
|
|
|
<td class="normal"> {
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>938</td>
|
2007-10-24 00:21:22 +04:00
|
|
|
<td class="covered"> if (is_null($id)) {
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>939</td>
|
2007-10-24 00:21:22 +04:00
|
|
|
<td class="covered"> return false;
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>940</td>
|
2007-10-24 00:21:22 +04:00
|
|
|
<td class="orange"> }
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>941</td>
|
2007-10-24 00:21:22 +04:00
|
|
|
<td class="normal">
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>942</td>
|
2007-10-24 00:21:22 +04:00
|
|
|
<td class="covered"> $id = is_array($id) ? array_values($id) : array($id);
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>943</td>
|
2007-10-24 00:21:22 +04:00
|
|
|
<td class="normal">
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>944</td>
|
2007-10-24 00:21:22 +04:00
|
|
|
<td class="covered"> return $this->createQuery()
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>945</td>
|
2007-10-24 00:21:22 +04:00
|
|
|
<td class="covered"> ->where(implode(' = ? AND ', (array) $this->_identifier) . ' = ?')
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>946</td>
|
2007-10-24 00:21:22 +04:00
|
|
|
<td class="covered"> ->fetchOne($id, $hydrationMode);
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>947</td>
|
2007-10-24 00:21:22 +04:00
|
|
|
<td class="orange"> }
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>948</td>
|
2007-10-24 00:21:22 +04:00
|
|
|
<td class="normal">
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>949</td>
|
2007-10-24 00:21:22 +04:00
|
|
|
<td class="normal"> /**
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>950</td>
|
2007-10-24 00:21:22 +04:00
|
|
|
<td class="normal"> * findAll
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>951</td>
|
2007-10-24 00:21:22 +04:00
|
|
|
<td class="normal"> * returns a collection of records
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>952</td>
|
2007-10-24 00:21:22 +04:00
|
|
|
<td class="normal"> *
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>953</td>
|
2007-10-24 00:21:22 +04:00
|
|
|
<td class="normal"> * @param int $hydrationMode Doctrine::FETCH_ARRAY or Doctrine::FETCH_RECORD
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>954</td>
|
2007-10-24 00:21:22 +04:00
|
|
|
<td class="normal"> * @return Doctrine_Collection
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>955</td>
|
2007-10-24 00:21:22 +04:00
|
|
|
<td class="normal"> */
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>956</td>
|
2007-10-24 00:21:22 +04:00
|
|
|
<td class="normal"> public function findAll($hydrationMode = null)
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>957</td>
|
2007-10-24 00:21:22 +04:00
|
|
|
<td class="normal"> {
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>958</td>
|
2007-10-24 00:21:22 +04:00
|
|
|
<td class="covered"> return $this->createQuery()->execute(array(), $hydrationMode);
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>959</td>
|
2007-10-24 00:21:22 +04:00
|
|
|
<td class="orange"> }
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>960</td>
|
2007-10-24 00:21:22 +04:00
|
|
|
<td class="normal">
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>961</td>
|
2007-10-24 00:21:22 +04:00
|
|
|
<td class="normal"> /**
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>962</td>
|
2007-10-24 00:21:22 +04:00
|
|
|
<td class="normal"> * findByDql
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>963</td>
|
2007-10-24 00:21:22 +04:00
|
|
|
<td class="normal"> * finds records with given DQL where clause
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>964</td>
|
2007-10-24 00:21:22 +04:00
|
|
|
<td class="normal"> * returns a collection of records
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>965</td>
|
2007-10-24 00:21:22 +04:00
|
|
|
<td class="normal"> *
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>966</td>
|
2007-10-24 00:21:22 +04:00
|
|
|
<td class="normal"> * @param string $dql DQL after WHERE clause
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>967</td>
|
2007-10-24 00:21:22 +04:00
|
|
|
<td class="normal"> * @param array $params query parameters
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>968</td>
|
2007-10-24 00:21:22 +04:00
|
|
|
<td class="normal"> * @param int $hydrationMode Doctrine::FETCH_ARRAY or Doctrine::FETCH_RECORD
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>969</td>
|
2007-10-24 00:21:22 +04:00
|
|
|
<td class="normal"> * @return Doctrine_Collection
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>970</td>
|
2007-10-24 00:21:22 +04:00
|
|
|
<td class="normal"> */
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>971</td>
|
2007-10-24 00:21:22 +04:00
|
|
|
<td class="normal"> public function findBySql($dql, array $params = array(), $hydrationMode = null)
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>972</td>
|
2007-10-24 00:21:22 +04:00
|
|
|
<td class="normal"> {
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>973</td>
|
2007-10-24 00:21:22 +04:00
|
|
|
<td class="covered"> return $this->createQuery()->where($dql)->execute($params, $hydrationMode);
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>974</td>
|
2007-10-24 00:21:22 +04:00
|
|
|
<td class="orange"> }
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>975</td>
|
2007-10-24 00:21:22 +04:00
|
|
|
<td class="normal">
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>976</td>
|
2007-10-24 00:21:22 +04:00
|
|
|
<td class="normal"> public function findByDql($dql, array $params = array(), $hydrationMode = null)
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>977</td>
|
2007-10-24 00:21:22 +04:00
|
|
|
<td class="normal"> {
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>978</td>
|
2007-10-24 00:21:22 +04:00
|
|
|
<td class="covered"> return $this->findBySql($dql, $params, $hydrationMode);
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>979</td>
|
2007-10-24 00:21:22 +04:00
|
|
|
<td class="orange"> }
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>980</td>
|
2007-10-24 00:21:22 +04:00
|
|
|
<td class="normal">
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>981</td>
|
2007-10-24 00:21:22 +04:00
|
|
|
<td class="normal"> /**
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>982</td>
|
2007-10-24 00:21:22 +04:00
|
|
|
<td class="normal"> * execute
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>983</td>
|
2007-10-24 00:21:22 +04:00
|
|
|
<td class="normal"> * fetches data using the provided queryKey and
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>984</td>
|
2007-10-24 00:21:22 +04:00
|
|
|
<td class="normal"> * the associated query in the query registry
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>985</td>
|
2007-10-24 00:21:22 +04:00
|
|
|
<td class="normal"> *
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>986</td>
|
2007-10-24 00:21:22 +04:00
|
|
|
<td class="normal"> * if no query for given queryKey is being found a
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>987</td>
|
2007-10-24 00:21:22 +04:00
|
|
|
<td class="normal"> * Doctrine_Query_Registry exception is being thrown
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>988</td>
|
2007-10-24 00:21:22 +04:00
|
|
|
<td class="normal"> *
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>989</td>
|
2007-10-24 00:21:22 +04:00
|
|
|
<td class="normal"> * @param string $queryKey the query key
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>990</td>
|
2007-10-24 00:21:22 +04:00
|
|
|
<td class="normal"> * @param array $params prepared statement params (if any)
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>991</td>
|
2007-10-24 00:21:22 +04:00
|
|
|
<td class="normal"> * @return mixed the fetched data
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>992</td>
|
2007-10-24 00:21:22 +04:00
|
|
|
<td class="normal"> */
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>993</td>
|
2007-10-24 00:21:22 +04:00
|
|
|
<td class="normal"> public function execute($queryKey, $params = array(), $hydrationMode = Doctrine::HYDRATE_RECORD)
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>994</td>
|
2007-10-24 00:21:22 +04:00
|
|
|
<td class="normal"> {
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>995</td>
|
2007-10-24 00:21:22 +04:00
|
|
|
<td class="covered"> return Doctrine_Manager::getInstance()
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>996</td>
|
2007-10-24 00:21:22 +04:00
|
|
|
<td class="covered"> ->getQueryRegistry()
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>997</td>
|
2007-10-24 00:21:22 +04:00
|
|
|
<td class="covered"> ->get($queryKey, $this->getComponentName())
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>998</td>
|
2007-10-24 00:21:22 +04:00
|
|
|
<td class="covered"> ->execute($params, $hydrationMode);
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>999</td>
|
2007-10-24 00:21:22 +04:00
|
|
|
<td class="orange"> }
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>1000</td>
|
2007-10-24 00:21:22 +04:00
|
|
|
<td class="normal">
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>1001</td>
|
2007-10-24 00:21:22 +04:00
|
|
|
<td class="normal"> /**
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>1002</td>
|
2007-10-24 00:21:22 +04:00
|
|
|
<td class="normal"> * executeOne
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>1003</td>
|
2007-10-24 00:21:22 +04:00
|
|
|
<td class="normal"> * fetches data using the provided queryKey and
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>1004</td>
|
2007-10-24 00:21:22 +04:00
|
|
|
<td class="normal"> * the associated query in the query registry
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>1005</td>
|
2007-10-24 00:21:22 +04:00
|
|
|
<td class="normal"> *
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>1006</td>
|
2007-10-24 00:21:22 +04:00
|
|
|
<td class="normal"> * if no query for given queryKey is being found a
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>1007</td>
|
2007-10-24 00:21:22 +04:00
|
|
|
<td class="normal"> * Doctrine_Query_Registry exception is being thrown
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>1008</td>
|
2007-10-24 00:21:22 +04:00
|
|
|
<td class="normal"> *
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>1009</td>
|
2007-10-24 00:21:22 +04:00
|
|
|
<td class="normal"> * @param string $queryKey the query key
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>1010</td>
|
2007-10-24 00:21:22 +04:00
|
|
|
<td class="normal"> * @param array $params prepared statement params (if any)
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>1011</td>
|
2007-10-24 00:21:22 +04:00
|
|
|
<td class="normal"> * @return mixed the fetched data
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>1012</td>
|
2007-10-24 00:21:22 +04:00
|
|
|
<td class="normal"> */
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>1013</td>
|
2007-10-24 00:21:22 +04:00
|
|
|
<td class="normal"> public function executeOne($queryKey, $params = array(), $hydrationMode = Doctrine::HYDRATE_RECORD)
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>1014</td>
|
2007-10-24 00:21:22 +04:00
|
|
|
<td class="normal"> {
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>1015</td>
|
2007-10-24 00:21:22 +04:00
|
|
|
<td class="red"> return Doctrine_Manager::getInstance()
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>1016</td>
|
2007-10-24 00:21:22 +04:00
|
|
|
<td class="red"> ->getQueryRegistry()
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>1017</td>
|
2007-10-24 00:21:22 +04:00
|
|
|
<td class="red"> ->get($queryKey, $this->getComponentName())
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>1018</td>
|
2007-10-24 00:21:22 +04:00
|
|
|
<td class="red"> ->fetchOne($params, $hydrationMode);
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>1019</td>
|
2007-10-24 00:21:22 +04:00
|
|
|
<td class="orange"> }
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>1020</td>
|
2007-10-24 00:21:22 +04:00
|
|
|
<td class="normal">
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>1021</td>
|
2007-10-24 00:21:22 +04:00
|
|
|
<td class="normal"> /**
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>1022</td>
|
2007-10-24 00:21:22 +04:00
|
|
|
<td class="normal"> * clear
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>1023</td>
|
2007-10-24 00:21:22 +04:00
|
|
|
<td class="normal"> * clears the first level cache (identityMap)
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>1024</td>
|
2007-10-24 00:21:22 +04:00
|
|
|
<td class="normal"> *
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>1025</td>
|
2007-10-24 00:21:22 +04:00
|
|
|
<td class="normal"> * @return void
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>1026</td>
|
2007-10-24 00:21:22 +04:00
|
|
|
<td class="normal"> */
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>1027</td>
|
2007-10-24 00:21:22 +04:00
|
|
|
<td class="normal"> public function clear()
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>1028</td>
|
2007-10-24 00:21:22 +04:00
|
|
|
<td class="normal"> {
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>1029</td>
|
2007-10-24 00:21:22 +04:00
|
|
|
<td class="covered"> $this->_identityMap = array();
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>1030</td>
|
2007-10-24 00:21:22 +04:00
|
|
|
<td class="covered"> }
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>1031</td>
|
2007-10-24 00:21:22 +04:00
|
|
|
<td class="normal">
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>1032</td>
|
2007-10-24 00:21:22 +04:00
|
|
|
<td class="normal"> /**
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>1033</td>
|
2007-10-24 00:21:22 +04:00
|
|
|
<td class="normal"> * addRecord
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>1034</td>
|
2007-10-24 00:21:22 +04:00
|
|
|
<td class="normal"> * adds a record to identity map
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>1035</td>
|
2007-10-24 00:21:22 +04:00
|
|
|
<td class="normal"> *
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>1036</td>
|
2007-10-24 00:21:22 +04:00
|
|
|
<td class="normal"> * @param Doctrine_Record $record record to be added
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>1037</td>
|
2007-10-24 00:21:22 +04:00
|
|
|
<td class="normal"> * @return boolean
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>1038</td>
|
2007-10-24 00:21:22 +04:00
|
|
|
<td class="normal"> */
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>1039</td>
|
2007-10-24 00:21:22 +04:00
|
|
|
<td class="normal"> public function addRecord(Doctrine_Record $record)
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>1040</td>
|
2007-10-24 00:21:22 +04:00
|
|
|
<td class="normal"> {
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>1041</td>
|
2007-10-24 00:21:22 +04:00
|
|
|
<td class="covered"> $id = implode(' ', $record->identifier());
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>1042</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="normal">
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>1043</td>
|
2007-10-24 00:21:22 +04:00
|
|
|
<td class="covered"> if (isset($this->_identityMap[$id])) {
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>1044</td>
|
2007-10-24 00:21:22 +04:00
|
|
|
<td class="red"> return false;
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>1045</td>
|
2007-10-24 00:21:22 +04:00
|
|
|
<td class="orange"> }
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>1046</td>
|
2007-10-24 00:21:22 +04:00
|
|
|
<td class="normal">
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>1047</td>
|
2007-10-24 00:21:22 +04:00
|
|
|
<td class="covered"> $this->_identityMap[$id] = $record;
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>1048</td>
|
2007-10-24 00:21:22 +04:00
|
|
|
<td class="normal">
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>1049</td>
|
2007-10-24 00:21:22 +04:00
|
|
|
<td class="covered"> return true;
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>1050</td>
|
2007-10-24 00:21:22 +04:00
|
|
|
<td class="orange"> }
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>1051</td>
|
2007-10-24 00:21:22 +04:00
|
|
|
<td class="normal">
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>1052</td>
|
2007-10-24 00:21:22 +04:00
|
|
|
<td class="normal"> /**
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>1053</td>
|
2007-10-24 00:21:22 +04:00
|
|
|
<td class="normal"> * getRecord
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>1054</td>
|
2007-10-24 00:21:22 +04:00
|
|
|
<td class="normal"> * first checks if record exists in identityMap, if not
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>1055</td>
|
2007-10-24 00:21:22 +04:00
|
|
|
<td class="normal"> * returns a new record
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>1056</td>
|
2007-10-24 00:21:22 +04:00
|
|
|
<td class="normal"> *
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>1057</td>
|
2007-10-24 00:21:22 +04:00
|
|
|
<td class="normal"> * @return Doctrine_Record
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>1058</td>
|
2007-10-24 00:21:22 +04:00
|
|
|
<td class="normal"> */
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>1059</td>
|
2007-10-24 00:21:22 +04:00
|
|
|
<td class="normal"> public function getRecord()
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>1060</td>
|
2007-10-24 00:21:22 +04:00
|
|
|
<td class="normal"> {
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>1061</td>
|
2007-10-24 00:21:22 +04:00
|
|
|
<td class="covered"> if ( ! empty($this->_data)) {
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>1062</td>
|
2007-10-24 00:21:22 +04:00
|
|
|
<td class="covered"> $this->_data = array_change_key_case($this->_data, CASE_LOWER);
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>1063</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="normal">
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>1064</td>
|
2007-10-24 00:21:22 +04:00
|
|
|
<td class="covered"> $key = $this->getIdentifier();
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>1065</td>
|
2007-10-24 00:21:22 +04:00
|
|
|
<td class="normal">
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>1066</td>
|
2007-10-24 00:21:22 +04:00
|
|
|
<td class="covered"> if ( ! is_array($key)) {
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>1067</td>
|
2007-10-24 00:21:22 +04:00
|
|
|
<td class="covered"> $key = array($key);
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>1068</td>
|
2007-10-24 00:21:22 +04:00
|
|
|
<td class="covered"> }
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>1069</td>
|
2007-10-24 00:21:22 +04:00
|
|
|
<td class="normal">
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>1070</td>
|
2007-10-24 00:21:22 +04:00
|
|
|
<td class="covered"> $found = false;
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>1071</td>
|
2007-10-24 00:21:22 +04:00
|
|
|
<td class="covered"> foreach ($key as $k) {
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>1072</td>
|
2007-10-24 00:21:22 +04:00
|
|
|
<td class="covered"> if ( ! isset($this->_data[$k])) {
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>1073</td>
|
2007-10-24 00:21:22 +04:00
|
|
|
<td class="normal"> // primary key column not found return new record
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>1074</td>
|
2007-10-24 00:21:22 +04:00
|
|
|
<td class="covered"> $found = true;
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>1075</td>
|
2007-10-24 00:21:22 +04:00
|
|
|
<td class="covered"> break;
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>1076</td>
|
2007-10-24 00:21:22 +04:00
|
|
|
<td class="orange"> }
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>1077</td>
|
2007-10-24 00:21:22 +04:00
|
|
|
<td class="covered"> $id[] = $this->_data[$k];
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>1078</td>
|
2007-10-24 00:21:22 +04:00
|
|
|
<td class="covered"> }
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>1079</td>
|
2007-10-24 00:21:22 +04:00
|
|
|
<td class="normal">
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>1080</td>
|
2007-10-24 00:21:22 +04:00
|
|
|
<td class="covered"> if ($found) {
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>1081</td>
|
2007-10-24 00:21:22 +04:00
|
|
|
<td class="covered"> $recordName = $this->getClassnameToReturn();
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>1082</td>
|
2007-10-24 00:21:22 +04:00
|
|
|
<td class="covered"> $record = new $recordName($this, true);
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>1083</td>
|
2007-10-24 00:21:22 +04:00
|
|
|
<td class="covered"> $this->_data = array();
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>1084</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="normal">
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>1085</td>
|
2007-10-24 00:21:22 +04:00
|
|
|
<td class="covered"> return $record;
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>1086</td>
|
2007-10-24 00:21:22 +04:00
|
|
|
<td class="orange"> }
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>1087</td>
|
2007-10-24 00:21:22 +04:00
|
|
|
<td class="normal">
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>1088</td>
|
2007-10-24 00:21:22 +04:00
|
|
|
<td class="normal">
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>1089</td>
|
2007-10-24 00:21:22 +04:00
|
|
|
<td class="covered"> $id = implode(' ', $id);
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>1090</td>
|
2007-10-24 00:21:22 +04:00
|
|
|
<td class="normal">
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>1091</td>
|
2007-10-24 00:21:22 +04:00
|
|
|
<td class="covered"> if (isset($this->_identityMap[$id])) {
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>1092</td>
|
2007-10-24 00:21:22 +04:00
|
|
|
<td class="covered"> $record = $this->_identityMap[$id];
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>1093</td>
|
2007-10-24 00:21:22 +04:00
|
|
|
<td class="covered"> $record->hydrate($this->_data);
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>1094</td>
|
2007-10-24 00:21:22 +04:00
|
|
|
<td class="covered"> } else {
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>1095</td>
|
2007-10-24 00:21:22 +04:00
|
|
|
<td class="covered"> $recordName = $this->getClassnameToReturn();
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>1096</td>
|
2007-10-24 00:21:22 +04:00
|
|
|
<td class="covered"> $record = new $recordName($this);
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>1097</td>
|
2007-10-24 00:21:22 +04:00
|
|
|
<td class="covered"> $this->_identityMap[$id] = $record;
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>1098</td>
|
2007-10-24 00:21:22 +04:00
|
|
|
<td class="normal"> }
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>1099</td>
|
2007-10-24 00:21:22 +04:00
|
|
|
<td class="covered"> $this->_data = array();
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>1100</td>
|
2007-10-24 00:21:22 +04:00
|
|
|
<td class="covered"> } else {
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>1101</td>
|
2007-10-24 00:21:22 +04:00
|
|
|
<td class="red"> $recordName = $this->getClassnameToReturn();
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>1102</td>
|
2007-10-24 00:21:22 +04:00
|
|
|
<td class="red"> $record = new $recordName($this, true);
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>1103</td>
|
2007-10-24 00:21:22 +04:00
|
|
|
<td class="normal"> }
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>1104</td>
|
2007-10-24 00:21:22 +04:00
|
|
|
<td class="normal">
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>1105</td>
|
2007-10-24 00:21:22 +04:00
|
|
|
<td class="normal">
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>1106</td>
|
2007-10-24 00:21:22 +04:00
|
|
|
<td class="covered"> return $record;
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>1107</td>
|
2007-10-24 00:21:22 +04:00
|
|
|
<td class="orange"> }
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>1108</td>
|
2007-10-24 00:21:22 +04:00
|
|
|
<td class="normal">
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>1109</td>
|
2007-10-24 00:21:22 +04:00
|
|
|
<td class="normal"> /**
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>1110</td>
|
2007-10-24 00:21:22 +04:00
|
|
|
<td class="normal"> * Get the classname to return. Most often this is just the options['name']
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>1111</td>
|
2007-10-24 00:21:22 +04:00
|
|
|
<td class="normal"> *
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>1112</td>
|
2007-10-24 00:21:22 +04:00
|
|
|
<td class="normal"> * Check the subclasses option and the inheritanceMap for each subclass to see
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>1113</td>
|
2007-10-24 00:21:22 +04:00
|
|
|
<td class="normal"> * if all the maps in a subclass is met. If this is the case return that
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>1114</td>
|
2007-10-24 00:21:22 +04:00
|
|
|
<td class="normal"> * subclass name. If no subclasses match or if there are no subclasses defined
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>1115</td>
|
2007-10-24 00:21:22 +04:00
|
|
|
<td class="normal"> * return the name of the class for this tables record.
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>1116</td>
|
2007-10-24 00:21:22 +04:00
|
|
|
<td class="normal"> *
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>1117</td>
|
2007-10-24 00:21:22 +04:00
|
|
|
<td class="normal"> * @todo this function could use reflection to check the first time it runs
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>1118</td>
|
2007-10-24 00:21:22 +04:00
|
|
|
<td class="normal"> * if the subclassing option is not set.
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>1119</td>
|
2007-10-24 00:21:22 +04:00
|
|
|
<td class="normal"> *
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>1120</td>
|
2007-10-24 00:21:22 +04:00
|
|
|
<td class="normal"> * @return string The name of the class to create
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>1121</td>
|
2007-10-24 00:21:22 +04:00
|
|
|
<td class="normal"> *
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>1122</td>
|
2007-10-24 00:21:22 +04:00
|
|
|
<td class="normal"> */
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>1123</td>
|
2007-10-24 00:21:22 +04:00
|
|
|
<td class="normal"> public function getClassnameToReturn()
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>1124</td>
|
2007-10-24 00:21:22 +04:00
|
|
|
<td class="normal"> {
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>1125</td>
|
2007-10-24 00:21:22 +04:00
|
|
|
<td class="covered"> if ( ! isset($this->_options['subclasses'])) {
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>1126</td>
|
2007-10-24 00:21:22 +04:00
|
|
|
<td class="covered"> return $this->_options['name'];
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>1127</td>
|
2007-10-24 00:21:22 +04:00
|
|
|
<td class="orange"> }
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>1128</td>
|
2007-10-24 00:21:22 +04:00
|
|
|
<td class="covered"> foreach ($this->_options['subclasses'] as $subclass) {
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>1129</td>
|
2007-10-24 00:21:22 +04:00
|
|
|
<td class="covered"> $table = $this->_conn->getTable($subclass);
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>1130</td>
|
2007-10-24 00:21:22 +04:00
|
|
|
<td class="covered"> $inheritanceMap = $table->getOption('inheritanceMap');
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>1131</td>
|
2007-10-24 00:21:22 +04:00
|
|
|
<td class="covered"> $nomatch = false;
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>1132</td>
|
2007-10-24 00:21:22 +04:00
|
|
|
<td class="covered"> foreach ($inheritanceMap as $key => $value) {
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>1133</td>
|
2007-10-24 00:21:22 +04:00
|
|
|
<td class="covered"> if ( ! isset($this->_data[$key]) || $this->_data[$key] != $value) {
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>1134</td>
|
2007-10-24 00:21:22 +04:00
|
|
|
<td class="covered"> $nomatch = true;
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>1135</td>
|
2007-10-24 00:21:22 +04:00
|
|
|
<td class="covered"> break;
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>1136</td>
|
2007-10-24 00:21:22 +04:00
|
|
|
<td class="orange"> }
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>1137</td>
|
2007-10-24 00:21:22 +04:00
|
|
|
<td class="covered"> }
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>1138</td>
|
2007-10-24 00:21:22 +04:00
|
|
|
<td class="covered"> if ( ! $nomatch) {
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>1139</td>
|
2007-10-24 00:21:22 +04:00
|
|
|
<td class="covered"> return $table->getComponentName();
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>1140</td>
|
2007-10-24 00:21:22 +04:00
|
|
|
<td class="orange"> }
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>1141</td>
|
2007-10-24 00:21:22 +04:00
|
|
|
<td class="covered"> }
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>1142</td>
|
2007-10-24 00:21:22 +04:00
|
|
|
<td class="covered"> return $this->_options['name'];
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>1143</td>
|
2007-10-24 00:21:22 +04:00
|
|
|
<td class="orange"> }
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>1144</td>
|
2007-10-24 00:21:22 +04:00
|
|
|
<td class="normal">
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>1145</td>
|
2007-10-24 00:21:22 +04:00
|
|
|
<td class="normal"> /**
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>1146</td>
|
2007-10-24 00:21:22 +04:00
|
|
|
<td class="normal"> * @param $id database row id
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>1147</td>
|
2007-10-24 00:21:22 +04:00
|
|
|
<td class="normal"> * @throws Doctrine_Find_Exception
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>1148</td>
|
2007-10-24 00:21:22 +04:00
|
|
|
<td class="normal"> */
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>1149</td>
|
2007-10-24 00:21:22 +04:00
|
|
|
<td class="normal"> final public function getProxy($id = null)
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>1150</td>
|
2007-10-24 00:21:22 +04:00
|
|
|
<td class="normal"> {
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>1151</td>
|
2007-10-24 00:21:22 +04:00
|
|
|
<td class="covered"> if ($id !== null) {
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>1152</td>
|
2007-10-24 00:21:22 +04:00
|
|
|
<td class="covered"> $query = 'SELECT ' . implode(', ', (array) $this->_identifier)
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>1153</td>
|
2007-10-24 00:21:22 +04:00
|
|
|
<td class="covered"> . ' FROM ' . $this->getTableName()
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>1154</td>
|
2007-10-24 00:21:22 +04:00
|
|
|
<td class="covered"> . ' WHERE ' . implode(' = ? && ', (array) $this->_identifier) . ' = ?';
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>1155</td>
|
2007-10-24 00:21:22 +04:00
|
|
|
<td class="covered"> $query = $this->applyInheritance($query);
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>1156</td>
|
2007-10-24 00:21:22 +04:00
|
|
|
<td class="normal">
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>1157</td>
|
2007-10-24 00:21:22 +04:00
|
|
|
<td class="covered"> $params = array_merge(array($id), array_values($this->_options['inheritanceMap']));
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>1158</td>
|
2007-10-24 00:21:22 +04:00
|
|
|
<td class="normal">
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>1159</td>
|
2007-10-24 00:21:22 +04:00
|
|
|
<td class="covered"> $this->_data = $this->_conn->execute($query, $params)->fetch(PDO::FETCH_ASSOC);
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>1160</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="normal">
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>1161</td>
|
2007-10-24 00:21:22 +04:00
|
|
|
<td class="covered"> if ($this->_data === false)
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>1162</td>
|
2007-10-24 00:21:22 +04:00
|
|
|
<td class="covered"> return false;
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>1163</td>
|
2007-10-24 00:21:22 +04:00
|
|
|
<td class="covered"> }
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>1164</td>
|
2007-10-24 00:21:22 +04:00
|
|
|
<td class="covered"> return $this->getRecord();
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>1165</td>
|
2007-10-24 00:21:22 +04:00
|
|
|
<td class="orange"> }
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>1166</td>
|
2007-10-24 00:21:22 +04:00
|
|
|
<td class="normal">
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>1167</td>
|
2007-10-24 00:21:22 +04:00
|
|
|
<td class="normal"> /**
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>1168</td>
|
2007-10-24 00:21:22 +04:00
|
|
|
<td class="normal"> * applyInheritance
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>1169</td>
|
2007-10-24 00:21:22 +04:00
|
|
|
<td class="normal"> * @param $where query where part to be modified
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>1170</td>
|
2007-10-24 00:21:22 +04:00
|
|
|
<td class="normal"> * @return string query where part with column aggregation inheritance added
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>1171</td>
|
2007-10-24 00:21:22 +04:00
|
|
|
<td class="normal"> */
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>1172</td>
|
2007-10-24 00:21:22 +04:00
|
|
|
<td class="normal"> final public function applyInheritance($where)
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>1173</td>
|
2007-10-24 00:21:22 +04:00
|
|
|
<td class="normal"> {
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>1174</td>
|
2007-10-24 00:21:22 +04:00
|
|
|
<td class="covered"> if ( ! empty($this->_options['inheritanceMap'])) {
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>1175</td>
|
2007-10-24 00:21:22 +04:00
|
|
|
<td class="covered"> $a = array();
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>1176</td>
|
2007-10-24 00:21:22 +04:00
|
|
|
<td class="covered"> foreach ($this->_options['inheritanceMap'] as $field => $value) {
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>1177</td>
|
2007-10-24 00:21:22 +04:00
|
|
|
<td class="covered"> $a[] = $field . ' = ?';
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>1178</td>
|
2007-10-24 00:21:22 +04:00
|
|
|
<td class="covered"> }
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>1179</td>
|
2007-10-24 00:21:22 +04:00
|
|
|
<td class="covered"> $i = implode(' AND ', $a);
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>1180</td>
|
2007-10-24 00:21:22 +04:00
|
|
|
<td class="covered"> $where .= ' AND ' . $i;
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>1181</td>
|
2007-10-24 00:21:22 +04:00
|
|
|
<td class="covered"> }
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>1182</td>
|
2007-10-24 00:21:22 +04:00
|
|
|
<td class="covered"> return $where;
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>1183</td>
|
2007-10-24 00:21:22 +04:00
|
|
|
<td class="orange"> }
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>1184</td>
|
2007-10-24 00:21:22 +04:00
|
|
|
<td class="normal">
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>1185</td>
|
2007-10-24 00:21:22 +04:00
|
|
|
<td class="normal"> /**
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>1186</td>
|
2007-10-24 00:21:22 +04:00
|
|
|
<td class="normal"> * count
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>1187</td>
|
2007-10-24 00:21:22 +04:00
|
|
|
<td class="normal"> *
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>1188</td>
|
2007-10-24 00:21:22 +04:00
|
|
|
<td class="normal"> * @return integer
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>1189</td>
|
2007-10-24 00:21:22 +04:00
|
|
|
<td class="normal"> */
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>1190</td>
|
2007-10-24 00:21:22 +04:00
|
|
|
<td class="normal"> public function count()
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>1191</td>
|
2007-10-24 00:21:22 +04:00
|
|
|
<td class="normal"> {
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>1192</td>
|
2007-10-24 00:21:22 +04:00
|
|
|
<td class="red"> $a = $this->_conn->execute('SELECT COUNT(1) FROM ' . $this->_options['tableName'])->fetch(Doctrine::FETCH_NUM);
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>1193</td>
|
2007-10-24 00:21:22 +04:00
|
|
|
<td class="red"> return current($a);
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>1194</td>
|
2007-10-24 00:21:22 +04:00
|
|
|
<td class="orange"> }
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>1195</td>
|
2007-10-24 00:21:22 +04:00
|
|
|
<td class="normal">
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>1196</td>
|
2007-10-24 00:21:22 +04:00
|
|
|
<td class="normal"> /**
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>1197</td>
|
2007-10-24 00:21:22 +04:00
|
|
|
<td class="normal"> * @return Doctrine_Query a Doctrine_Query object
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>1198</td>
|
2007-10-24 00:21:22 +04:00
|
|
|
<td class="normal"> */
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>1199</td>
|
2007-10-24 00:21:22 +04:00
|
|
|
<td class="normal"> public function getQueryObject()
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>1200</td>
|
2007-10-24 00:21:22 +04:00
|
|
|
<td class="normal"> {
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>1201</td>
|
2007-10-24 00:21:22 +04:00
|
|
|
<td class="red"> $graph = new Doctrine_Query($this->getConnection());
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>1202</td>
|
2007-10-24 00:21:22 +04:00
|
|
|
<td class="red"> $graph->load($this->getComponentName());
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>1203</td>
|
2007-10-24 00:21:22 +04:00
|
|
|
<td class="red"> return $graph;
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>1204</td>
|
2007-10-24 00:21:22 +04:00
|
|
|
<td class="orange"> }
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>1205</td>
|
2007-10-24 00:21:22 +04:00
|
|
|
<td class="normal">
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>1206</td>
|
2007-10-24 00:21:22 +04:00
|
|
|
<td class="normal"> /**
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>1207</td>
|
2007-10-24 00:21:22 +04:00
|
|
|
<td class="normal"> * @param string $field
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>1208</td>
|
2007-10-24 00:21:22 +04:00
|
|
|
<td class="normal"> * @return array
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>1209</td>
|
2007-10-24 00:21:22 +04:00
|
|
|
<td class="normal"> */
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>1210</td>
|
2007-10-24 00:21:22 +04:00
|
|
|
<td class="normal"> public function getEnumValues($field)
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>1211</td>
|
2007-10-24 00:21:22 +04:00
|
|
|
<td class="normal"> {
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>1212</td>
|
2007-10-24 00:21:22 +04:00
|
|
|
<td class="covered"> if (isset($this->_columns[$field]['values'])) {
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>1213</td>
|
2007-10-24 00:21:22 +04:00
|
|
|
<td class="covered"> return $this->_columns[$field]['values'];
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>1214</td>
|
2007-10-24 00:21:22 +04:00
|
|
|
<td class="orange"> } else {
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>1215</td>
|
2007-10-24 00:21:22 +04:00
|
|
|
<td class="covered"> return array();
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>1216</td>
|
2007-10-24 00:21:22 +04:00
|
|
|
<td class="normal"> }
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>1217</td>
|
2007-10-24 00:21:22 +04:00
|
|
|
<td class="orange"> }
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>1218</td>
|
2007-10-24 00:21:22 +04:00
|
|
|
<td class="normal">
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>1219</td>
|
2007-10-24 00:21:22 +04:00
|
|
|
<td class="normal"> /**
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>1220</td>
|
2007-10-24 00:21:22 +04:00
|
|
|
<td class="normal"> * enumValue
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>1221</td>
|
2007-10-24 00:21:22 +04:00
|
|
|
<td class="normal"> *
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>1222</td>
|
2007-10-24 00:21:22 +04:00
|
|
|
<td class="normal"> * @param string $field
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>1223</td>
|
2007-10-24 00:21:22 +04:00
|
|
|
<td class="normal"> * @param integer $index
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>1224</td>
|
2007-10-24 00:21:22 +04:00
|
|
|
<td class="normal"> * @return mixed
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>1225</td>
|
2007-10-24 00:21:22 +04:00
|
|
|
<td class="normal"> */
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>1226</td>
|
2007-10-24 00:21:22 +04:00
|
|
|
<td class="normal"> public function enumValue($field, $index)
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>1227</td>
|
2007-10-24 00:21:22 +04:00
|
|
|
<td class="normal"> {
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>1228</td>
|
2007-10-24 00:21:22 +04:00
|
|
|
<td class="covered"> if ($index instanceof Doctrine_Null) {
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>1229</td>
|
2007-10-24 00:21:22 +04:00
|
|
|
<td class="red"> return $index;
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>1230</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="orange"> }
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>1231</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="normal">
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>1232</td>
|
2007-10-24 00:21:22 +04:00
|
|
|
<td class="covered"> if ( ! $this->_conn->getAttribute(Doctrine::ATTR_USE_NATIVE_ENUM)
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>1233</td>
|
2007-10-24 00:21:22 +04:00
|
|
|
<td class="red"> && isset($this->_columns[$field]['values'][$index])
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>1234</td>
|
2007-10-24 00:21:22 +04:00
|
|
|
<td class="covered"> ) {
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>1235</td>
|
2007-10-24 00:21:22 +04:00
|
|
|
<td class="covered"> return $this->_columns[$field]['values'][$index];
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>1236</td>
|
2007-10-24 00:21:22 +04:00
|
|
|
<td class="orange"> }
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>1237</td>
|
2007-10-24 00:21:22 +04:00
|
|
|
<td class="normal">
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>1238</td>
|
2007-10-24 00:21:22 +04:00
|
|
|
<td class="red"> return $index;
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>1239</td>
|
2007-10-24 00:21:22 +04:00
|
|
|
<td class="orange"> }
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>1240</td>
|
2007-10-24 00:21:22 +04:00
|
|
|
<td class="normal">
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>1241</td>
|
2007-10-24 00:21:22 +04:00
|
|
|
<td class="normal"> /**
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>1242</td>
|
2007-10-24 00:21:22 +04:00
|
|
|
<td class="normal"> * enumIndex
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>1243</td>
|
2007-10-24 00:21:22 +04:00
|
|
|
<td class="normal"> *
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>1244</td>
|
2007-10-24 00:21:22 +04:00
|
|
|
<td class="normal"> * @param string $field
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>1245</td>
|
2007-10-24 00:21:22 +04:00
|
|
|
<td class="normal"> * @param mixed $value
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>1246</td>
|
2007-10-24 00:21:22 +04:00
|
|
|
<td class="normal"> * @return mixed
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>1247</td>
|
2007-10-24 00:21:22 +04:00
|
|
|
<td class="normal"> */
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>1248</td>
|
2007-10-24 00:21:22 +04:00
|
|
|
<td class="normal"> public function enumIndex($field, $value)
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>1249</td>
|
2007-10-24 00:21:22 +04:00
|
|
|
<td class="normal"> {
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>1250</td>
|
2007-10-24 00:21:22 +04:00
|
|
|
<td class="covered"> $values = $this->getEnumValues($field);
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>1251</td>
|
2007-10-24 00:21:22 +04:00
|
|
|
<td class="normal">
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>1252</td>
|
2007-10-24 00:21:22 +04:00
|
|
|
<td class="covered"> $index = array_search($value, $values);
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>1253</td>
|
2007-10-24 00:21:22 +04:00
|
|
|
<td class="covered"> if ($index === false || !$this->_conn->getAttribute(Doctrine::ATTR_USE_NATIVE_ENUM)) {
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>1254</td>
|
2007-10-24 00:21:22 +04:00
|
|
|
<td class="covered"> return $index;
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>1255</td>
|
2007-10-24 00:21:22 +04:00
|
|
|
<td class="orange"> }
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>1256</td>
|
2007-10-24 00:21:22 +04:00
|
|
|
<td class="red"> return $value;
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>1257</td>
|
2007-10-24 00:21:22 +04:00
|
|
|
<td class="orange"> }
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>1258</td>
|
2007-10-24 00:21:22 +04:00
|
|
|
<td class="normal"> /* getColumnCount
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>1259</td>
|
2007-10-24 00:21:22 +04:00
|
|
|
<td class="normal"> *
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>1260</td>
|
2007-10-24 00:21:22 +04:00
|
|
|
<td class="normal"> * @return integer the number of columns in this table
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>1261</td>
|
2007-10-24 00:21:22 +04:00
|
|
|
<td class="normal"> */
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>1262</td>
|
2007-10-24 00:21:22 +04:00
|
|
|
<td class="normal"> public function getColumnCount()
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>1263</td>
|
2007-10-24 00:21:22 +04:00
|
|
|
<td class="normal"> {
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>1264</td>
|
2007-10-24 00:21:22 +04:00
|
|
|
<td class="covered"> return $this->columnCount;
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>1265</td>
|
2007-10-24 00:21:22 +04:00
|
|
|
<td class="orange"> }
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>1266</td>
|
2007-10-24 00:21:22 +04:00
|
|
|
<td class="normal">
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>1267</td>
|
2007-10-24 00:21:22 +04:00
|
|
|
<td class="normal"> /**
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>1268</td>
|
2007-10-24 00:21:22 +04:00
|
|
|
<td class="normal"> * returns all columns and their definitions
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>1269</td>
|
2007-10-24 00:21:22 +04:00
|
|
|
<td class="normal"> *
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>1270</td>
|
2007-10-24 00:21:22 +04:00
|
|
|
<td class="normal"> * @return array
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>1271</td>
|
2007-10-24 00:21:22 +04:00
|
|
|
<td class="normal"> */
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>1272</td>
|
2007-10-24 00:21:22 +04:00
|
|
|
<td class="normal"> public function getColumns()
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>1273</td>
|
2007-10-24 00:21:22 +04:00
|
|
|
<td class="normal"> {
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>1274</td>
|
2007-10-24 00:21:22 +04:00
|
|
|
<td class="covered"> return $this->_columns;
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>1275</td>
|
2007-10-24 00:21:22 +04:00
|
|
|
<td class="orange"> }
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>1276</td>
|
2007-10-24 00:21:22 +04:00
|
|
|
<td class="normal">
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>1277</td>
|
2007-10-24 00:21:22 +04:00
|
|
|
<td class="normal"> /**
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>1278</td>
|
2007-10-24 00:21:22 +04:00
|
|
|
<td class="normal"> * removeColumn
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>1279</td>
|
2007-10-24 00:21:22 +04:00
|
|
|
<td class="normal"> * removes given column
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>1280</td>
|
2007-10-24 00:21:22 +04:00
|
|
|
<td class="normal"> *
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>1281</td>
|
2007-10-24 00:21:22 +04:00
|
|
|
<td class="normal"> * @return boolean
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>1282</td>
|
2007-10-24 00:21:22 +04:00
|
|
|
<td class="normal"> */
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>1283</td>
|
2007-10-24 00:21:22 +04:00
|
|
|
<td class="normal"> public function removeColumn($column)
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>1284</td>
|
2007-10-24 00:21:22 +04:00
|
|
|
<td class="normal"> {
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>1285</td>
|
2007-10-24 00:21:22 +04:00
|
|
|
<td class="covered"> if (isset($this->_columns[$column])) {
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>1286</td>
|
2007-10-24 00:21:22 +04:00
|
|
|
<td class="covered"> unset($this->_columns[$column]);
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>1287</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="normal">
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>1288</td>
|
2007-10-24 00:21:22 +04:00
|
|
|
<td class="covered"> return true;
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>1289</td>
|
2007-10-24 00:21:22 +04:00
|
|
|
<td class="orange"> }
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>1290</td>
|
2007-10-24 00:21:22 +04:00
|
|
|
<td class="normal">
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>1291</td>
|
2007-10-24 00:21:22 +04:00
|
|
|
<td class="red"> return false;
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>1292</td>
|
2007-10-24 00:21:22 +04:00
|
|
|
<td class="orange"> }
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>1293</td>
|
2007-10-24 00:21:22 +04:00
|
|
|
<td class="normal">
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>1294</td>
|
2007-10-24 00:21:22 +04:00
|
|
|
<td class="normal"> /**
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>1295</td>
|
2007-10-24 00:21:22 +04:00
|
|
|
<td class="normal"> * returns an array containing all the column names
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>1296</td>
|
2007-10-24 00:21:22 +04:00
|
|
|
<td class="normal"> *
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>1297</td>
|
2007-10-24 00:21:22 +04:00
|
|
|
<td class="normal"> * @return array
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>1298</td>
|
2007-10-24 00:21:22 +04:00
|
|
|
<td class="normal"> */
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>1299</td>
|
2007-10-24 00:21:22 +04:00
|
|
|
<td class="normal"> public function getColumnNames()
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>1300</td>
|
2007-10-24 00:21:22 +04:00
|
|
|
<td class="normal"> {
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>1301</td>
|
2007-10-24 00:21:22 +04:00
|
|
|
<td class="covered"> return array_keys($this->_columns);
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>1302</td>
|
2007-10-24 00:21:22 +04:00
|
|
|
<td class="orange"> }
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>1303</td>
|
2007-10-24 00:21:22 +04:00
|
|
|
<td class="normal">
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>1304</td>
|
2007-10-24 00:21:22 +04:00
|
|
|
<td class="normal"> /**
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>1305</td>
|
2007-10-24 00:21:22 +04:00
|
|
|
<td class="normal"> * getDefinitionOf
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>1306</td>
|
2007-10-24 00:21:22 +04:00
|
|
|
<td class="normal"> *
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>1307</td>
|
2007-10-24 00:21:22 +04:00
|
|
|
<td class="normal"> * @return mixed array on success, false on failure
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>1308</td>
|
2007-10-24 00:21:22 +04:00
|
|
|
<td class="normal"> */
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>1309</td>
|
2007-10-24 00:21:22 +04:00
|
|
|
<td class="normal"> public function getDefinitionOf($column)
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>1310</td>
|
2007-10-24 00:21:22 +04:00
|
|
|
<td class="normal"> {
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>1311</td>
|
2007-10-24 00:21:22 +04:00
|
|
|
<td class="covered"> if (isset($this->_columns[$column])) {
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>1312</td>
|
2007-10-24 00:21:22 +04:00
|
|
|
<td class="covered"> return $this->_columns[$column];
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>1313</td>
|
2007-10-24 00:21:22 +04:00
|
|
|
<td class="orange"> }
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>1314</td>
|
2007-10-24 00:21:22 +04:00
|
|
|
<td class="covered"> return false;
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>1315</td>
|
2007-10-24 00:21:22 +04:00
|
|
|
<td class="orange"> }
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>1316</td>
|
2007-10-24 00:21:22 +04:00
|
|
|
<td class="normal">
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>1317</td>
|
2007-10-24 00:21:22 +04:00
|
|
|
<td class="normal"> /**
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>1318</td>
|
2007-10-24 00:21:22 +04:00
|
|
|
<td class="normal"> * getTypeOf
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>1319</td>
|
2007-10-24 00:21:22 +04:00
|
|
|
<td class="normal"> *
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>1320</td>
|
2007-10-24 00:21:22 +04:00
|
|
|
<td class="normal"> * @return mixed string on success, false on failure
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>1321</td>
|
2007-10-24 00:21:22 +04:00
|
|
|
<td class="normal"> */
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>1322</td>
|
2007-10-24 00:21:22 +04:00
|
|
|
<td class="normal"> public function getTypeOf($column)
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>1323</td>
|
2007-10-24 00:21:22 +04:00
|
|
|
<td class="normal"> {
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>1324</td>
|
2007-10-24 00:21:22 +04:00
|
|
|
<td class="covered"> if (isset($this->_columns[$column])) {
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>1325</td>
|
2007-10-24 00:21:22 +04:00
|
|
|
<td class="covered"> return $this->_columns[$column]['type'];
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>1326</td>
|
2007-10-24 00:21:22 +04:00
|
|
|
<td class="orange"> }
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>1327</td>
|
2007-10-24 00:21:22 +04:00
|
|
|
<td class="covered"> return false;
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>1328</td>
|
2007-10-24 00:21:22 +04:00
|
|
|
<td class="orange"> }
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>1329</td>
|
2007-10-24 00:21:22 +04:00
|
|
|
<td class="normal">
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>1330</td>
|
2007-10-24 00:21:22 +04:00
|
|
|
<td class="normal"> /**
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>1331</td>
|
2007-10-24 00:21:22 +04:00
|
|
|
<td class="normal"> * setData
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>1332</td>
|
2007-10-24 00:21:22 +04:00
|
|
|
<td class="normal"> * doctrine uses this function internally
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>1333</td>
|
2007-10-24 00:21:22 +04:00
|
|
|
<td class="normal"> * users are strongly discouraged to use this function
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>1334</td>
|
2007-10-24 00:21:22 +04:00
|
|
|
<td class="normal"> *
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>1335</td>
|
2007-10-24 00:21:22 +04:00
|
|
|
<td class="normal"> * @param array $data internal data
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>1336</td>
|
2007-10-24 00:21:22 +04:00
|
|
|
<td class="normal"> * @return void
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>1337</td>
|
2007-10-24 00:21:22 +04:00
|
|
|
<td class="normal"> */
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>1338</td>
|
2007-10-24 00:21:22 +04:00
|
|
|
<td class="normal"> public function setData(array $data)
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>1339</td>
|
2007-10-24 00:21:22 +04:00
|
|
|
<td class="normal"> {
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>1340</td>
|
2007-10-24 00:21:22 +04:00
|
|
|
<td class="covered"> $this->_data = $data;
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>1341</td>
|
2007-10-24 00:21:22 +04:00
|
|
|
<td class="covered"> }
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>1342</td>
|
2007-10-24 00:21:22 +04:00
|
|
|
<td class="normal">
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>1343</td>
|
2007-10-24 00:21:22 +04:00
|
|
|
<td class="normal"> /**
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>1344</td>
|
2007-10-24 00:21:22 +04:00
|
|
|
<td class="normal"> * returns internal data, used by Doctrine_Record instances
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>1345</td>
|
2007-10-24 00:21:22 +04:00
|
|
|
<td class="normal"> * when retrieving data from database
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>1346</td>
|
2007-10-24 00:21:22 +04:00
|
|
|
<td class="normal"> *
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>1347</td>
|
2007-10-24 00:21:22 +04:00
|
|
|
<td class="normal"> * @return array
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>1348</td>
|
2007-10-24 00:21:22 +04:00
|
|
|
<td class="normal"> */
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>1349</td>
|
2007-10-24 00:21:22 +04:00
|
|
|
<td class="normal"> public function getData()
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>1350</td>
|
2007-10-24 00:21:22 +04:00
|
|
|
<td class="normal"> {
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>1351</td>
|
2007-10-24 00:21:22 +04:00
|
|
|
<td class="covered"> return $this->_data;
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>1352</td>
|
2007-10-24 00:21:22 +04:00
|
|
|
<td class="orange"> }
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>1353</td>
|
2007-10-24 00:21:22 +04:00
|
|
|
<td class="normal">
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>1354</td>
|
2007-10-24 00:21:22 +04:00
|
|
|
<td class="normal"> /**
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>1355</td>
|
2007-10-24 00:21:22 +04:00
|
|
|
<td class="normal"> * prepareValue
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>1356</td>
|
2007-10-24 00:21:22 +04:00
|
|
|
<td class="normal"> * this method performs special data preparation depending on
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>1357</td>
|
2007-10-24 00:21:22 +04:00
|
|
|
<td class="normal"> * the type of the given column
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>1358</td>
|
2007-10-24 00:21:22 +04:00
|
|
|
<td class="normal"> *
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>1359</td>
|
2007-10-24 00:21:22 +04:00
|
|
|
<td class="normal"> * 1. It unserializes array and object typed columns
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>1360</td>
|
2007-10-24 00:21:22 +04:00
|
|
|
<td class="normal"> * 2. Uncompresses gzip typed columns
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>1361</td>
|
2007-10-24 00:21:22 +04:00
|
|
|
<td class="normal"> * 3. Gets the appropriate enum values for enum typed columns
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>1362</td>
|
2007-10-24 00:21:22 +04:00
|
|
|
<td class="normal"> * 4. Initializes special null object pointer for null values (for fast column existence checking purposes)
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>1363</td>
|
2007-10-24 00:21:22 +04:00
|
|
|
<td class="normal"> *
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>1364</td>
|
2007-10-24 00:21:22 +04:00
|
|
|
<td class="normal"> * example:
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>1365</td>
|
2007-10-24 00:21:22 +04:00
|
|
|
<td class="normal"> * <code type='php'>
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>1366</td>
|
2007-10-24 00:21:22 +04:00
|
|
|
<td class="normal"> * $field = 'name';
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>1367</td>
|
2007-10-24 00:21:22 +04:00
|
|
|
<td class="normal"> * $value = null;
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>1368</td>
|
2007-10-24 00:21:22 +04:00
|
|
|
<td class="normal"> * $table->prepareValue($field, $value); // Doctrine_Null
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>1369</td>
|
2007-10-24 00:21:22 +04:00
|
|
|
<td class="normal"> * </code>
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>1370</td>
|
2007-10-24 00:21:22 +04:00
|
|
|
<td class="normal"> *
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>1371</td>
|
2007-10-24 00:21:22 +04:00
|
|
|
<td class="normal"> * @throws Doctrine_Table_Exception if unserialization of array/object typed column fails or
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>1372</td>
|
2007-10-24 00:21:22 +04:00
|
|
|
<td class="normal"> * @throws Doctrine_Table_Exception if uncompression of gzip typed column fails *
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>1373</td>
|
2007-10-24 00:21:22 +04:00
|
|
|
<td class="normal"> * @param string $field the name of the field
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>1374</td>
|
2007-10-24 00:21:22 +04:00
|
|
|
<td class="normal"> * @param string $value field value
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>1375</td>
|
2007-10-24 00:21:22 +04:00
|
|
|
<td class="normal"> * @return mixed prepared value
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>1376</td>
|
2007-10-24 00:21:22 +04:00
|
|
|
<td class="normal"> */
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>1377</td>
|
2007-10-24 00:21:22 +04:00
|
|
|
<td class="normal"> public function prepareValue($field, $value)
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>1378</td>
|
2007-10-24 00:21:22 +04:00
|
|
|
<td class="normal"> {
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>1379</td>
|
2007-10-24 00:21:22 +04:00
|
|
|
<td class="covered"> if ($value === self::$_null) {
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>1380</td>
|
2007-10-24 00:21:22 +04:00
|
|
|
<td class="red"> return self::$_null;
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>1381</td>
|
2007-10-24 00:21:22 +04:00
|
|
|
<td class="covered"> } elseif ($value === null) {
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>1382</td>
|
2007-10-24 00:21:22 +04:00
|
|
|
<td class="covered"> return null;
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>1383</td>
|
2007-10-24 00:21:22 +04:00
|
|
|
<td class="orange"> } else {
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>1384</td>
|
2007-10-24 00:21:22 +04:00
|
|
|
<td class="covered"> $type = $this->getTypeOf($field);
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>1385</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="normal">
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>1386</td>
|
2007-10-24 00:21:22 +04:00
|
|
|
<td class="normal"> switch ($type) {
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>1387</td>
|
2007-10-24 00:21:22 +04:00
|
|
|
<td class="covered"> case 'array':
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>1388</td>
|
2007-10-24 00:21:22 +04:00
|
|
|
<td class="covered"> case 'object':
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>1389</td>
|
2007-10-24 00:21:22 +04:00
|
|
|
<td class="covered"> if (is_string($value)) {
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>1390</td>
|
2007-10-24 00:21:22 +04:00
|
|
|
<td class="covered"> $value = unserialize($value);
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>1391</td>
|
2007-10-24 00:21:22 +04:00
|
|
|
<td class="normal">
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>1392</td>
|
2007-10-24 00:21:22 +04:00
|
|
|
<td class="covered"> if ($value === false) {
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>1393</td>
|
2007-10-24 00:21:22 +04:00
|
|
|
<td class="red"> throw new Doctrine_Table_Exception('Unserialization of ' . $field . ' failed.');
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>1394</td>
|
2007-10-24 00:21:22 +04:00
|
|
|
<td class="orange"> }
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>1395</td>
|
2007-10-24 00:21:22 +04:00
|
|
|
<td class="covered"> return $value;
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>1396</td>
|
2007-10-24 00:21:22 +04:00
|
|
|
<td class="orange"> }
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>1397</td>
|
2007-10-24 00:21:22 +04:00
|
|
|
<td class="red"> break;
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>1398</td>
|
2007-10-24 00:21:22 +04:00
|
|
|
<td class="covered"> case 'gzip':
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>1399</td>
|
2007-10-24 00:21:22 +04:00
|
|
|
<td class="covered"> $value = gzuncompress($value);
|
|
|
|
</td></tr>
|
|
|
|
<tr><td>1400</td>
|
|
|
|
<td class="normal">
|
|
|
|
</td></tr>
|
|
|
|
<tr><td>1401</td>
|
|
|
|
<td class="covered"> if ($value === false) {
|
|
|
|
</td></tr>
|
|
|
|
<tr><td>1402</td>
|
|
|
|
<td class="red"> throw new Doctrine_Table_Exception('Uncompressing of ' . $field . ' failed.');
|
|
|
|
</td></tr>
|
|
|
|
<tr><td>1403</td>
|
|
|
|
<td class="orange"> }
|
|
|
|
</td></tr>
|
|
|
|
<tr><td>1404</td>
|
|
|
|
<td class="covered"> return $value;
|
|
|
|
</td></tr>
|
|
|
|
<tr><td>1405</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="orange"> break;
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
2007-10-24 00:21:22 +04:00
|
|
|
<tr><td>1406</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="covered"> case 'enum':
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
2007-10-24 00:21:22 +04:00
|
|
|
<tr><td>1407</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="covered"> return $this->enumValue($field, $value);
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
2007-10-24 00:21:22 +04:00
|
|
|
<tr><td>1408</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="orange"> break;
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
2007-10-24 00:21:22 +04:00
|
|
|
<tr><td>1409</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="covered"> case 'boolean':
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
2007-10-24 00:21:22 +04:00
|
|
|
<tr><td>1410</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="covered"> return (boolean) $value;
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
2007-10-24 00:21:22 +04:00
|
|
|
<tr><td>1411</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="orange"> break;
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
2007-10-24 00:21:22 +04:00
|
|
|
<tr><td>1412</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="covered"> case 'integer':
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
2007-10-24 00:21:22 +04:00
|
|
|
<tr><td>1413</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="normal"> // don't do any casting here PHP INT_MAX is smaller than what the databases support
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
2007-10-24 00:21:22 +04:00
|
|
|
<tr><td>1414</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="covered"> break;
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
2007-10-24 00:21:22 +04:00
|
|
|
<tr><td>1415</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="orange"> }
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
2007-10-24 00:21:22 +04:00
|
|
|
<tr><td>1416</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="normal"> }
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
2007-10-24 00:21:22 +04:00
|
|
|
<tr><td>1417</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="covered"> return $value;
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
2007-10-24 00:21:22 +04:00
|
|
|
<tr><td>1418</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="orange"> }
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
2007-10-24 00:21:22 +04:00
|
|
|
<tr><td>1419</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="normal">
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
2007-10-24 00:21:22 +04:00
|
|
|
<tr><td>1420</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="normal"> /**
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
2007-10-24 00:21:22 +04:00
|
|
|
<tr><td>1421</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="normal"> * getTree
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
2007-10-24 00:21:22 +04:00
|
|
|
<tr><td>1422</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="normal"> *
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
2007-10-24 00:21:22 +04:00
|
|
|
<tr><td>1423</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="normal"> * getter for associated tree
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
2007-10-24 00:21:22 +04:00
|
|
|
<tr><td>1424</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="normal"> *
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
2007-10-24 00:21:22 +04:00
|
|
|
<tr><td>1425</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="normal"> * @return mixed if tree return instance of Doctrine_Tree, otherwise returns false
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
2007-10-24 00:21:22 +04:00
|
|
|
<tr><td>1426</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="normal"> */
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
2007-10-24 00:21:22 +04:00
|
|
|
<tr><td>1427</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="normal"> public function getTree()
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
2007-10-24 00:21:22 +04:00
|
|
|
<tr><td>1428</td>
|
2007-10-14 01:45:08 +04:00
|
|
|
<td class="normal"> {
|
|
|
|
</td></tr>
|
2007-10-24 00:21:22 +04:00
|
|
|
<tr><td>1429</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="covered"> if (isset($this->_options['treeImpl'])) {
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
2007-10-24 00:21:22 +04:00
|
|
|
<tr><td>1430</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="covered"> if ( ! $this->_tree) {
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
2007-10-24 00:21:22 +04:00
|
|
|
<tr><td>1431</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="covered"> $options = isset($this->_options['treeOptions']) ? $this->_options['treeOptions'] : array();
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
2007-10-24 00:21:22 +04:00
|
|
|
<tr><td>1432</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="covered"> $this->_tree = Doctrine_Tree::factory($this,
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
2007-10-24 00:21:22 +04:00
|
|
|
<tr><td>1433</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="covered"> $this->_options['treeImpl'],
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
2007-10-24 00:21:22 +04:00
|
|
|
<tr><td>1434</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="normal"> $options
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
2007-10-24 00:21:22 +04:00
|
|
|
<tr><td>1435</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="covered"> );
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
2007-10-24 00:21:22 +04:00
|
|
|
<tr><td>1436</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="covered"> }
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
2007-10-24 00:21:22 +04:00
|
|
|
<tr><td>1437</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="covered"> return $this->_tree;
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
2007-10-24 00:21:22 +04:00
|
|
|
<tr><td>1438</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="orange"> }
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
2007-10-24 00:21:22 +04:00
|
|
|
<tr><td>1439</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="red"> return false;
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
2007-10-24 00:21:22 +04:00
|
|
|
<tr><td>1440</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="orange"> }
|
|
|
|
</td></tr>
|
2007-10-24 00:21:22 +04:00
|
|
|
<tr><td>1441</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="normal">
|
|
|
|
</td></tr>
|
2007-10-24 00:21:22 +04:00
|
|
|
<tr><td>1442</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="normal"> /**
|
|
|
|
</td></tr>
|
2007-10-24 00:21:22 +04:00
|
|
|
<tr><td>1443</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="normal"> * getComponentName
|
|
|
|
</td></tr>
|
2007-10-24 00:21:22 +04:00
|
|
|
<tr><td>1444</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="normal"> *
|
|
|
|
</td></tr>
|
2007-10-24 00:21:22 +04:00
|
|
|
<tr><td>1445</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="normal"> * @return void
|
|
|
|
</td></tr>
|
2007-10-24 00:21:22 +04:00
|
|
|
<tr><td>1446</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="normal"> */
|
|
|
|
</td></tr>
|
2007-10-24 00:21:22 +04:00
|
|
|
<tr><td>1447</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="normal"> public function getComponentName()
|
|
|
|
</td></tr>
|
2007-10-24 00:21:22 +04:00
|
|
|
<tr><td>1448</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="normal"> {
|
|
|
|
</td></tr>
|
2007-10-24 00:21:22 +04:00
|
|
|
<tr><td>1449</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="covered"> return $this->_options['name'];
|
|
|
|
</td></tr>
|
2007-10-24 00:21:22 +04:00
|
|
|
<tr><td>1450</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="orange"> }
|
|
|
|
</td></tr>
|
2007-10-24 00:21:22 +04:00
|
|
|
<tr><td>1451</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="normal">
|
|
|
|
</td></tr>
|
2007-10-24 00:21:22 +04:00
|
|
|
<tr><td>1452</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="normal"> /**
|
|
|
|
</td></tr>
|
2007-10-24 00:21:22 +04:00
|
|
|
<tr><td>1453</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="normal"> * getTableName
|
|
|
|
</td></tr>
|
2007-10-24 00:21:22 +04:00
|
|
|
<tr><td>1454</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="normal"> *
|
|
|
|
</td></tr>
|
2007-10-24 00:21:22 +04:00
|
|
|
<tr><td>1455</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="normal"> * @return void
|
|
|
|
</td></tr>
|
2007-10-24 00:21:22 +04:00
|
|
|
<tr><td>1456</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="normal"> */
|
|
|
|
</td></tr>
|
2007-10-24 00:21:22 +04:00
|
|
|
<tr><td>1457</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="normal"> public function getTableName()
|
|
|
|
</td></tr>
|
2007-10-24 00:21:22 +04:00
|
|
|
<tr><td>1458</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="normal"> {
|
|
|
|
</td></tr>
|
2007-10-24 00:21:22 +04:00
|
|
|
<tr><td>1459</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="covered"> return $this->_options['tableName'];
|
|
|
|
</td></tr>
|
2007-10-24 00:21:22 +04:00
|
|
|
<tr><td>1460</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="orange"> }
|
|
|
|
</td></tr>
|
2007-10-24 00:21:22 +04:00
|
|
|
<tr><td>1461</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="normal">
|
|
|
|
</td></tr>
|
2007-10-24 00:21:22 +04:00
|
|
|
<tr><td>1462</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="normal"> /**
|
|
|
|
</td></tr>
|
2007-10-24 00:21:22 +04:00
|
|
|
<tr><td>1463</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="normal"> * setTableName
|
|
|
|
</td></tr>
|
2007-10-24 00:21:22 +04:00
|
|
|
<tr><td>1464</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="normal"> *
|
|
|
|
</td></tr>
|
2007-10-24 00:21:22 +04:00
|
|
|
<tr><td>1465</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="normal"> * @param string $tableName
|
|
|
|
</td></tr>
|
2007-10-24 00:21:22 +04:00
|
|
|
<tr><td>1466</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="normal"> * @return void
|
|
|
|
</td></tr>
|
2007-10-24 00:21:22 +04:00
|
|
|
<tr><td>1467</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="normal"> */
|
|
|
|
</td></tr>
|
2007-10-24 00:21:22 +04:00
|
|
|
<tr><td>1468</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="normal"> public function setTableName($tableName)
|
|
|
|
</td></tr>
|
2007-10-24 00:21:22 +04:00
|
|
|
<tr><td>1469</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="normal"> {
|
|
|
|
</td></tr>
|
2007-10-24 00:21:22 +04:00
|
|
|
<tr><td>1470</td>
|
2007-11-02 19:07:11 +03:00
|
|
|
<td class="covered"> $this->setOption('tableName', $this->_conn->formatter->getTableName($tableName));
|
2007-10-21 20:12:20 +04:00
|
|
|
</td></tr>
|
2007-10-24 00:21:22 +04:00
|
|
|
<tr><td>1471</td>
|
2007-11-02 19:07:11 +03:00
|
|
|
<td class="covered"> }
|
2007-10-21 20:12:20 +04:00
|
|
|
</td></tr>
|
2007-10-24 00:21:22 +04:00
|
|
|
<tr><td>1472</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="normal">
|
|
|
|
</td></tr>
|
2007-10-24 00:21:22 +04:00
|
|
|
<tr><td>1473</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="normal"> /**
|
|
|
|
</td></tr>
|
2007-10-24 00:21:22 +04:00
|
|
|
<tr><td>1474</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="normal"> * isTree
|
|
|
|
</td></tr>
|
2007-10-24 00:21:22 +04:00
|
|
|
<tr><td>1475</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="normal"> *
|
|
|
|
</td></tr>
|
2007-10-24 00:21:22 +04:00
|
|
|
<tr><td>1476</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="normal"> * determine if table acts as tree
|
|
|
|
</td></tr>
|
2007-10-24 00:21:22 +04:00
|
|
|
<tr><td>1477</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="normal"> *
|
|
|
|
</td></tr>
|
2007-10-24 00:21:22 +04:00
|
|
|
<tr><td>1478</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="normal"> * @return mixed if tree return true, otherwise returns false
|
|
|
|
</td></tr>
|
2007-10-24 00:21:22 +04:00
|
|
|
<tr><td>1479</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="normal"> */
|
|
|
|
</td></tr>
|
2007-10-24 00:21:22 +04:00
|
|
|
<tr><td>1480</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="normal"> public function isTree()
|
|
|
|
</td></tr>
|
2007-10-24 00:21:22 +04:00
|
|
|
<tr><td>1481</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="normal"> {
|
|
|
|
</td></tr>
|
2007-10-24 00:21:22 +04:00
|
|
|
<tr><td>1482</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="covered"> return ( ! is_null($this->_options['treeImpl'])) ? true : false;
|
|
|
|
</td></tr>
|
2007-10-24 00:21:22 +04:00
|
|
|
<tr><td>1483</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="orange"> }
|
|
|
|
</td></tr>
|
2007-10-24 00:21:22 +04:00
|
|
|
<tr><td>1484</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="normal">
|
|
|
|
</td></tr>
|
2007-10-24 00:21:22 +04:00
|
|
|
<tr><td>1485</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="normal"> /**
|
|
|
|
</td></tr>
|
2007-10-24 00:21:22 +04:00
|
|
|
<tr><td>1486</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="normal"> * getTemplate
|
|
|
|
</td></tr>
|
2007-10-24 00:21:22 +04:00
|
|
|
<tr><td>1487</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="normal"> *
|
|
|
|
</td></tr>
|
2007-10-24 00:21:22 +04:00
|
|
|
<tr><td>1488</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="normal"> * @param string $template
|
|
|
|
</td></tr>
|
2007-10-24 00:21:22 +04:00
|
|
|
<tr><td>1489</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="normal"> * @return void
|
|
|
|
</td></tr>
|
2007-10-24 00:21:22 +04:00
|
|
|
<tr><td>1490</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="normal"> */
|
|
|
|
</td></tr>
|
2007-10-24 00:21:22 +04:00
|
|
|
<tr><td>1491</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="normal"> public function getTemplate($template)
|
|
|
|
</td></tr>
|
2007-10-24 00:21:22 +04:00
|
|
|
<tr><td>1492</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="normal"> {
|
|
|
|
</td></tr>
|
2007-10-24 00:21:22 +04:00
|
|
|
<tr><td>1493</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="covered"> if ( ! isset($this->_templates[$template])) {
|
|
|
|
</td></tr>
|
2007-10-24 00:21:22 +04:00
|
|
|
<tr><td>1494</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="red"> throw new Doctrine_Table_Exception('Template ' . $template . ' not loaded');
|
|
|
|
</td></tr>
|
2007-10-24 00:21:22 +04:00
|
|
|
<tr><td>1495</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="orange"> }
|
|
|
|
</td></tr>
|
2007-10-24 00:21:22 +04:00
|
|
|
<tr><td>1496</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="normal">
|
|
|
|
</td></tr>
|
2007-10-24 00:21:22 +04:00
|
|
|
<tr><td>1497</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="covered"> return $this->_templates[$template];
|
|
|
|
</td></tr>
|
2007-10-24 00:21:22 +04:00
|
|
|
<tr><td>1498</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="orange"> }
|
|
|
|
</td></tr>
|
2007-10-24 00:21:22 +04:00
|
|
|
<tr><td>1499</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="normal">
|
|
|
|
</td></tr>
|
2007-10-24 00:21:22 +04:00
|
|
|
<tr><td>1500</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="normal"> public function hasTemplate($template)
|
|
|
|
</td></tr>
|
2007-10-24 00:21:22 +04:00
|
|
|
<tr><td>1501</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="normal"> {
|
|
|
|
</td></tr>
|
2007-10-24 00:21:22 +04:00
|
|
|
<tr><td>1502</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="red"> return isset($this->_templates[$template]);
|
|
|
|
</td></tr>
|
2007-10-24 00:21:22 +04:00
|
|
|
<tr><td>1503</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="orange"> }
|
|
|
|
</td></tr>
|
2007-10-24 00:21:22 +04:00
|
|
|
<tr><td>1504</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="normal">
|
|
|
|
</td></tr>
|
2007-10-24 00:21:22 +04:00
|
|
|
<tr><td>1505</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="normal"> public function addTemplate($template, Doctrine_Template $impl)
|
|
|
|
</td></tr>
|
2007-10-24 00:21:22 +04:00
|
|
|
<tr><td>1506</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="normal"> {
|
|
|
|
</td></tr>
|
2007-10-24 00:21:22 +04:00
|
|
|
<tr><td>1507</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="covered"> $this->_templates[$template] = $impl;
|
|
|
|
</td></tr>
|
2007-10-24 00:21:22 +04:00
|
|
|
<tr><td>1508</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="normal">
|
|
|
|
</td></tr>
|
2007-10-24 00:21:22 +04:00
|
|
|
<tr><td>1509</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="covered"> return $this;
|
|
|
|
</td></tr>
|
2007-10-24 00:21:22 +04:00
|
|
|
<tr><td>1510</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="orange"> }
|
|
|
|
</td></tr>
|
2007-10-24 00:21:22 +04:00
|
|
|
<tr><td>1511</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="normal">
|
|
|
|
</td></tr>
|
2007-10-24 00:21:22 +04:00
|
|
|
<tr><td>1512</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="normal"> /**
|
|
|
|
</td></tr>
|
2007-10-24 00:21:22 +04:00
|
|
|
<tr><td>1513</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="normal"> * bindQueryParts
|
|
|
|
</td></tr>
|
2007-10-24 00:21:22 +04:00
|
|
|
<tr><td>1514</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="normal"> * binds query parts to given component
|
|
|
|
</td></tr>
|
2007-10-24 00:21:22 +04:00
|
|
|
<tr><td>1515</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="normal"> *
|
|
|
|
</td></tr>
|
2007-10-24 00:21:22 +04:00
|
|
|
<tr><td>1516</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="normal"> * @param array $queryParts an array of pre-bound query parts
|
|
|
|
</td></tr>
|
2007-10-24 00:21:22 +04:00
|
|
|
<tr><td>1517</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="normal"> * @return Doctrine_Record this object
|
|
|
|
</td></tr>
|
2007-10-24 00:21:22 +04:00
|
|
|
<tr><td>1518</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="normal"> */
|
|
|
|
</td></tr>
|
2007-10-24 00:21:22 +04:00
|
|
|
<tr><td>1519</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="normal"> public function bindQueryParts(array $queryParts)
|
|
|
|
</td></tr>
|
2007-10-24 00:21:22 +04:00
|
|
|
<tr><td>1520</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="normal"> {
|
|
|
|
</td></tr>
|
2007-10-24 00:21:22 +04:00
|
|
|
<tr><td>1521</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="red"> $this->_options['queryParts'] = $queryParts;
|
|
|
|
</td></tr>
|
2007-10-24 00:21:22 +04:00
|
|
|
<tr><td>1522</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="normal">
|
|
|
|
</td></tr>
|
2007-10-24 00:21:22 +04:00
|
|
|
<tr><td>1523</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="red"> return $this;
|
|
|
|
</td></tr>
|
2007-10-24 00:21:22 +04:00
|
|
|
<tr><td>1524</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="orange"> }
|
|
|
|
</td></tr>
|
2007-10-24 00:21:22 +04:00
|
|
|
<tr><td>1525</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="normal">
|
|
|
|
</td></tr>
|
2007-10-24 00:21:22 +04:00
|
|
|
<tr><td>1526</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="normal"> /**
|
|
|
|
</td></tr>
|
2007-10-24 00:21:22 +04:00
|
|
|
<tr><td>1527</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="normal"> * bindQueryPart
|
|
|
|
</td></tr>
|
2007-10-24 00:21:22 +04:00
|
|
|
<tr><td>1528</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="normal"> * binds given value to given query part
|
|
|
|
</td></tr>
|
2007-10-24 00:21:22 +04:00
|
|
|
<tr><td>1529</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="normal"> *
|
|
|
|
</td></tr>
|
2007-10-24 00:21:22 +04:00
|
|
|
<tr><td>1530</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="normal"> * @param string $queryPart
|
|
|
|
</td></tr>
|
2007-10-24 00:21:22 +04:00
|
|
|
<tr><td>1531</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="normal"> * @param mixed $value
|
|
|
|
</td></tr>
|
2007-10-24 00:21:22 +04:00
|
|
|
<tr><td>1532</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="normal"> * @return Doctrine_Record this object
|
|
|
|
</td></tr>
|
2007-10-24 00:21:22 +04:00
|
|
|
<tr><td>1533</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="normal"> */
|
|
|
|
</td></tr>
|
2007-10-24 00:21:22 +04:00
|
|
|
<tr><td>1534</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="normal"> public function bindQueryPart($queryPart, $value)
|
|
|
|
</td></tr>
|
2007-10-24 00:21:22 +04:00
|
|
|
<tr><td>1535</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="normal"> {
|
|
|
|
</td></tr>
|
2007-10-24 00:21:22 +04:00
|
|
|
<tr><td>1536</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="covered"> $this->_options['queryParts'][$queryPart] = $value;
|
|
|
|
</td></tr>
|
2007-10-24 00:21:22 +04:00
|
|
|
<tr><td>1537</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="normal">
|
|
|
|
</td></tr>
|
2007-10-24 00:21:22 +04:00
|
|
|
<tr><td>1538</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="covered"> return $this;
|
|
|
|
</td></tr>
|
2007-10-24 00:21:22 +04:00
|
|
|
<tr><td>1539</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="orange"> }
|
|
|
|
</td></tr>
|
2007-10-24 00:21:22 +04:00
|
|
|
<tr><td>1540</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="normal">
|
|
|
|
</td></tr>
|
2007-10-24 00:21:22 +04:00
|
|
|
<tr><td>1541</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="normal"> /**
|
|
|
|
</td></tr>
|
2007-10-24 00:21:22 +04:00
|
|
|
<tr><td>1542</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="normal"> * getBoundQueryPart
|
|
|
|
</td></tr>
|
2007-10-24 00:21:22 +04:00
|
|
|
<tr><td>1543</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="normal"> *
|
|
|
|
</td></tr>
|
2007-10-24 00:21:22 +04:00
|
|
|
<tr><td>1544</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="normal"> * @param string $queryPart
|
|
|
|
</td></tr>
|
2007-10-24 00:21:22 +04:00
|
|
|
<tr><td>1545</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="normal"> * @return string $queryPart
|
|
|
|
</td></tr>
|
2007-10-24 00:21:22 +04:00
|
|
|
<tr><td>1546</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="normal"> */
|
|
|
|
</td></tr>
|
2007-10-24 00:21:22 +04:00
|
|
|
<tr><td>1547</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="normal"> public function getBoundQueryPart($queryPart)
|
|
|
|
</td></tr>
|
2007-10-24 00:21:22 +04:00
|
|
|
<tr><td>1548</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="normal"> {
|
|
|
|
</td></tr>
|
2007-10-24 00:21:22 +04:00
|
|
|
<tr><td>1549</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="covered"> if ( ! isset($this->_options['queryParts'][$queryPart])) {
|
|
|
|
</td></tr>
|
2007-10-24 00:21:22 +04:00
|
|
|
<tr><td>1550</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="covered"> return null;
|
|
|
|
</td></tr>
|
2007-10-24 00:21:22 +04:00
|
|
|
<tr><td>1551</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="orange"> }
|
|
|
|
</td></tr>
|
2007-10-24 00:21:22 +04:00
|
|
|
<tr><td>1552</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="normal">
|
|
|
|
</td></tr>
|
2007-10-24 00:21:22 +04:00
|
|
|
<tr><td>1553</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="covered"> return $this->_options['queryParts'][$queryPart];
|
|
|
|
</td></tr>
|
2007-10-24 00:21:22 +04:00
|
|
|
<tr><td>1554</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="orange"> }
|
|
|
|
</td></tr>
|
2007-10-24 00:21:22 +04:00
|
|
|
<tr><td>1555</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="normal">
|
|
|
|
</td></tr>
|
2007-10-24 00:21:22 +04:00
|
|
|
<tr><td>1556</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="normal"> /**
|
|
|
|
</td></tr>
|
2007-10-24 00:21:22 +04:00
|
|
|
<tr><td>1557</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="normal"> * unshiftFilter
|
|
|
|
</td></tr>
|
2007-10-24 00:21:22 +04:00
|
|
|
<tr><td>1558</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="normal"> *
|
|
|
|
</td></tr>
|
2007-10-24 00:21:22 +04:00
|
|
|
<tr><td>1559</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="normal"> * @param object Doctrine_Record_Filter $filter
|
|
|
|
</td></tr>
|
2007-10-24 00:21:22 +04:00
|
|
|
<tr><td>1560</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="normal"> * @return object $this
|
|
|
|
</td></tr>
|
2007-10-24 00:21:22 +04:00
|
|
|
<tr><td>1561</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="normal"> */
|
|
|
|
</td></tr>
|
2007-10-24 00:21:22 +04:00
|
|
|
<tr><td>1562</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="normal"> public function unshiftFilter(Doctrine_Record_Filter $filter)
|
|
|
|
</td></tr>
|
2007-10-24 00:21:22 +04:00
|
|
|
<tr><td>1563</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="normal"> {
|
|
|
|
</td></tr>
|
2007-10-24 00:21:22 +04:00
|
|
|
<tr><td>1564</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="covered"> $filter->setTable($this);
|
|
|
|
</td></tr>
|
2007-10-24 00:21:22 +04:00
|
|
|
<tr><td>1565</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="normal">
|
|
|
|
</td></tr>
|
2007-10-24 00:21:22 +04:00
|
|
|
<tr><td>1566</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="covered"> $filter->init();
|
|
|
|
</td></tr>
|
2007-10-24 00:21:22 +04:00
|
|
|
<tr><td>1567</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="normal">
|
|
|
|
</td></tr>
|
2007-10-24 00:21:22 +04:00
|
|
|
<tr><td>1568</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="covered"> array_unshift($this->_filters, $filter);
|
|
|
|
</td></tr>
|
2007-10-24 00:21:22 +04:00
|
|
|
<tr><td>1569</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="normal">
|
|
|
|
</td></tr>
|
2007-10-24 00:21:22 +04:00
|
|
|
<tr><td>1570</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="covered"> return $this;
|
|
|
|
</td></tr>
|
2007-10-24 00:21:22 +04:00
|
|
|
<tr><td>1571</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="orange"> }
|
|
|
|
</td></tr>
|
2007-10-24 00:21:22 +04:00
|
|
|
<tr><td>1572</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="normal">
|
|
|
|
</td></tr>
|
2007-10-24 00:21:22 +04:00
|
|
|
<tr><td>1573</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="normal"> /**
|
|
|
|
</td></tr>
|
2007-10-24 00:21:22 +04:00
|
|
|
<tr><td>1574</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="normal"> * getFilters
|
|
|
|
</td></tr>
|
2007-10-24 00:21:22 +04:00
|
|
|
<tr><td>1575</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="normal"> *
|
|
|
|
</td></tr>
|
2007-10-24 00:21:22 +04:00
|
|
|
<tr><td>1576</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="normal"> * @return array $filters
|
|
|
|
</td></tr>
|
2007-10-24 00:21:22 +04:00
|
|
|
<tr><td>1577</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="normal"> */
|
|
|
|
</td></tr>
|
2007-10-24 00:21:22 +04:00
|
|
|
<tr><td>1578</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="normal"> public function getFilters()
|
|
|
|
</td></tr>
|
2007-10-24 00:21:22 +04:00
|
|
|
<tr><td>1579</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="normal"> {
|
|
|
|
</td></tr>
|
2007-10-24 00:21:22 +04:00
|
|
|
<tr><td>1580</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="covered"> return $this->_filters;
|
|
|
|
</td></tr>
|
2007-10-24 00:21:22 +04:00
|
|
|
<tr><td>1581</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="orange"> }
|
|
|
|
</td></tr>
|
2007-10-24 00:21:22 +04:00
|
|
|
<tr><td>1582</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="normal">
|
|
|
|
</td></tr>
|
2007-10-24 00:21:22 +04:00
|
|
|
<tr><td>1583</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="normal"> /**
|
|
|
|
</td></tr>
|
2007-10-24 00:21:22 +04:00
|
|
|
<tr><td>1584</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="normal"> * returns a string representation of this object
|
|
|
|
</td></tr>
|
2007-10-24 00:21:22 +04:00
|
|
|
<tr><td>1585</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="normal"> *
|
|
|
|
</td></tr>
|
2007-10-24 00:21:22 +04:00
|
|
|
<tr><td>1586</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="normal"> * @return string
|
|
|
|
</td></tr>
|
2007-10-24 00:21:22 +04:00
|
|
|
<tr><td>1587</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="normal"> */
|
|
|
|
</td></tr>
|
2007-10-24 00:21:22 +04:00
|
|
|
<tr><td>1588</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="normal"> public function __toString()
|
|
|
|
</td></tr>
|
2007-10-24 00:21:22 +04:00
|
|
|
<tr><td>1589</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="normal"> {
|
|
|
|
</td></tr>
|
2007-10-24 00:21:22 +04:00
|
|
|
<tr><td>1590</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="red"> return Doctrine_Lib::getTableAsString($this);
|
|
|
|
</td></tr>
|
2007-10-24 00:21:22 +04:00
|
|
|
<tr><td>1591</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="orange"> }
|
|
|
|
</td></tr>
|
2007-10-24 00:21:22 +04:00
|
|
|
<tr><td>1592</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="normal">
|
|
|
|
</td></tr>
|
2007-10-24 00:21:22 +04:00
|
|
|
<tr><td>1593</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="normal"> /**
|
|
|
|
</td></tr>
|
2007-10-24 00:21:22 +04:00
|
|
|
<tr><td>1594</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="normal"> * findBy
|
|
|
|
</td></tr>
|
2007-10-24 00:21:22 +04:00
|
|
|
<tr><td>1595</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="normal"> *
|
|
|
|
</td></tr>
|
2007-10-24 00:21:22 +04:00
|
|
|
<tr><td>1596</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="normal"> * @param string $column
|
|
|
|
</td></tr>
|
2007-10-24 00:21:22 +04:00
|
|
|
<tr><td>1597</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="normal"> * @param string $value
|
|
|
|
</td></tr>
|
2007-10-24 00:21:22 +04:00
|
|
|
<tr><td>1598</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="normal"> * @param string $hydrationMode
|
|
|
|
</td></tr>
|
2007-10-24 00:21:22 +04:00
|
|
|
<tr><td>1599</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="normal"> * @return void
|
|
|
|
</td></tr>
|
2007-10-24 00:21:22 +04:00
|
|
|
<tr><td>1600</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="normal"> */
|
|
|
|
</td></tr>
|
2007-10-24 00:21:22 +04:00
|
|
|
<tr><td>1601</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="normal"> protected function findBy($column, $value, $hydrationMode = null)
|
|
|
|
</td></tr>
|
2007-10-24 00:21:22 +04:00
|
|
|
<tr><td>1602</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="normal"> {
|
|
|
|
</td></tr>
|
2007-10-24 00:21:22 +04:00
|
|
|
<tr><td>1603</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="red"> return $this->createQuery()->where($column . ' = ?')->execute(array($value), $hydrationMode);
|
|
|
|
</td></tr>
|
2007-10-24 00:21:22 +04:00
|
|
|
<tr><td>1604</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="orange"> }
|
|
|
|
</td></tr>
|
2007-10-24 00:21:22 +04:00
|
|
|
<tr><td>1605</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="normal">
|
|
|
|
</td></tr>
|
2007-10-24 00:21:22 +04:00
|
|
|
<tr><td>1606</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="normal"> /**
|
|
|
|
</td></tr>
|
2007-10-24 00:21:22 +04:00
|
|
|
<tr><td>1607</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="normal"> * findOneBy
|
|
|
|
</td></tr>
|
2007-10-24 00:21:22 +04:00
|
|
|
<tr><td>1608</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="normal"> *
|
|
|
|
</td></tr>
|
2007-10-24 00:21:22 +04:00
|
|
|
<tr><td>1609</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="normal"> * @param string $column
|
|
|
|
</td></tr>
|
2007-10-24 00:21:22 +04:00
|
|
|
<tr><td>1610</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="normal"> * @param string $value
|
|
|
|
</td></tr>
|
2007-10-24 00:21:22 +04:00
|
|
|
<tr><td>1611</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="normal"> * @param string $hydrationMode
|
|
|
|
</td></tr>
|
2007-10-24 00:21:22 +04:00
|
|
|
<tr><td>1612</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="normal"> * @return void
|
|
|
|
</td></tr>
|
2007-10-24 00:21:22 +04:00
|
|
|
<tr><td>1613</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="normal"> */
|
|
|
|
</td></tr>
|
2007-10-24 00:21:22 +04:00
|
|
|
<tr><td>1614</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="normal"> protected function findOneBy($column, $value, $hydrationMode = null)
|
|
|
|
</td></tr>
|
2007-10-24 00:21:22 +04:00
|
|
|
<tr><td>1615</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="normal"> {
|
|
|
|
</td></tr>
|
2007-10-24 00:21:22 +04:00
|
|
|
<tr><td>1616</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="red"> $results = $this->createQuery()->where($column . ' = ?')->limit(1)->execute(array($value), $hydrationMode);
|
|
|
|
</td></tr>
|
2007-10-24 00:21:22 +04:00
|
|
|
<tr><td>1617</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="normal">
|
|
|
|
</td></tr>
|
2007-10-24 00:21:22 +04:00
|
|
|
<tr><td>1618</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="red"> return $hydrationMode === Doctrine::FETCH_ARRAY ? $results[0]:$results->getFirst();
|
|
|
|
</td></tr>
|
2007-10-24 00:21:22 +04:00
|
|
|
<tr><td>1619</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="orange"> }
|
|
|
|
</td></tr>
|
2007-10-24 00:21:22 +04:00
|
|
|
<tr><td>1620</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="normal">
|
|
|
|
</td></tr>
|
2007-10-24 00:21:22 +04:00
|
|
|
<tr><td>1621</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="normal"> /**
|
|
|
|
</td></tr>
|
2007-10-24 00:21:22 +04:00
|
|
|
<tr><td>1622</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="normal"> * __call
|
|
|
|
</td></tr>
|
2007-10-24 00:21:22 +04:00
|
|
|
<tr><td>1623</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="normal"> *
|
|
|
|
</td></tr>
|
2007-10-24 00:21:22 +04:00
|
|
|
<tr><td>1624</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="normal"> * Adds support for magic finders.
|
|
|
|
</td></tr>
|
2007-10-24 00:21:22 +04:00
|
|
|
<tr><td>1625</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="normal"> * findByColumnName, findByRelationAlias
|
|
|
|
</td></tr>
|
2007-10-24 00:21:22 +04:00
|
|
|
<tr><td>1626</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="normal"> * findById, findByContactId, etc.
|
|
|
|
</td></tr>
|
2007-10-24 00:21:22 +04:00
|
|
|
<tr><td>1627</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="normal"> *
|
|
|
|
</td></tr>
|
2007-10-24 00:21:22 +04:00
|
|
|
<tr><td>1628</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="normal"> * @return void
|
|
|
|
</td></tr>
|
2007-10-24 00:21:22 +04:00
|
|
|
<tr><td>1629</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="normal"> */
|
|
|
|
</td></tr>
|
2007-10-24 00:21:22 +04:00
|
|
|
<tr><td>1630</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="normal"> public function __call($method, $arguments)
|
|
|
|
</td></tr>
|
2007-10-24 00:21:22 +04:00
|
|
|
<tr><td>1631</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="normal"> {
|
|
|
|
</td></tr>
|
2007-10-24 00:21:22 +04:00
|
|
|
<tr><td>1632</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="red"> if (substr($method, 0, 6) == 'findBy') {
|
|
|
|
</td></tr>
|
2007-10-24 00:21:22 +04:00
|
|
|
<tr><td>1633</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="red"> $by = substr($method, 6, strlen($method));
|
|
|
|
</td></tr>
|
2007-10-24 00:21:22 +04:00
|
|
|
<tr><td>1634</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="red"> $method = 'findBy';
|
|
|
|
</td></tr>
|
2007-10-24 00:21:22 +04:00
|
|
|
<tr><td>1635</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="red"> } else if (substr($method, 0, 9) == 'findOneBy') {
|
|
|
|
</td></tr>
|
2007-10-24 00:21:22 +04:00
|
|
|
<tr><td>1636</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="red"> $by = substr($method, 9, strlen($method));
|
|
|
|
</td></tr>
|
2007-10-24 00:21:22 +04:00
|
|
|
<tr><td>1637</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="red"> $method = 'findOneBy';
|
|
|
|
</td></tr>
|
2007-10-24 00:21:22 +04:00
|
|
|
<tr><td>1638</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="red"> }
|
|
|
|
</td></tr>
|
2007-10-24 00:21:22 +04:00
|
|
|
<tr><td>1639</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="normal">
|
|
|
|
</td></tr>
|
2007-10-24 00:21:22 +04:00
|
|
|
<tr><td>1640</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="red"> if (isset($by)) {
|
|
|
|
</td></tr>
|
2007-10-24 00:21:22 +04:00
|
|
|
<tr><td>1641</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="red"> if (!isset($arguments[0])) {
|
|
|
|
</td></tr>
|
2007-10-24 00:21:22 +04:00
|
|
|
<tr><td>1642</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="red"> throw new Doctrine_Table_Exception('You must specify the value to findBy');
|
|
|
|
</td></tr>
|
2007-10-24 00:21:22 +04:00
|
|
|
<tr><td>1643</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="orange"> }
|
|
|
|
</td></tr>
|
2007-10-24 00:21:22 +04:00
|
|
|
<tr><td>1644</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="normal">
|
|
|
|
</td></tr>
|
2007-10-24 00:21:22 +04:00
|
|
|
<tr><td>1645</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="red"> $column = Doctrine::tableize($by);
|
|
|
|
</td></tr>
|
2007-10-24 00:21:22 +04:00
|
|
|
<tr><td>1646</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="red"> $hydrationMode = isset($arguments[1]) ? $arguments[1]:null;
|
|
|
|
</td></tr>
|
2007-10-24 00:21:22 +04:00
|
|
|
<tr><td>1647</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="normal">
|
|
|
|
</td></tr>
|
2007-10-24 00:21:22 +04:00
|
|
|
<tr><td>1648</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="red"> if ($this->hasColumn($column)) {
|
|
|
|
</td></tr>
|
2007-10-24 00:21:22 +04:00
|
|
|
<tr><td>1649</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="red"> return $this->$method($column, $arguments[0], $hydrationMode);
|
|
|
|
</td></tr>
|
2007-10-24 00:21:22 +04:00
|
|
|
<tr><td>1650</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="red"> } else if ($this->hasRelation($by)) {
|
|
|
|
</td></tr>
|
2007-10-24 00:21:22 +04:00
|
|
|
<tr><td>1651</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="red"> $relation = $this->getRelation($by);
|
|
|
|
</td></tr>
|
2007-10-24 00:21:22 +04:00
|
|
|
<tr><td>1652</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="normal">
|
|
|
|
</td></tr>
|
2007-10-24 00:21:22 +04:00
|
|
|
<tr><td>1653</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="red"> if ($relation['type'] === Doctrine_Relation::MANY) {
|
|
|
|
</td></tr>
|
2007-10-24 00:21:22 +04:00
|
|
|
<tr><td>1654</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="red"> throw new Doctrine_Table_Exception('Cannot findBy many relationship.');
|
|
|
|
</td></tr>
|
2007-10-24 00:21:22 +04:00
|
|
|
<tr><td>1655</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="orange"> }
|
|
|
|
</td></tr>
|
2007-10-24 00:21:22 +04:00
|
|
|
<tr><td>1656</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="normal">
|
|
|
|
</td></tr>
|
2007-10-24 00:21:22 +04:00
|
|
|
<tr><td>1657</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="red"> return $this->$method($relation['local'], $arguments[0], $hydrationMode);
|
|
|
|
</td></tr>
|
2007-10-24 00:21:22 +04:00
|
|
|
<tr><td>1658</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="orange"> } else {
|
|
|
|
</td></tr>
|
2007-10-24 00:21:22 +04:00
|
|
|
<tr><td>1659</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="red"> throw new Doctrine_Table_Exception('Cannot find by: ' . $by . '. Invalid column or relationship alias.');
|
|
|
|
</td></tr>
|
2007-10-24 00:21:22 +04:00
|
|
|
<tr><td>1660</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="normal"> }
|
|
|
|
</td></tr>
|
2007-10-24 00:21:22 +04:00
|
|
|
<tr><td>1661</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="orange"> }
|
|
|
|
</td></tr>
|
2007-10-24 00:21:22 +04:00
|
|
|
<tr><td>1662</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="red"> }
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
2007-10-24 00:21:22 +04:00
|
|
|
<tr><td>1663</td>
|
|
|
|
<td class="normal">}
|
|
|
|
</td></tr>
|
2007-10-14 01:45:08 +04:00
|
|
|
</table></body></html>
|