2007-10-14 01:45:08 +04:00
|
|
|
<html>
|
|
|
|
<head>
|
|
|
|
<title>Coverage for Doctrine_Record</title>
|
|
|
|
<style type="text/css">
|
|
|
|
.covered{ background: green;}
|
|
|
|
.normal{ background: white;}
|
|
|
|
.red{ background: red;}
|
|
|
|
.orange{ background: #f90;}
|
|
|
|
</style>
|
|
|
|
</head>
|
|
|
|
<body><h1>Coverage for Doctrine_Record</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-09 01:14:39 +03:00
|
|
|
<td class="normal"> * $Id: Record.php 3090 2007-11-08 18:54:55Z Jonathan.Wage $
|
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>
|
|
|
|
<td class="normal">Doctrine::autoload('Doctrine_Record_Abstract');
|
|
|
|
</td></tr>
|
|
|
|
<tr><td>22</td>
|
|
|
|
<td class="normal">/**
|
|
|
|
</td></tr>
|
|
|
|
<tr><td>23</td>
|
|
|
|
<td class="normal"> * Doctrine_Record
|
|
|
|
</td></tr>
|
|
|
|
<tr><td>24</td>
|
|
|
|
<td class="normal"> * All record classes should inherit this super class
|
|
|
|
</td></tr>
|
|
|
|
<tr><td>25</td>
|
|
|
|
<td class="normal"> *
|
|
|
|
</td></tr>
|
|
|
|
<tr><td>26</td>
|
|
|
|
<td class="normal"> * @package Doctrine
|
|
|
|
</td></tr>
|
|
|
|
<tr><td>27</td>
|
|
|
|
<td class="normal"> * @subpackage Record
|
|
|
|
</td></tr>
|
|
|
|
<tr><td>28</td>
|
|
|
|
<td class="normal"> * @author Konsta Vesterinen <kvesteri@cc.hut.fi>
|
|
|
|
</td></tr>
|
|
|
|
<tr><td>29</td>
|
|
|
|
<td class="normal"> * @license http://www.opensource.org/licenses/lgpl-license.php LGPL
|
|
|
|
</td></tr>
|
|
|
|
<tr><td>30</td>
|
|
|
|
<td class="normal"> * @link www.phpdoctrine.com
|
|
|
|
</td></tr>
|
|
|
|
<tr><td>31</td>
|
|
|
|
<td class="normal"> * @since 1.0
|
|
|
|
</td></tr>
|
|
|
|
<tr><td>32</td>
|
2007-11-09 01:14:39 +03:00
|
|
|
<td class="normal"> * @version $Revision: 3090 $
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>33</td>
|
|
|
|
<td class="normal"> */
|
|
|
|
</td></tr>
|
|
|
|
<tr><td>34</td>
|
|
|
|
<td class="normal">abstract class Doctrine_Record extends Doctrine_Record_Abstract implements Countable, IteratorAggregate, Serializable
|
|
|
|
</td></tr>
|
|
|
|
<tr><td>35</td>
|
|
|
|
<td class="normal">{
|
|
|
|
</td></tr>
|
|
|
|
<tr><td>36</td>
|
|
|
|
<td class="normal"> /**
|
|
|
|
</td></tr>
|
|
|
|
<tr><td>37</td>
|
|
|
|
<td class="normal"> * STATE CONSTANTS
|
|
|
|
</td></tr>
|
|
|
|
<tr><td>38</td>
|
|
|
|
<td class="normal"> */
|
|
|
|
</td></tr>
|
|
|
|
<tr><td>39</td>
|
|
|
|
<td class="normal">
|
|
|
|
</td></tr>
|
|
|
|
<tr><td>40</td>
|
|
|
|
<td class="normal"> /**
|
|
|
|
</td></tr>
|
|
|
|
<tr><td>41</td>
|
|
|
|
<td class="normal"> * DIRTY STATE
|
|
|
|
</td></tr>
|
|
|
|
<tr><td>42</td>
|
|
|
|
<td class="normal"> * a Doctrine_Record is in dirty state when its properties are changed
|
|
|
|
</td></tr>
|
|
|
|
<tr><td>43</td>
|
|
|
|
<td class="normal"> */
|
|
|
|
</td></tr>
|
|
|
|
<tr><td>44</td>
|
|
|
|
<td class="normal"> const STATE_DIRTY = 1;
|
|
|
|
</td></tr>
|
|
|
|
<tr><td>45</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="normal">
|
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"> * TDIRTY STATE
|
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"> * a Doctrine_Record is in transient dirty state when it is created
|
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"> * and some of its fields are modified but it is NOT yet persisted into database
|
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"> const STATE_TDIRTY = 2;
|
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>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="normal"> /**
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>54</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="normal"> * CLEAN STATE
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>55</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="normal"> * a Doctrine_Record is in clean state when all of its properties are loaded from the database
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>56</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="normal"> * and none of its properties are changed
|
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"> const STATE_CLEAN = 3;
|
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">
|
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"> * PROXY STATE
|
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"> * a Doctrine_Record is in proxy state when its properties are not fully loaded
|
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"> const STATE_PROXY = 4;
|
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"> /**
|
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"> * NEW TCLEAN
|
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"> * a Doctrine_Record is in transient clean state when it is created and none of its fields are modified
|
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"> */
|
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"> const STATE_TCLEAN = 5;
|
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"> /**
|
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"> * LOCKED STATE
|
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"> * a Doctrine_Record is temporarily locked during deletes and saves
|
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"> *
|
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"> * This state is used internally to ensure that circular deletes
|
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"> * and saves will not cause infinite loops
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>78</td>
|
|
|
|
<td class="normal"> */
|
|
|
|
</td></tr>
|
|
|
|
<tr><td>79</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="normal"> const STATE_LOCKED = 6;
|
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">
|
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"> /**
|
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"> * @var Doctrine_Node_<TreeImpl> node object
|
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"> */
|
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"> protected $_node;
|
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"> /**
|
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"> * @var integer $_id the primary keys of this object
|
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 $_id = 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>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="normal"> /**
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>92</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="normal"> * @var array $_data the record data
|
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"> */
|
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"> protected $_data = array();
|
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">
|
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"> * @var array $_values the values array, aggregate values and such are mapped into this array
|
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"> */
|
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"> protected $_values = array();
|
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">
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>101</td>
|
|
|
|
<td class="normal"> /**
|
|
|
|
</td></tr>
|
|
|
|
<tr><td>102</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="normal"> * @var integer $_state the state of this record
|
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"> * @see STATE_* constants
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>104</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="normal"> */
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>105</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="normal"> protected $_state;
|
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"> /**
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>108</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="normal"> * @var array $_modified an array containing properties that have been modified
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>109</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="normal"> */
|
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"> protected $_modified = array();
|
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">
|
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"> * @var Doctrine_Validator_ErrorStack error stack object
|
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"> */
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>115</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="normal"> protected $_errorStack;
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>116</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="normal">
|
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"> /**
|
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"> * @var array $_references an array containing all the references
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>119</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="normal"> */
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>120</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="normal"> protected $_references = array();
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>121</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="normal">
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>122</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="normal"> /**
|
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"> * @var integer $index this index is used for creating object identifiers
|
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"> private static $_index = 1;
|
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"> /**
|
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"> * @var integer $oid object identifier, each Record object has a unique object identifier
|
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"> */
|
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"> private $_oid;
|
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">
|
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"> * constructor
|
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"> * @param Doctrine_Table|null $table a Doctrine_Table object or null,
|
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"> * if null the table object is retrieved from current connection
|
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"> * @param boolean $isNewEntry whether or not this record is transient
|
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"> * @throws Doctrine_Connection_Exception if object is created using the new operator and there are no
|
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"> * open connections
|
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"> * @throws Doctrine_Record_Exception if the cleanData operation fails somehow
|
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"> public function __construct($table = null, $isNewEntry = false)
|
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="covered"> if (isset($table) && $table instanceof Doctrine_Table) {
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>146</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="covered"> $this->_table = $table;
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>147</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="covered"> $exists = ( ! $isNewEntry);
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>148</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>149</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="covered"> $class = get_class($this);
|
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"> // get the table of this class
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>151</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="covered"> $this->_table = Doctrine_Manager::getInstance()
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>152</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="covered"> ->getTable($class);
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>153</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="covered"> $exists = false;
|
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"> }
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>155</td>
|
|
|
|
<td class="normal">
|
|
|
|
</td></tr>
|
|
|
|
<tr><td>156</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="normal"> // Check if the current connection has the records table in its registry
|
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"> // If not this record is only used for creating table definition and setting up
|
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"> // relations.
|
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="covered"> if ($this->_table->getConnection()->hasTable($this->_table->getComponentName())) {
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>161</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="covered"> $this->_oid = self::$_index;
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>162</td>
|
|
|
|
<td class="normal">
|
|
|
|
</td></tr>
|
|
|
|
<tr><td>163</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="covered"> self::$_index++;
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>164</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="normal">
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>165</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="covered"> $keys = (array) $this->_table->getIdentifier();
|
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"> // get the data array
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>168</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="covered"> $this->_data = $this->_table->getData();
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>169</td>
|
|
|
|
<td class="normal">
|
|
|
|
</td></tr>
|
|
|
|
<tr><td>170</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="normal"> // get the column count
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>171</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="covered"> $count = count($this->_data);
|
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">
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>173</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="covered"> $this->_values = $this->cleanData($this->_data);
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>174</td>
|
|
|
|
<td class="normal">
|
|
|
|
</td></tr>
|
|
|
|
<tr><td>175</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="covered"> $this->prepareIdentifiers($exists);
|
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="covered"> if ( ! $exists) {
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>178</td>
|
2007-11-02 19:07:11 +03:00
|
|
|
<td class="covered"> if ($count > count($this->_values)) {
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>179</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="covered"> $this->_state = Doctrine_Record::STATE_TDIRTY;
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>180</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>181</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="covered"> $this->_state = Doctrine_Record::STATE_TCLEAN;
|
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"> }
|
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"> // set the default values for this record
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>185</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="covered"> $this->assignDefaultValues();
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>186</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>187</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="covered"> $this->_state = Doctrine_Record::STATE_CLEAN;
|
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="covered"> if ($count < $this->_table->getColumnCount()) {
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>190</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="covered"> $this->_state = Doctrine_Record::STATE_PROXY;
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>191</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="covered"> }
|
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"> }
|
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">
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>194</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="covered"> $this->_errorStack = new Doctrine_Validator_ErrorStack(get_class($this));
|
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">
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>196</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="covered"> $repository = $this->_table->getRepository();
|
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"> $repository->add($this);
|
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->construct();
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>200</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="covered"> }
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>201</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="normal">
|
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"> }
|
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="normal"> /**
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>205</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="normal"> * _index
|
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="normal"> * @return integer
|
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="normal"> public static function _index()
|
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="red"> return self::$_index;
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>212</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="orange"> }
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>213</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="normal">
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>214</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="normal"> /**
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>215</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="normal"> * setUp
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>216</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="normal"> * this method is used for setting up relations and attributes
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>217</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="normal"> * it should be implemented by child classes
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>218</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="normal"> *
|
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"> * @return void
|
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="normal"> public function setUp()
|
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"> { }
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>223</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="normal"> /**
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>224</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="normal"> * construct
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>225</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="normal"> * Empty template method to provide concrete Record classes with the possibility
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>226</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="normal"> * to hook into the constructor procedure
|
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="normal"> * @return void
|
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"> public function construct()
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>231</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="covered"> { }
|
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"> /**
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>233</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="normal"> * getOid
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>234</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="normal"> * returns the object identifier
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>235</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="normal"> *
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>236</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="normal"> * @return integer
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>237</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="normal"> */
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>238</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="normal"> public function getOid()
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>239</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="normal"> {
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>240</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="covered"> return $this->_oid;
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>241</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="orange"> }
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>242</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="normal">
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>243</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="normal"> /**
|
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"> * isValid
|
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"> *
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>246</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="normal"> * @return boolean whether or not this record passes all column validations
|
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"> */
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>248</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="normal"> public function isValid()
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>249</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="normal"> {
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>250</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="covered"> if ( ! $this->_table->getAttribute(Doctrine::ATTR_VALIDATE)) {
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>251</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="covered"> return true;
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>252</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="orange"> }
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>253</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="normal"> // Clear the stack from any previous errors.
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>254</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="covered"> $this->_errorStack->clear();
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>255</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="normal">
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>256</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="normal"> // Run validation process
|
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"> $validator = new Doctrine_Validator();
|
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"> $validator->validateRecord($this);
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>259</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="covered"> $this->validate();
|
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"> if ($this->_state == self::STATE_TDIRTY || $this->_state == self::STATE_TCLEAN) {
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>261</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="covered"> $this->validateOnInsert();
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>262</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>263</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="covered"> $this->validateOnUpdate();
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>264</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="normal"> }
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>265</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="normal">
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>266</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="covered"> return $this->_errorStack->count() == 0 ? true : false;
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>267</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="orange"> }
|
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="normal"> /**
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>270</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="normal"> * Empty template method to provide concrete Record classes with the possibility
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>271</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="normal"> * to hook into the validation procedure, doing any custom / specialized
|
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"> * validations that are neccessary.
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>273</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="normal"> */
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>274</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="normal"> protected function validate()
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>275</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="covered"> { }
|
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="normal"> * Empty template method to provide concrete Record classes with the possibility
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>278</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="normal"> * to hook into the validation procedure only when the record is going to be
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>279</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="normal"> * updated.
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>280</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="normal"> */
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>281</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="normal"> protected function validateOnUpdate()
|
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"> { }
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>283</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="normal"> /**
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>284</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="normal"> * Empty template method to provide concrete Record classes with the possibility
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>285</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="normal"> * to hook into the validation procedure only when the record is going to be
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>286</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="normal"> * inserted into the data store the first time.
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>287</td>
|
|
|
|
<td class="normal"> */
|
|
|
|
</td></tr>
|
|
|
|
<tr><td>288</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="normal"> protected function validateOnInsert()
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>289</td>
|
|
|
|
<td class="covered"> { }
|
|
|
|
</td></tr>
|
|
|
|
<tr><td>290</td>
|
|
|
|
<td class="normal"> /**
|
|
|
|
</td></tr>
|
|
|
|
<tr><td>291</td>
|
|
|
|
<td class="normal"> * Empty template method to provide concrete Record classes with the possibility
|
|
|
|
</td></tr>
|
|
|
|
<tr><td>292</td>
|
|
|
|
<td class="normal"> * to hook into the serializing procedure.
|
|
|
|
</td></tr>
|
|
|
|
<tr><td>293</td>
|
|
|
|
<td class="normal"> */
|
|
|
|
</td></tr>
|
|
|
|
<tr><td>294</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="normal"> public function preSerialize($event)
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>295</td>
|
|
|
|
<td class="covered"> { }
|
|
|
|
</td></tr>
|
|
|
|
<tr><td>296</td>
|
|
|
|
<td class="normal"> /**
|
|
|
|
</td></tr>
|
|
|
|
<tr><td>297</td>
|
|
|
|
<td class="normal"> * Empty template method to provide concrete Record classes with the possibility
|
|
|
|
</td></tr>
|
|
|
|
<tr><td>298</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="normal"> * to hook into the serializing procedure.
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>299</td>
|
|
|
|
<td class="normal"> */
|
|
|
|
</td></tr>
|
|
|
|
<tr><td>300</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="normal"> public function postSerialize($event)
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>301</td>
|
|
|
|
<td class="covered"> { }
|
|
|
|
</td></tr>
|
|
|
|
<tr><td>302</td>
|
|
|
|
<td class="normal"> /**
|
|
|
|
</td></tr>
|
|
|
|
<tr><td>303</td>
|
|
|
|
<td class="normal"> * Empty template method to provide concrete Record classes with the possibility
|
|
|
|
</td></tr>
|
|
|
|
<tr><td>304</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="normal"> * to hook into the serializing procedure.
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>305</td>
|
|
|
|
<td class="normal"> */
|
|
|
|
</td></tr>
|
|
|
|
<tr><td>306</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="normal"> public function preUnserialize($event)
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>307</td>
|
|
|
|
<td class="covered"> { }
|
|
|
|
</td></tr>
|
|
|
|
<tr><td>308</td>
|
|
|
|
<td class="normal"> /**
|
|
|
|
</td></tr>
|
|
|
|
<tr><td>309</td>
|
|
|
|
<td class="normal"> * Empty template method to provide concrete Record classes with the possibility
|
|
|
|
</td></tr>
|
|
|
|
<tr><td>310</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="normal"> * to hook into the serializing procedure.
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>311</td>
|
|
|
|
<td class="normal"> */
|
|
|
|
</td></tr>
|
|
|
|
<tr><td>312</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="normal"> public function postUnserialize($event)
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>313</td>
|
|
|
|
<td class="covered"> { }
|
|
|
|
</td></tr>
|
|
|
|
<tr><td>314</td>
|
|
|
|
<td class="normal"> /**
|
|
|
|
</td></tr>
|
|
|
|
<tr><td>315</td>
|
|
|
|
<td class="normal"> * Empty template method to provide concrete Record classes with the possibility
|
|
|
|
</td></tr>
|
|
|
|
<tr><td>316</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="normal"> * to hook into the saving procedure.
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>317</td>
|
|
|
|
<td class="normal"> */
|
|
|
|
</td></tr>
|
|
|
|
<tr><td>318</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="normal"> public function preSave($event)
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>319</td>
|
|
|
|
<td class="covered"> { }
|
|
|
|
</td></tr>
|
|
|
|
<tr><td>320</td>
|
|
|
|
<td class="normal"> /**
|
|
|
|
</td></tr>
|
|
|
|
<tr><td>321</td>
|
|
|
|
<td class="normal"> * Empty template method to provide concrete Record classes with the possibility
|
|
|
|
</td></tr>
|
|
|
|
<tr><td>322</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="normal"> * to hook into the saving procedure.
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>323</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="normal"> */
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>324</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="normal"> public function postSave($event)
|
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"> { }
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>326</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="normal"> /**
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>327</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="normal"> * Empty template method to provide concrete Record classes with the possibility
|
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"> * to hook into the deletion procedure.
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>329</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="normal"> */
|
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"> public function preDelete($event)
|
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"> { }
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>332</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="normal"> /**
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>333</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="normal"> * Empty template method to provide concrete Record classes with the possibility
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>334</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="normal"> * to hook into the deletion procedure.
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>335</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="normal"> */
|
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"> public function postDelete($event)
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>337</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="covered"> { }
|
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-21 20:12:20 +04:00
|
|
|
<td class="normal"> * Empty template method to provide concrete Record classes with the possibility
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>340</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="normal"> * to hook into the saving procedure only when the record is going to be
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>341</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="normal"> * updated.
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>342</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="normal"> */
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>343</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="normal"> public function preUpdate($event)
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>344</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="covered"> { }
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>345</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="normal"> /**
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>346</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="normal"> * Empty template method to provide concrete Record classes with the possibility
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>347</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="normal"> * to hook into the saving procedure only when the record is going to be
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>348</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="normal"> * updated.
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>349</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="normal"> */
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>350</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="normal"> public function postUpdate($event)
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>351</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="covered"> { }
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>352</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="normal"> /**
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>353</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="normal"> * Empty template method to provide concrete Record classes with the possibility
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>354</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="normal"> * to hook into the saving procedure only when the record is going to be
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>355</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="normal"> * inserted into the data store the first time.
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>356</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="normal"> */
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>357</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="normal"> public function preInsert($event)
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>358</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="covered"> { }
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>359</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="normal"> /**
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>360</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="normal"> * Empty template method to provide concrete Record classes with the possibility
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>361</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="normal"> * to hook into the saving procedure only when the record is going to be
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>362</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="normal"> * inserted into the data store the first time.
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>363</td>
|
|
|
|
<td class="normal"> */
|
|
|
|
</td></tr>
|
|
|
|
<tr><td>364</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="normal"> public function postInsert($event)
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>365</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="covered"> { }
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>366</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="normal"> /**
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>367</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="normal"> * getErrorStack
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>368</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="normal"> *
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>369</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="normal"> * @return Doctrine_Validator_ErrorStack returns the errorStack associated with this record
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>370</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="normal"> */
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>371</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="normal"> public function getErrorStack()
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>372</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="normal"> {
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>373</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="covered"> return $this->_errorStack;
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>374</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="orange"> }
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>375</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="normal">
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>376</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="normal"> /**
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>377</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="normal"> * errorStack
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>378</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="normal"> * assigns / returns record errorStack
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>379</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="normal"> *
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>380</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="normal"> * @param Doctrine_Validator_ErrorStack errorStack to be assigned for this record
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>381</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="normal"> * @return void|Doctrine_Validator_ErrorStack returns the errorStack associated with this record
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>382</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="normal"> */
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>383</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="normal"> public function errorStack($stack = null)
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>384</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="normal"> {
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>385</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="covered"> if ($stack !== null) {
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>386</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="red"> if ( ! ($stack instanceof Doctrine_Validator_ErrorStack)) {
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>387</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="red"> throw new Doctrine_Record_Exception('Argument should be an instance of Doctrine_Validator_ErrorStack.');
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>388</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="orange"> }
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>389</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="red"> $this->_errorStack = $stack;
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>390</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>391</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="covered"> return $this->_errorStack;
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>392</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="normal"> }
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>393</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="red"> }
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>394</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="normal">
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>395</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="normal"> /**
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>396</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="normal"> * setDefaultValues
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>397</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="normal"> * sets the default values for records internal data
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>398</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="normal"> *
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>399</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="normal"> * @param boolean $overwrite whether or not to overwrite the already set values
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>400</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="normal"> * @return boolean
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>401</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="normal"> */
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>402</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="normal"> public function assignDefaultValues($overwrite = false)
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>403</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="normal"> {
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>404</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="covered"> if ( ! $this->_table->hasDefaultValues()) {
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>405</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="covered"> return false;
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>406</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="orange"> }
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>407</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="covered"> foreach ($this->_data as $column => $value) {
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>408</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="covered"> $default = $this->_table->getDefaultValueOf($column);
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>409</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="normal">
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>410</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="covered"> if ($default === null) {
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>411</td>
|
2007-10-22 15:53:42 +04:00
|
|
|
<td class="covered"> continue;
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>412</td>
|
2007-10-22 15:53:42 +04:00
|
|
|
<td class="orange"> }
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>413</td>
|
2007-10-22 15:53:42 +04:00
|
|
|
<td class="normal">
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>414</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="covered"> if ($value === self::$_null || $overwrite) {
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>415</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="covered"> $this->_data[$column] = $default;
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>416</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="covered"> $this->_modified[] = $column;
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>417</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="covered"> $this->_state = Doctrine_Record::STATE_TDIRTY;
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>418</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="covered"> }
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>419</td>
|
|
|
|
<td class="covered"> }
|
|
|
|
</td></tr>
|
|
|
|
<tr><td>420</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="covered"> }
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>421</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="normal">
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>422</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="normal"> /**
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>423</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="normal"> * cleanData
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>424</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="normal"> *
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>425</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="normal"> * @param array $data data array to be cleaned
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>426</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="normal"> * @return integer
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>427</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="normal"> */
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>428</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="normal"> public function cleanData(&$data)
|
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-21 20:12:20 +04:00
|
|
|
<td class="covered"> $tmp = $data;
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>431</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="covered"> $data = array();
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>432</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="normal">
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>433</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="covered"> foreach ($this->getTable()->getColumnNames() as $name) {
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>434</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="covered"> if ( ! isset($tmp[$name])) {
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>435</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="covered"> $data[$name] = self::$_null;
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>436</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>437</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="covered"> $data[$name] = $tmp[$name];
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>438</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="normal"> }
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>439</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="covered"> unset($tmp[$name]);
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>440</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="covered"> }
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>441</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="normal">
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>442</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="covered"> return $tmp;
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>443</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="orange"> }
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>444</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="normal">
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>445</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="normal"> /**
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>446</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="normal"> * hydrate
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>447</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="normal"> * hydrates this object from given array
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>448</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="normal"> *
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>449</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="normal"> * @param array $data
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>450</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="normal"> * @return boolean
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>451</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="normal"> */
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>452</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="normal"> public function hydrate(array $data)
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>453</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="normal"> {
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>454</td>
|
2007-10-29 23:25:38 +03:00
|
|
|
<td class="covered"> $this->_values = array_merge($this->_values, $this->cleanData($data));
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>455</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="covered"> $this->_data = array_merge($this->_data, $data);
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>456</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="normal">
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>457</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="covered"> $this->prepareIdentifiers(true);
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>458</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="covered"> }
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>459</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="normal">
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>460</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="normal"> /**
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>461</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="normal"> * prepareIdentifiers
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>462</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="normal"> * prepares identifiers for later use
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>463</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="normal"> *
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>464</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="normal"> * @param boolean $exists whether or not this record exists in persistent data store
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>465</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="normal"> * @return void
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>466</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="normal"> */
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>467</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="normal"> private function prepareIdentifiers($exists = true)
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>468</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="normal"> {
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>469</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="covered"> switch ($this->_table->getIdentifierType()) {
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>470</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="covered"> case Doctrine::IDENTIFIER_AUTOINC:
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>471</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="covered"> case Doctrine::IDENTIFIER_SEQUENCE:
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>472</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="covered"> case Doctrine::IDENTIFIER_NATURAL:
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>473</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="covered"> $name = $this->_table->getIdentifier();
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>474</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="normal">
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>475</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="covered"> if ($exists) {
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>476</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="covered"> if (isset($this->_data[$name]) && $this->_data[$name] !== self::$_null) {
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>477</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="covered"> $this->_id[$name] = $this->_data[$name];
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>478</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="covered"> }
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>479</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="covered"> }
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>480</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>481</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="covered"> case Doctrine::IDENTIFIER_COMPOSITE:
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>482</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="covered"> $names = $this->_table->getIdentifier();
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>483</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="normal">
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>484</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="covered"> foreach ($names as $name) {
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>485</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="covered"> if ($this->_data[$name] === self::$_null) {
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>486</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="covered"> $this->_id[$name] = null;
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>487</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>488</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="covered"> $this->_id[$name] = $this->_data[$name];
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>489</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="normal"> }
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>490</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="covered"> }
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>491</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>492</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="red"> }
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>493</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="covered"> }
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>494</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="normal">
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>495</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="normal"> /**
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>496</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="normal"> * serialize
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>497</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="normal"> * this method is automatically called when this Doctrine_Record is serialized
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>498</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="normal"> *
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>499</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="normal"> * @return array
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>500</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="normal"> */
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>501</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="normal"> public function serialize()
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>502</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="normal"> {
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>503</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="covered"> $event = new Doctrine_Event($this, Doctrine_Event::RECORD_SERIALIZE);
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>504</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="normal">
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>505</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="covered"> $this->preSerialize($event);
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>506</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="normal">
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>507</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="covered"> $vars = get_object_vars($this);
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>508</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="normal">
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>509</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="covered"> unset($vars['_references']);
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>510</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="covered"> unset($vars['_table']);
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>511</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="covered"> unset($vars['_errorStack']);
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>512</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="covered"> unset($vars['_filter']);
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>513</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="covered"> unset($vars['_node']);
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>514</td>
|
|
|
|
<td class="normal">
|
|
|
|
</td></tr>
|
|
|
|
<tr><td>515</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="covered"> $name = $this->_table->getIdentifier();
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>516</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="covered"> $this->_data = array_merge($this->_data, $this->_id);
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>517</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="normal">
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>518</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="covered"> foreach ($this->_data as $k => $v) {
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>519</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="covered"> if ($v instanceof Doctrine_Record && $this->_table->getTypeOf($k) != 'object') {
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>520</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="red"> unset($vars['_data'][$k]);
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>521</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="covered"> } elseif ($v === self::$_null) {
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>522</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="covered"> unset($vars['_data'][$k]);
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>523</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>524</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="covered"> switch ($this->_table->getTypeOf($k)) {
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>525</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="covered"> case 'array':
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>526</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="covered"> case 'object':
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>527</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="covered"> $vars['_data'][$k] = serialize($vars['_data'][$k]);
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>528</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>529</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="covered"> case 'gzip':
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>530</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="covered"> $vars['_data'][$k] = gzcompress($vars['_data'][$k]);
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>531</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>532</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="covered"> case 'enum':
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>533</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="covered"> $vars['_data'][$k] = $this->_table->enumIndex($k, $vars['_data'][$k]);
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>534</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>535</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="red"> }
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>536</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="normal"> }
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>537</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="covered"> }
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>538</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="normal">
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>539</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="covered"> $str = serialize($vars);
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>540</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="normal">
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>541</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="covered"> $this->postSerialize($event);
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>542</td>
|
|
|
|
<td class="normal">
|
|
|
|
</td></tr>
|
|
|
|
<tr><td>543</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="covered"> return $str;
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>544</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="orange"> }
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>545</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="normal">
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>546</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="normal"> /**
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>547</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="normal"> * unseralize
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>548</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="normal"> * this method is automatically called everytime a Doctrine_Record object is unserialized
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>549</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="normal"> *
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>550</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="normal"> * @param string $serialized Doctrine_Record as serialized string
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>551</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="normal"> * @throws Doctrine_Record_Exception if the cleanData operation fails somehow
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>552</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="normal"> * @return void
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>553</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="normal"> */
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>554</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="normal"> public function unserialize($serialized)
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>555</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="normal"> {
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>556</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="covered"> $event = new Doctrine_Event($this, Doctrine_Event::RECORD_UNSERIALIZE);
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>557</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="normal">
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>558</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="covered"> $this->preUnserialize($event);
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>559</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="normal">
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>560</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="covered"> $manager = Doctrine_Manager::getInstance();
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>561</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="covered"> $connection = $manager->getConnectionForComponent(get_class($this));
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>562</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="normal">
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>563</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="covered"> $this->_oid = self::$_index;
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>564</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="covered"> self::$_index++;
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>565</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="normal">
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>566</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="covered"> $this->_table = $connection->getTable(get_class($this));
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>567</td>
|
|
|
|
<td class="normal">
|
|
|
|
</td></tr>
|
|
|
|
<tr><td>568</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="covered"> $array = unserialize($serialized);
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>569</td>
|
|
|
|
<td class="normal">
|
|
|
|
</td></tr>
|
|
|
|
<tr><td>570</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="covered"> foreach($array as $k => $v) {
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>571</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="covered"> $this->$k = $v;
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>572</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="covered"> }
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>573</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="normal">
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>574</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="covered"> foreach ($this->_data as $k => $v) {
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>575</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="normal">
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>576</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="covered"> switch ($this->_table->getTypeOf($k)) {
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>577</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="covered"> case 'array':
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>578</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="covered"> case 'object':
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>579</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="covered"> $this->_data[$k] = unserialize($this->_data[$k]);
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>580</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>581</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="covered"> case 'gzip':
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>582</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="covered"> $this->_data[$k] = gzuncompress($this->_data[$k]);
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>583</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>584</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="covered"> case 'enum':
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>585</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="covered"> $this->_data[$k] = $this->_table->enumValue($k, $this->_data[$k]);
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>586</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>587</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="normal">
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>588</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="red"> }
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>589</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="covered"> }
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>590</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="normal">
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>591</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="covered"> $this->_table->getRepository()->add($this);
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>592</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="normal">
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>593</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="covered"> $this->cleanData($this->_data);
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>594</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="normal">
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>595</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="covered"> $this->prepareIdentifiers($this->exists());
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>596</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="normal">
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>597</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="covered"> $this->postUnserialize($event);
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>598</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="covered"> }
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>599</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="normal">
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>600</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="normal"> /**
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>601</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="normal"> * state
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>602</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="normal"> * returns / assigns the state of this record
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>603</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="normal"> *
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>604</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="normal"> * @param integer|string $state if set, this method tries to set the record state to $state
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>605</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="normal"> * @see Doctrine_Record::STATE_* constants
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>606</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="normal"> *
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>607</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="normal"> * @throws Doctrine_Record_State_Exception if trying to set an unknown state
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>608</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="normal"> * @return null|integer
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>609</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="normal"> */
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>610</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="normal"> public function state($state = null)
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>611</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="normal"> {
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>612</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="covered"> if ($state == null) {
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>613</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="covered"> return $this->_state;
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>614</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="orange"> }
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>615</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="covered"> $err = false;
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>616</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="covered"> if (is_integer($state)) {
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>617</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="covered"> if ($state >= 1 && $state <= 6) {
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>618</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="covered"> $this->_state = $state;
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>619</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>620</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="red"> $err = true;
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>621</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="normal"> }
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>622</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="covered"> } elseif (is_string($state)) {
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>623</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="red"> $upper = strtoupper($state);
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>624</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="normal">
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>625</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="red"> $const = 'Doctrine_Record::STATE_' . $upper;
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>626</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="red"> if (defined($const)) {
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>627</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="red"> $this->_state = constant($const);
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>628</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>629</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="red"> $err = true;
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>630</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="normal"> }
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>631</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="red"> }
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>632</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="normal">
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>633</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="covered"> if ($this->_state === Doctrine_Record::STATE_TCLEAN ||
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>634</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="covered"> $this->_state === Doctrine_Record::STATE_CLEAN) {
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>635</td>
|
|
|
|
<td class="normal">
|
|
|
|
</td></tr>
|
|
|
|
<tr><td>636</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="covered"> $this->_modified = array();
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>637</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="covered"> }
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>638</td>
|
|
|
|
<td class="normal">
|
|
|
|
</td></tr>
|
|
|
|
<tr><td>639</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="covered"> if ($err) {
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>640</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="red"> throw new Doctrine_Record_State_Exception('Unknown record state ' . $state);
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>641</td>
|
|
|
|
<td class="orange"> }
|
|
|
|
</td></tr>
|
|
|
|
<tr><td>642</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="covered"> }
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>643</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="normal">
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>644</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="normal"> /**
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>645</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="normal"> * refresh
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>646</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="normal"> * refresh internal data from the database
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>647</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="normal"> *
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>648</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="normal"> * @throws Doctrine_Record_Exception When the refresh operation fails (when the database row
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>649</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="normal"> * this record represents does not exist anymore)
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>650</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="normal"> * @return boolean
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>651</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="normal"> */
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>652</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="normal"> public function refresh()
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>653</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="normal"> {
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>654</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="covered"> $id = $this->identifier();
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>655</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="covered"> if ( ! is_array($id)) {
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>656</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="red"> $id = array($id);
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>657</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="red"> }
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>658</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="covered"> if (empty($id)) {
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>659</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="red"> return false;
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>660</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="orange"> }
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>661</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="covered"> $id = array_values($id);
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>662</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="normal">
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>663</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="normal"> // Use FETCH_ARRAY to avoid clearing object relations
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>664</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="covered"> $record = $this->getTable()->find($id, Doctrine::FETCH_ARRAY);
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>665</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="normal">
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>666</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="covered"> if ($record === false) {
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>667</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="covered"> throw new Doctrine_Record_Exception('Failed to refresh. Record does not exist.');
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>668</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="orange"> }
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>669</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="normal">
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>670</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="covered"> $this->hydrate($record);
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>671</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="normal">
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>672</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="covered"> $this->_modified = array();
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>673</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="normal">
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>674</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="covered"> $this->prepareIdentifiers();
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>675</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="normal">
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>676</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="covered"> $this->_state = Doctrine_Record::STATE_CLEAN;
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>677</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="normal">
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>678</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="covered"> return $this;
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>679</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="orange"> }
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>680</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="normal">
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>681</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="normal"> /**
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>682</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="normal"> * refresh
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>683</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="normal"> * refres data of related objects from the database
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>684</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="normal"> *
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>685</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="normal"> * @param string $name name of a related component.
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>686</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="normal"> * if set, this method only refreshes the specified related component
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>687</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="normal"> *
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>688</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="normal"> * @return Doctrine_Record this object
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>689</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="normal"> */
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>690</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="normal"> public function refreshRelated($name = null)
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>691</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="normal"> {
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>692</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="covered"> if (is_null($name)) {
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>693</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="covered"> foreach ($this->_table->getRelations() as $rel) {
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>694</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="covered"> $this->_references[$rel->getAlias()] = $rel->fetchRelatedFor($this);
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>695</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="covered"> }
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>696</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>697</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="covered"> $rel = $this->_table->getRelation($name);
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>698</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="covered"> $this->_references[$name] = $rel->fetchRelatedFor($this);
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>699</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="normal"> }
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>700</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="covered"> }
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>701</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="normal">
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>702</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="normal"> /**
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>703</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="normal"> * clearRelated
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>704</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="normal"> * unsets all the relationships this object has
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>705</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="normal"> *
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>706</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="normal"> * (references to related objects still remain on Table objects)
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>707</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="normal"> */
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>708</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="normal"> public function clearRelated()
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>709</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="normal"> {
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>710</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="covered"> $this->_references = array();
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>711</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="covered"> }
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>712</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="normal">
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>713</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="normal"> /**
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>714</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="normal"> * getTable
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>715</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="normal"> * returns the table object for this record
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>716</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="normal"> *
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>717</td>
|
2007-10-29 20:08:24 +03:00
|
|
|
<td class="normal"> * @return Doctrine_Table a Doctrine_Table object
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>718</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="normal"> */
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>719</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="normal"> public function getTable()
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>720</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="normal"> {
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>721</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="covered"> return $this->_table;
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>722</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="orange"> }
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>723</td>
|
|
|
|
<td class="normal">
|
|
|
|
</td></tr>
|
|
|
|
<tr><td>724</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="normal"> /**
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>725</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="normal"> * getData
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>726</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="normal"> * return all the internal data
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>727</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="normal"> *
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>728</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="normal"> * @return array an array containing all the properties
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>729</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="normal"> */
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>730</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="normal"> public function getData()
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>731</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="normal"> {
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>732</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="covered"> return $this->_data;
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>733</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="orange"> }
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>734</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="normal">
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>735</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="normal"> /**
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>736</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="normal"> * rawGet
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>737</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="normal"> * returns the value of a property, if the property is not yet loaded
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>738</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="normal"> * this method does NOT load it
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>739</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="normal"> *
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>740</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="normal"> * @param $name name of the property
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>741</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="normal"> * @throws Doctrine_Record_Exception if trying to get an unknown property
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>742</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="normal"> * @return mixed
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>743</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="normal"> */
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>744</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="normal"> public function rawGet($name)
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>745</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="normal"> {
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>746</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="covered"> if ( ! isset($this->_data[$name])) {
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>747</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="red"> throw new Doctrine_Record_Exception('Unknown property '. $name);
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>748</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="orange"> }
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>749</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="covered"> if ($this->_data[$name] === self::$_null)
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>750</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="covered"> return null;
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>751</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="normal">
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>752</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="covered"> return $this->_data[$name];
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>753</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="orange"> }
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>754</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="normal">
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>755</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="normal"> /**
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>756</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="normal"> * load
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>757</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="normal"> * loads all the unitialized properties from the database
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>758</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="normal"> *
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>759</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="normal"> * @return boolean
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>760</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="normal"> */
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>761</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="normal"> public function load()
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>762</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="normal"> {
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>763</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="normal"> // only load the data from database if the Doctrine_Record is in proxy state
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>764</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="covered"> if ($this->_state == Doctrine_Record::STATE_PROXY) {
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>765</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="red"> $this->refresh();
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>766</td>
|
|
|
|
<td class="normal">
|
|
|
|
</td></tr>
|
|
|
|
<tr><td>767</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="red"> $this->_state = Doctrine_Record::STATE_CLEAN;
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>768</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="normal">
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>769</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="red"> return true;
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>770</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="orange"> }
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>771</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="covered"> return false;
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>772</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="orange"> }
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>773</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="normal">
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>774</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="normal"> /**
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>775</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="normal"> * get
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>776</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="normal"> * returns a value of a property or a related component
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>777</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="normal"> *
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>778</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="normal"> * @param mixed $name name of the property or related component
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>779</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="normal"> * @param boolean $load whether or not to invoke the loading procedure
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>780</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="normal"> * @throws Doctrine_Record_Exception if trying to get a value of unknown property / related component
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>781</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="normal"> * @return mixed
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>782</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="normal"> */
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>783</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="normal"> public function get($name, $load = true)
|
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-21 20:12:20 +04:00
|
|
|
<td class="covered"> $value = self::$_null;
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>786</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="covered"> $lower = strtolower($name);
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>787</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="normal">
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>788</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="covered"> $lower = $this->_table->getColumnName($lower);
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>789</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="normal">
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>790</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="covered"> if (isset($this->_data[$lower])) {
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>791</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="normal"> // check if the property is null (= it is the Doctrine_Null object located in self::$_null)
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>792</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="covered"> if ($this->_data[$lower] === self::$_null && $load) {
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>793</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="covered"> $this->load();
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>794</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="covered"> }
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>795</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="normal">
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>796</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="covered"> if ($this->_data[$lower] === self::$_null) {
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>797</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="covered"> $value = null;
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>798</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>799</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="covered"> $value = $this->_data[$lower];
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>800</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="normal"> }
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>801</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="covered"> return $value;
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>802</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="orange"> }
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>803</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="normal">
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>804</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="covered"> if (isset($this->_values[$lower])) {
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>805</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="covered"> return $this->_values[$lower];
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>806</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="orange"> }
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>807</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="normal">
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>808</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="normal"> try {
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>809</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="normal">
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>810</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="covered"> if ( ! isset($this->_references[$name]) && $load) {
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>811</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="normal">
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>812</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="covered"> $rel = $this->_table->getRelation($name);
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>813</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="normal">
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>814</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="covered"> $this->_references[$name] = $rel->fetchRelatedFor($this);
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>815</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="covered"> }
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>816</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="covered"> return $this->_references[$name];
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>817</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="normal">
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>818</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="covered"> } catch(Doctrine_Table_Exception $e) {
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>819</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="normal">
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>820</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="covered"> foreach ($this->_table->getFilters() as $filter) {
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>821</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="covered"> if (($value = $filter->filterGet($this, $name, $value)) !== null) {
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>822</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="covered"> return $value;
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>823</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="orange"> }
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>824</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="orange"> }
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>825</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="normal"> }
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>826</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="orange"> }
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>827</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="normal">
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>828</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="normal"> /**
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>829</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="normal"> * mapValue
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>830</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="normal"> * This simple method is used for mapping values to $values property.
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>831</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="normal"> * Usually this method is used internally by Doctrine for the mapping of
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>832</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="normal"> * aggregate values.
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>833</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="normal"> *
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>834</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="normal"> * @param string $name the name of the mapped value
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>835</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="normal"> * @param mixed $value mixed value to be mapped
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>836</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="normal"> * @return void
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>837</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="normal"> */
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>838</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="normal"> public function mapValue($name, $value)
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>839</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="normal"> {
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>840</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="covered"> $name = strtolower($name);
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>841</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="covered"> $this->_values[$name] = $value;
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>842</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="covered"> }
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>843</td>
|
|
|
|
<td class="normal">
|
|
|
|
</td></tr>
|
|
|
|
<tr><td>844</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="normal"> /**
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>845</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="normal"> * set
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>846</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="normal"> * method for altering properties and Doctrine_Record references
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>847</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="normal"> * if the load parameter is set to false this method will not try to load uninitialized record data
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>848</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="normal"> *
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>849</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="normal"> * @param mixed $name name of the property or reference
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>850</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="normal"> * @param mixed $value value of the property or reference
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>851</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="normal"> * @param boolean $load whether or not to refresh / load the uninitialized record data
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>852</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="normal"> *
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>853</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="normal"> * @throws Doctrine_Record_Exception if trying to set a value for unknown property / related component
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>854</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="normal"> * @throws Doctrine_Record_Exception if trying to set a value of wrong type for related component
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>855</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="normal"> *
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>856</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="normal"> * @return Doctrine_Record
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>857</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="normal"> */
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>858</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="normal"> public function set($name, $value, $load = true)
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>859</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="normal"> {
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>860</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="covered"> $lower = strtolower($name);
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>861</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="normal">
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>862</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="covered"> $lower = $this->_table->getColumnName($lower);
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>863</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="normal">
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>864</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="covered"> if (isset($this->_data[$lower])) {
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>865</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="covered"> if ($value instanceof Doctrine_Record) {
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>866</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="covered"> $type = $this->_table->getTypeOf($name);
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>867</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="normal">
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>868</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="covered"> $id = $value->getIncremented();
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>869</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="normal">
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>870</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="covered"> if ($id !== null && $type !== 'object') {
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>871</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="covered"> $value = $id;
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>872</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="covered"> }
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>873</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="covered"> }
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>874</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="normal">
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>875</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="covered"> if ($load) {
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>876</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="covered"> $old = $this->get($lower, $load);
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>877</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>878</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="covered"> $old = $this->_data[$lower];
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>879</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="normal"> }
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>880</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="normal">
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>881</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="covered"> if ($old !== $value) {
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>882</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="covered"> if ($value === null) {
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>883</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="covered"> $value = self::$_null;
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>884</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="covered"> }
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>885</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="normal">
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>886</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="covered"> $this->_data[$lower] = $value;
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>887</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="covered"> $this->_modified[] = $lower;
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>888</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="covered"> switch ($this->_state) {
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>889</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="covered"> case Doctrine_Record::STATE_CLEAN:
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>890</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="covered"> $this->_state = Doctrine_Record::STATE_DIRTY;
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>891</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>892</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="covered"> case Doctrine_Record::STATE_TCLEAN:
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>893</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="covered"> $this->_state = Doctrine_Record::STATE_TDIRTY;
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>894</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>895</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="red"> }
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>896</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="covered"> }
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>897</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>898</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="normal"> try {
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>899</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="covered"> $this->coreSetRelated($name, $value);
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>900</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="covered"> } catch(Doctrine_Table_Exception $e) {
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>901</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="covered"> foreach ($this->_table->getFilters() as $filter) {
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>902</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="covered"> if (($value = $filter->filterSet($this, $name, $value)) !== null) {
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>903</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="covered"> return $value;
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>904</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="orange"> }
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>905</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="orange"> }
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>906</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="normal"> }
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>907</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="normal"> }
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>908</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="covered"> }
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>909</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="normal">
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>910</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="normal"> public function coreSetRelated($name, $value)
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>911</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="normal"> {
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>912</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="covered"> $rel = $this->_table->getRelation($name);
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>913</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="normal">
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>914</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="normal"> // one-to-many or one-to-one relation
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>915</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="covered"> if ($rel instanceof Doctrine_Relation_ForeignKey ||
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>916</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="covered"> $rel instanceof Doctrine_Relation_LocalKey) {
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>917</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="covered"> if ( ! $rel->isOneToOne()) {
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>918</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="normal"> // one-to-many relation found
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>919</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="covered"> if ( ! ($value instanceof Doctrine_Collection)) {
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>920</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="red"> throw new Doctrine_Record_Exception("Couldn't call Doctrine::set(), second argument should be an instance of Doctrine_Collection when setting one-to-many references.");
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>921</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="orange"> }
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>922</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="covered"> if (isset($this->_references[$name])) {
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>923</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="covered"> $this->_references[$name]->setData($value->getData());
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>924</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="covered"> return $this;
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>925</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="orange"> }
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>926</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>927</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="covered"> if ($value !== self::$_null) {
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>928</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="normal"> // one-to-one relation found
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>929</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="covered"> if ( ! ($value instanceof Doctrine_Record)) {
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>930</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="red"> throw new Doctrine_Record_Exception("Couldn't call Doctrine::set(), second argument should be an instance of Doctrine_Record or Doctrine_Null when setting one-to-one references.");
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>931</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="orange"> }
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>932</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="covered"> if ($rel instanceof Doctrine_Relation_LocalKey) {
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>933</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="covered"> $foreign = $rel->getForeign();
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>934</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="covered"> if ( ! empty($foreign) && $foreign != $value->getTable()->getIdentifier())
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>935</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="covered"> $this->set($rel->getLocal(), $value->rawGet($foreign), false);
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>936</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="normal"> else
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>937</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="covered"> $this->set($rel->getLocal(), $value, false);
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>938</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>939</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="covered"> $value->set($rel->getForeign(), $this, false);
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>940</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="normal"> }
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>941</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="covered"> }
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>942</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="normal"> }
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>943</td>
|
|
|
|
<td class="normal">
|
|
|
|
</td></tr>
|
|
|
|
<tr><td>944</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="covered"> } elseif ($rel instanceof Doctrine_Relation_Association) {
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>945</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="normal"> // join table relation found
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>946</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="covered"> if ( ! ($value instanceof Doctrine_Collection)) {
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>947</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="red"> throw new Doctrine_Record_Exception("Couldn't call Doctrine::set(), second argument should be an instance of Doctrine_Collection when setting many-to-many references.");
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>948</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="orange"> }
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>949</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="covered"> }
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>950</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="normal">
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>951</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="covered"> $this->_references[$name] = $value;
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>952</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="covered"> }
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>953</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="normal">
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>954</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="normal"> /**
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>955</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="normal"> * contains
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>956</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="normal"> *
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>957</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="normal"> * @param string $name
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>958</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="normal"> * @return boolean
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>959</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="normal"> */
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>960</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="normal"> public function contains($name)
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>961</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="normal"> {
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>962</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="covered"> $lower = strtolower($name);
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>963</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="normal">
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>964</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="covered"> if (isset($this->_data[$lower])) {
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>965</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="covered"> return true;
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>966</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="orange"> }
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>967</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="covered"> if (isset($this->_id[$lower])) {
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>968</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="red"> return true;
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>969</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="orange"> }
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>970</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="covered"> if (isset($this->_values[$lower])) {
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>971</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="red"> return true;
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>972</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="orange"> }
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>973</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="covered"> if (isset($this->_references[$name]) &&
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>974</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="covered"> $this->_references[$name] !== self::$_null) {
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>975</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="normal">
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>976</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="covered"> return true;
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>977</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="orange"> }
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>978</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="covered"> return false;
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>979</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="orange"> }
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>980</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="normal">
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>981</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="normal"> /**
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>982</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="normal"> * @param string $name
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>983</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="normal"> * @return void
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>984</td>
|
|
|
|
<td class="normal"> */
|
|
|
|
</td></tr>
|
|
|
|
<tr><td>985</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="normal"> public function __unset($name)
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>986</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="normal"> {
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>987</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="red"> if (isset($this->_data[$name])) {
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>988</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="red"> $this->_data[$name] = array();
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>989</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="red"> }
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>990</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="normal"> // todo: what to do with references ?
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>991</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="red"> }
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>992</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="normal">
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>993</td>
|
|
|
|
<td class="normal"> /**
|
|
|
|
</td></tr>
|
|
|
|
<tr><td>994</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="normal"> * applies the changes made to this object into database
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>995</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="normal"> * this method is smart enough to know if any changes are made
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>996</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="normal"> * and whether to use INSERT or UPDATE statement
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>997</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="normal"> *
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>998</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="normal"> * this method also saves the related components
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>999</td>
|
|
|
|
<td class="normal"> *
|
|
|
|
</td></tr>
|
|
|
|
<tr><td>1000</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="normal"> * @param Doctrine_Connection $conn optional connection parameter
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>1001</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="normal"> * @return void
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>1002</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="normal"> */
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>1003</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="normal"> public function save(Doctrine_Connection $conn = null)
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>1004</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="normal"> {
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>1005</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="covered"> if ($conn === null) {
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>1006</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="covered"> $conn = $this->_table->getConnection();
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>1007</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="covered"> }
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>1008</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="covered"> $conn->unitOfWork->saveGraph($this);
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>1009</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="covered"> }
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>1010</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="normal">
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>1011</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="normal"> /**
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>1012</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="normal"> * Tries to save the object and all its related components.
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>1013</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="normal"> * In contrast to Doctrine_Record::save(), this method does not
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>1014</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="normal"> * throw an exception when validation fails but returns TRUE on
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>1015</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="normal"> * success or FALSE on failure.
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>1016</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="normal"> *
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>1017</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="normal"> * @param Doctrine_Connection $conn optional connection parameter
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>1018</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="normal"> * @return TRUE if the record was saved sucessfully without errors, FALSE otherwise.
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>1019</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="normal"> */
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>1020</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="normal"> public function trySave(Doctrine_Connection $conn = null) {
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>1021</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="normal"> try {
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>1022</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="covered"> $this->save($conn);
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>1023</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="covered"> return true;
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>1024</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="covered"> } catch (Doctrine_Validator_Exception $ignored) {
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>1025</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="covered"> return false;
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>1026</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="normal"> }
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>1027</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="orange"> }
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>1028</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="normal">
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>1029</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="normal"> /**
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>1030</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="normal"> * replace
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>1031</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="normal"> * Execute a SQL REPLACE query. A REPLACE query is identical to a INSERT
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>1032</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="normal"> * query, except that if there is already a row in the table with the same
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>1033</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="normal"> * key field values, the REPLACE query just updates its values instead of
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>1034</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="normal"> * inserting a new row.
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>1035</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="normal"> *
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>1036</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="normal"> * The REPLACE type of query does not make part of the SQL standards. Since
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>1037</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="normal"> * practically only MySQL and SQLIte implement it natively, this type of
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>1038</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="normal"> * query isemulated through this method for other DBMS using standard types
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>1039</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="normal"> * of queries inside a transaction to assure the atomicity of the operation.
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>1040</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="normal"> *
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>1041</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="normal"> * @param Doctrine_Connection $conn optional connection parameter
|
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"> * @throws Doctrine_Connection_Exception if some of the key values was null
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>1043</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="normal"> * @throws Doctrine_Connection_Exception if there were no key fields
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>1044</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="normal"> * @throws PDOException if something fails at PDO level
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>1045</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="normal"> * @return integer number of rows affected
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>1046</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="normal"> */
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>1047</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="normal"> public function replace(Doctrine_Connection $conn = null)
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>1048</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="normal"> {
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>1049</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="red"> if ($conn === null) {
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>1050</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="red"> $conn = $this->_table->getConnection();
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>1051</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="red"> }
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>1052</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="normal">
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>1053</td>
|
2007-11-07 19:12:14 +03:00
|
|
|
<td class="red"> return $conn->replace($this->_table->getTableName(), $this->getPrepared(), $this->_id);
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>1054</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="orange"> }
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>1055</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="normal">
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>1056</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="normal"> /**
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>1057</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="normal"> * returns an array of modified fields and associated values
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>1058</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="normal"> * @return array
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>1059</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="normal"> */
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>1060</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="normal"> public function getModified()
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>1061</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="normal"> {
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>1062</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="covered"> $a = array();
|
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-21 20:12:20 +04:00
|
|
|
<td class="covered"> foreach ($this->_modified as $k => $v) {
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>1065</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="covered"> $a[$v] = $this->_data[$v];
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>1066</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="covered"> }
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>1067</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="covered"> return $a;
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>1068</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="orange"> }
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>1069</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="normal">
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>1070</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="normal"> /**
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>1071</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="normal"> * getPrepared
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>1072</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="normal"> *
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>1073</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="normal"> * returns an array of modified fields and values with data preparation
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>1074</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="normal"> * adds column aggregation inheritance and converts Records into primary key values
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>1075</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="normal"> *
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>1076</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="normal"> * @param array $array
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>1077</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="normal"> * @return array
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>1078</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="normal"> */
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>1079</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="normal"> public function getPrepared(array $array = array())
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>1080</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="normal"> {
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>1081</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="covered"> $a = array();
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>1082</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="normal">
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>1083</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="covered"> if (empty($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="covered"> $array = $this->_modified;
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>1085</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="covered"> }
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>1086</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="normal">
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>1087</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="covered"> foreach ($array as $k => $v) {
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>1088</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="covered"> $type = $this->_table->getTypeOf($v);
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>1089</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="normal">
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>1090</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="covered"> if ($this->_data[$v] === self::$_null) {
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>1091</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="covered"> $a[$v] = null;
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>1092</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="covered"> continue;
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>1093</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="orange"> }
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>1094</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="normal">
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>1095</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="normal"> switch ($type) {
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>1096</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="covered"> case 'array':
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>1097</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="covered"> case 'object':
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>1098</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="covered"> $a[$v] = serialize($this->_data[$v]);
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>1099</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>1100</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="covered"> case 'gzip':
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>1101</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="covered"> $a[$v] = gzcompress($this->_data[$v],5);
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>1102</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>1103</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="covered"> case 'boolean':
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>1104</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="covered"> $a[$v] = $this->getTable()->getConnection()->convertBooleans($this->_data[$v]);
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>1105</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>1106</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="covered"> case 'enum':
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>1107</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="covered"> $a[$v] = $this->_table->enumIndex($v, $this->_data[$v]);
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>1108</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>1109</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>1110</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="covered"> if ($this->_data[$v] instanceof Doctrine_Record) {
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>1111</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="covered"> $this->_data[$v] = $this->_data[$v]->getIncremented();
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>1112</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="covered"> }
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>1113</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="normal"> /** TODO:
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>1114</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="normal"> if ($this->_data[$v] === null) {
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>1115</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="normal"> throw new Doctrine_Record_Exception('Unexpected null value.');
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>1116</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="normal"> }
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>1117</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="normal"> */
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>1118</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="normal">
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>1119</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="covered"> $a[$v] = $this->_data[$v];
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>1120</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="covered"> }
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>1121</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="covered"> }
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>1122</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="covered"> $map = $this->_table->inheritanceMap;
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>1123</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="covered"> foreach ($map as $k => $v) {
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>1124</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="covered"> $old = $this->get($k, false);
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>1125</td>
|
|
|
|
<td class="normal">
|
|
|
|
</td></tr>
|
|
|
|
<tr><td>1126</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="covered"> if ((string) $old !== (string) $v || $old === null) {
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>1127</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="covered"> $a[$k] = $v;
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>1128</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="covered"> $this->_data[$k] = $v;
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>1129</td>
|
|
|
|
<td class="covered"> }
|
|
|
|
</td></tr>
|
|
|
|
<tr><td>1130</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="covered"> }
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>1131</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="normal">
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>1132</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="covered"> return $a;
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>1133</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="orange"> }
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>1134</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="normal">
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>1135</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="normal"> /**
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>1136</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="normal"> * count
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>1137</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="normal"> * this class implements countable interface
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>1138</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="normal"> *
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>1139</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="normal"> * @return integer the number of columns in this record
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>1140</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="normal"> */
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>1141</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="normal"> public function count()
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>1142</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="normal"> {
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>1143</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="covered"> return count($this->_data);
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>1144</td>
|
|
|
|
<td class="orange"> }
|
|
|
|
</td></tr>
|
|
|
|
<tr><td>1145</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="normal">
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>1146</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="normal"> /**
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>1147</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="normal"> * alias for count()
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>1148</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="normal"> *
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>1149</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="normal"> * @return integer the number of columns in this record
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>1150</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="normal"> */
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>1151</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="normal"> public function columnCount()
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>1152</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="normal"> {
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>1153</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="red"> return $this->count();
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>1154</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="orange"> }
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>1155</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="normal">
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>1156</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="normal"> /**
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>1157</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="normal"> * toArray
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>1158</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="normal"> * returns the record as an array
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>1159</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="normal"> *
|
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"> * @param boolean $deep - Return also the relations
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>1161</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="normal"> * @return array
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>1162</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="normal"> */
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>1163</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="normal"> public function toArray($deep = false, $prefixKey = false)
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>1164</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="normal"> {
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>1165</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="covered"> $a = array();
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>1166</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="normal">
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>1167</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="covered"> foreach ($this as $column => $value) {
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>1168</td>
|
2007-11-09 01:14:39 +03:00
|
|
|
<td class="covered"> if ($value === self::$_null || is_object($value)) {
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>1169</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="covered"> $value = null;
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>1170</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="covered"> }
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>1171</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="covered"> $a[$column] = $value;
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>1172</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="covered"> }
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>1173</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="covered"> if ($this->_table->getIdentifierType() == Doctrine::IDENTIFIER_AUTOINC) {
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>1174</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="covered"> $i = $this->_table->getIdentifier();
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>1175</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="covered"> $a[$i] = $this->getIncremented();
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>1176</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="covered"> }
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>1177</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="covered"> if ($deep) {
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>1178</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="red"> foreach ($this->_references as $key => $relation) {
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>1179</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="red"> if ( ! $relation instanceof Doctrine_Null) {
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>1180</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="red"> $a[$key] = $relation->toArray($deep, $prefixKey);
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>1181</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="red"> }
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>1182</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="red"> }
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>1183</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="red"> }
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>1184</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="covered"> return array_merge($a, $this->_values);
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>1185</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="orange"> }
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>1186</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="normal"> public function fromArray($array)
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>1187</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="normal"> {
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>1188</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="red"> if (is_array($array)) {
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>1189</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="red"> foreach ($array as $key => $value) {
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>1190</td>
|
2007-11-09 01:14:39 +03:00
|
|
|
<td class="red"> if ($this->getTable()->hasRelation($key)) {
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>1191</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="red"> $this->$key->fromArray($value);
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>1192</td>
|
2007-11-09 01:14:39 +03:00
|
|
|
<td class="red"> } else if($this->getTable()->hasColumn($key)) {
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>1193</td>
|
2007-11-09 01:14:39 +03:00
|
|
|
<td class="red"> $this->set($key, $value);
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>1194</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="red"> }
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>1195</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="red"> }
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>1196</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="red"> }
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>1197</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="red"> }
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>1198</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="normal"> public function exportTo($type, $deep = false)
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>1199</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="normal"> {
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>1200</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="red"> if ($type == 'array') {
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>1201</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="red"> return $this->toArray($deep);
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>1202</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="orange"> } else {
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>1203</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="red"> return Doctrine_Parser::dump($this->toArray($deep, true), $type);
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>1204</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="normal"> }
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>1205</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="orange"> }
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>1206</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="normal"> public function importFrom($type, $data)
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>1207</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="normal"> {
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>1208</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="red"> if ($type == 'array') {
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>1209</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="red"> return $this->fromArray($data);
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>1210</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="orange"> } else {
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>1211</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="red"> return $this->fromArray(Doctrine_Parser::load($data, $type));
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>1212</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="normal"> }
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>1213</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="orange"> }
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>1214</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="normal">
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>1215</td>
|
|
|
|
<td class="normal"> /**
|
|
|
|
</td></tr>
|
|
|
|
<tr><td>1216</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="normal"> * exists
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>1217</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="normal"> * returns true if this record is persistent, otherwise false
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>1218</td>
|
|
|
|
<td class="normal"> *
|
|
|
|
</td></tr>
|
|
|
|
<tr><td>1219</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="normal"> * @return boolean
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>1220</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="normal"> */
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>1221</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="normal"> public function exists()
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>1222</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="normal"> {
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>1223</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="covered"> return ($this->_state !== Doctrine_Record::STATE_TCLEAN &&
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>1224</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="covered"> $this->_state !== Doctrine_Record::STATE_TDIRTY);
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>1225</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="orange"> }
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>1226</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="normal">
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>1227</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="normal"> /**
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>1228</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="normal"> * isModified
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>1229</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="normal"> * returns true if this record was modified, otherwise false
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>1230</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="normal"> *
|
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"> * @return boolean
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>1232</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="normal"> */
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>1233</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="normal"> public function isModified()
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>1234</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="normal"> {
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>1235</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="covered"> return ($this->_state === Doctrine_Record::STATE_DIRTY ||
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>1236</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="covered"> $this->_state === Doctrine_Record::STATE_TDIRTY);
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>1237</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="orange"> }
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>1238</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="normal">
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>1239</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="normal"> /**
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>1240</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="normal"> * method for checking existence of properties and Doctrine_Record references
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>1241</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="normal"> * @param mixed $name name of the property or reference
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>1242</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="normal"> * @return boolean
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>1243</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="normal"> */
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>1244</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="normal"> public function hasRelation($name)
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>1245</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="normal"> {
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>1246</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="red"> if (isset($this->_data[$name]) || isset($this->_id[$name])) {
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>1247</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="red"> return true;
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>1248</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="orange"> }
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>1249</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="red"> return $this->_table->hasRelation($name);
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>1250</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="orange"> }
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>1251</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="normal">
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>1252</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="normal"> /**
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>1253</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="normal"> * getIterator
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>1254</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="normal"> * @return Doctrine_Record_Iterator a Doctrine_Record_Iterator that iterates through the data
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>1255</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="normal"> */
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>1256</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="normal"> public function getIterator()
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>1257</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="normal"> {
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>1258</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="covered"> return new Doctrine_Record_Iterator($this);
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>1259</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="orange"> }
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>1260</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="normal">
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>1261</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="normal"> /**
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>1262</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="normal"> * deletes this data access object and all the related composites
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>1263</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="normal"> * this operation is isolated by a transaction
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>1264</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="normal"> *
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>1265</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="normal"> * this event can be listened by the onPreDelete and onDelete listeners
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>1266</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="normal"> *
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>1267</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="normal"> * @return boolean true on success, false on failure
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>1268</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="normal"> */
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>1269</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="normal"> public function delete(Doctrine_Connection $conn = null)
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>1270</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="normal"> {
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>1271</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="covered"> if ($conn == null) {
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>1272</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="covered"> $conn = $this->_table->getConnection();
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>1273</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="covered"> }
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>1274</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="covered"> return $conn->unitOfWork->delete($this);
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>1275</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="orange"> }
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>1276</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="normal">
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>1277</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="normal"> /**
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>1278</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="normal"> * copy
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>1279</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="normal"> * returns a copy of this object
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>1280</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="normal"> *
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>1281</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="normal"> * @return Doctrine_Record
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>1282</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="normal"> */
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>1283</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="normal"> public function copy()
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>1284</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="normal"> {
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>1285</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="covered"> $data = $this->_data;
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>1286</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="normal">
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>1287</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="covered"> if ($this->_table->getIdentifierType() === Doctrine::IDENTIFIER_AUTOINC) {
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>1288</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="covered"> $id = $this->_table->getIdentifier();
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>1289</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="normal">
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>1290</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="covered"> unset($data[$id]);
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>1291</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="covered"> }
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>1292</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="normal">
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>1293</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="covered"> $ret = $this->_table->create($data);
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>1294</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="covered"> $modified = array();
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>1295</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="normal">
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>1296</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="covered"> foreach ($data as $key => $val) {
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>1297</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="covered"> if ( ! ($val instanceof Doctrine_Null)) {
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>1298</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="covered"> $ret->_modified[] = $key;
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>1299</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="covered"> }
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>1300</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="covered"> }
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>1301</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="normal">
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>1302</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="normal">
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>1303</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="covered"> return $ret;
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>1304</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="orange"> }
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>1305</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="normal">
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>1306</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="normal"> /**
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>1307</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="normal"> * copyDeep
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>1308</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="normal"> * returns a copy of this object and all its related objects
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>1309</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="normal"> *
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>1310</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="normal"> * @return Doctrine_Record
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>1311</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="normal"> */
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>1312</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="normal"> public function copyDeep() {
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>1313</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="red"> $copy = $this->copy();
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>1314</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="normal">
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>1315</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="red"> foreach ($this->_references as $key => $value) {
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>1316</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="red"> if ($value instanceof Doctrine_Collection) {
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>1317</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="red"> foreach ($value as $record) {
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>1318</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="red"> $copy->{$key}[] = $record->copyDeep();
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>1319</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="red"> }
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>1320</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>1321</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="red"> $copy->set($key, $value->copyDeep());
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>1322</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="normal"> }
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>1323</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="red"> }
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>1324</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="red"> return $copy;
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>1325</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="orange"> }
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>1326</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="normal">
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>1327</td>
|
|
|
|
<td class="normal"> /**
|
|
|
|
</td></tr>
|
|
|
|
<tr><td>1328</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="normal"> * assignIdentifier
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>1329</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="normal"> *
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>1330</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="normal"> * @param integer $id
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>1331</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="normal"> * @return void
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>1332</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="normal"> */
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>1333</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="normal"> public function assignIdentifier($id = false)
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>1334</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="normal"> {
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>1335</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="covered"> if ($id === false) {
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>1336</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="red"> $this->_id = array();
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>1337</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="red"> $this->_data = $this->cleanData($this->_data);
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>1338</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="red"> $this->_state = Doctrine_Record::STATE_TCLEAN;
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>1339</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="red"> $this->_modified = array();
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>1340</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="covered"> } elseif ($id === true) {
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>1341</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="covered"> $this->prepareIdentifiers(true);
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>1342</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="covered"> $this->_state = Doctrine_Record::STATE_CLEAN;
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>1343</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="covered"> $this->_modified = array();
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>1344</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>1345</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="covered"> $name = $this->_table->getIdentifier();
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>1346</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="covered"> $this->_id[$name] = $id;
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>1347</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="covered"> $this->_data[$name] = $id;
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>1348</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="covered"> $this->_state = Doctrine_Record::STATE_CLEAN;
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>1349</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="covered"> $this->_modified = array();
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>1350</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="normal"> }
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>1351</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="covered"> }
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>1352</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="normal">
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>1353</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="normal"> /**
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>1354</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="normal"> * returns the primary keys of this object
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>1355</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="normal"> *
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>1356</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="normal"> * @return array
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>1357</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="normal"> */
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>1358</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="normal"> public function identifier()
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>1359</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="normal"> {
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>1360</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="covered"> return $this->_id;
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>1361</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="orange"> }
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>1362</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="normal">
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>1363</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="normal"> /**
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>1364</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="normal"> * returns the value of autoincremented primary key of this object (if any)
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>1365</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="normal"> *
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>1366</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="normal"> * @return integer
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>1367</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="normal"> */
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>1368</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="normal"> final public function getIncremented()
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>1369</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="normal"> {
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>1370</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="covered"> $id = current($this->_id);
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>1371</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="covered"> if ($id === false) {
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>1372</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="covered"> return null;
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>1373</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="orange"> }
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>1374</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="normal">
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>1375</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="covered"> return $id;
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>1376</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="orange"> }
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>1377</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="normal">
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>1378</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="normal"> /**
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>1379</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="normal"> * getLast
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>1380</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="normal"> * this method is used internally be Doctrine_Query
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>1381</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="normal"> * it is needed to provide compatibility between
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>1382</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="normal"> * records and collections
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>1383</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="normal"> *
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>1384</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="normal"> * @return Doctrine_Record
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>1385</td>
|
|
|
|
<td class="normal"> */
|
|
|
|
</td></tr>
|
|
|
|
<tr><td>1386</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="normal"> public function getLast()
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>1387</td>
|
|
|
|
<td class="normal"> {
|
|
|
|
</td></tr>
|
|
|
|
<tr><td>1388</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="covered"> return $this;
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>1389</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="orange"> }
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>1390</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="normal">
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>1391</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="normal"> /**
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>1392</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="normal"> * hasRefence
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>1393</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="normal"> * @param string $name
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>1394</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="normal"> * @return boolean
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>1395</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="normal"> */
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>1396</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="normal"> public function hasReference($name)
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>1397</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="normal"> {
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>1398</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="covered"> return isset($this->_references[$name]);
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>1399</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="orange"> }
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>1400</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="normal">
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>1401</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="normal"> /**
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>1402</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="normal"> * reference
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>1403</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="normal"> *
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>1404</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="normal"> * @param string $name
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>1405</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="normal"> */
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>1406</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="normal"> public function reference($name)
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>1407</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="normal"> {
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>1408</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="covered"> if (isset($this->_references[$name])) {
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>1409</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="covered"> return $this->_references[$name];
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>1410</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="orange"> }
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>1411</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="red"> }
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>1412</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="normal">
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>1413</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="normal"> /**
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>1414</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="normal"> * obtainReference
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>1415</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="normal"> *
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>1416</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="normal"> * @param string $name
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>1417</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="normal"> * @throws Doctrine_Record_Exception if trying to get an unknown related component
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>1418</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="normal"> */
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>1419</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="normal"> public function obtainReference($name)
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<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>
|
|
|
|
<tr><td>1421</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="red"> if (isset($this->_references[$name])) {
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>1422</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="red"> return $this->_references[$name];
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>1423</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="orange"> }
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>1424</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="red"> throw new Doctrine_Record_Exception("Unknown reference $name");
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>1425</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="orange"> }
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<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>
|
|
|
|
<tr><td>1427</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="normal"> /**
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>1428</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="normal"> * getReferences
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>1429</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="normal"> * @return array all references
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>1430</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="normal"> */
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>1431</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="normal"> public function getReferences()
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>1432</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="normal"> {
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>1433</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="covered"> return $this->_references;
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>1434</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="orange"> }
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>1435</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="normal">
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>1436</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="normal"> /**
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>1437</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="normal"> * setRelated
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>1438</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="normal"> *
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>1439</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="normal"> * @param string $alias
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>1440</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="normal"> * @param Doctrine_Access $coll
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>1441</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="normal"> */
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>1442</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="normal"> final public function setRelated($alias, Doctrine_Access $coll)
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>1443</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="normal"> {
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>1444</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="red"> $this->_references[$alias] = $coll;
|
2007-10-14 01:45:08 +04:00
|
|
|
</td></tr>
|
|
|
|
<tr><td>1445</td>
|
2007-10-21 20:12:20 +04:00
|
|
|
<td class="red"> }
|
|
|
|
</td></tr>
|
|
|
|
<tr><td>1446</td>
|
|
|
|
<td class="normal">
|
|
|
|
</td></tr>
|
|
|
|
<tr><td>1447</td>
|
|
|
|
<td class="normal"> /**
|
|
|
|
</td></tr>
|
|
|
|
<tr><td>1448</td>
|
|
|
|
<td class="normal"> * loadReference
|
|
|
|
</td></tr>
|
|
|
|
<tr><td>1449</td>
|
|
|
|
<td class="normal"> * loads a related component
|
|
|
|
</td></tr>
|
|
|
|
<tr><td>1450</td>
|
|
|
|
<td class="normal"> *
|
|
|
|
</td></tr>
|
|
|
|
<tr><td>1451</td>
|
|
|
|
<td class="normal"> * @throws Doctrine_Table_Exception if trying to load an unknown related component
|
|
|
|
</td></tr>
|
|
|
|
<tr><td>1452</td>
|
|
|
|
<td class="normal"> * @param string $name
|
|
|
|
</td></tr>
|
|
|
|
<tr><td>1453</td>
|
|
|
|
<td class="normal"> * @return void
|
|
|
|
</td></tr>
|
|
|
|
<tr><td>1454</td>
|
|
|
|
<td class="normal"> */
|
|
|
|
</td></tr>
|
|
|
|
<tr><td>1455</td>
|
|
|
|
<td class="normal"> public function loadReference($name)
|
|
|
|
</td></tr>
|
|
|
|
<tr><td>1456</td>
|
|
|
|
<td class="normal"> {
|
|
|
|
</td></tr>
|
|
|
|
<tr><td>1457</td>
|
|
|
|
<td class="red"> $rel = $this->_table->getRelation($name);
|
|
|
|
</td></tr>
|
|
|
|
<tr><td>1458</td>
|
|
|
|
<td class="red"> $this->_references[$name] = $rel->fetchRelatedFor($this);
|
|
|
|
</td></tr>
|
|
|
|
<tr><td>1459</td>
|
|
|
|
<td class="red"> }
|
|
|
|
</td></tr>
|
|
|
|
<tr><td>1460</td>
|
|
|
|
<td class="normal">
|
|
|
|
</td></tr>
|
|
|
|
<tr><td>1461</td>
|
|
|
|
<td class="normal"> /**
|
|
|
|
</td></tr>
|
|
|
|
<tr><td>1462</td>
|
|
|
|
<td class="normal"> * merge
|
|
|
|
</td></tr>
|
|
|
|
<tr><td>1463</td>
|
|
|
|
<td class="normal"> * merges this record with an array of values
|
|
|
|
</td></tr>
|
|
|
|
<tr><td>1464</td>
|
|
|
|
<td class="normal"> *
|
|
|
|
</td></tr>
|
|
|
|
<tr><td>1465</td>
|
|
|
|
<td class="normal"> * @param array $values
|
|
|
|
</td></tr>
|
|
|
|
<tr><td>1466</td>
|
|
|
|
<td class="normal"> * @return void
|
|
|
|
</td></tr>
|
|
|
|
<tr><td>1467</td>
|
|
|
|
<td class="normal"> */
|
|
|
|
</td></tr>
|
|
|
|
<tr><td>1468</td>
|
|
|
|
<td class="normal"> public function merge(array $values)
|
|
|
|
</td></tr>
|
|
|
|
<tr><td>1469</td>
|
|
|
|
<td class="normal"> {
|
|
|
|
</td></tr>
|
|
|
|
<tr><td>1470</td>
|
|
|
|
<td class="covered"> foreach ($this->_table->getColumnNames() as $value) {
|
|
|
|
</td></tr>
|
|
|
|
<tr><td>1471</td>
|
|
|
|
<td class="normal"> try {
|
|
|
|
</td></tr>
|
|
|
|
<tr><td>1472</td>
|
|
|
|
<td class="covered"> if (isset($values[$value])) {
|
|
|
|
</td></tr>
|
|
|
|
<tr><td>1473</td>
|
|
|
|
<td class="covered"> $this->set($value, $values[$value]);
|
|
|
|
</td></tr>
|
|
|
|
<tr><td>1474</td>
|
|
|
|
<td class="covered"> }
|
|
|
|
</td></tr>
|
|
|
|
<tr><td>1475</td>
|
|
|
|
<td class="covered"> } catch(Exception $e) {
|
|
|
|
</td></tr>
|
|
|
|
<tr><td>1476</td>
|
|
|
|
<td class="normal"> // silence all exceptions
|
|
|
|
</td></tr>
|
|
|
|
<tr><td>1477</td>
|
|
|
|
<td class="normal"> }
|
|
|
|
</td></tr>
|
|
|
|
<tr><td>1478</td>
|
|
|
|
<td class="covered"> }
|
|
|
|
</td></tr>
|
|
|
|
<tr><td>1479</td>
|
|
|
|
<td class="covered"> }
|
|
|
|
</td></tr>
|
|
|
|
<tr><td>1480</td>
|
|
|
|
<td class="normal">
|
|
|
|
</td></tr>
|
|
|
|
<tr><td>1481</td>
|
|
|
|
<td class="normal"> /**
|
|
|
|
</td></tr>
|
|
|
|
<tr><td>1482</td>
|
|
|
|
<td class="normal"> * call
|
|
|
|
</td></tr>
|
|
|
|
<tr><td>1483</td>
|
|
|
|
<td class="normal"> *
|
|
|
|
</td></tr>
|
|
|
|
<tr><td>1484</td>
|
|
|
|
<td class="normal"> * @param string|array $callback valid callback
|
|
|
|
</td></tr>
|
|
|
|
<tr><td>1485</td>
|
|
|
|
<td class="normal"> * @param string $column column name
|
|
|
|
</td></tr>
|
|
|
|
<tr><td>1486</td>
|
|
|
|
<td class="normal"> * @param mixed arg1 ... argN optional callback arguments
|
|
|
|
</td></tr>
|
|
|
|
<tr><td>1487</td>
|
|
|
|
<td class="normal"> * @return Doctrine_Record
|
|
|
|
</td></tr>
|
|
|
|
<tr><td>1488</td>
|
|
|
|
<td class="normal"> */
|
|
|
|
</td></tr>
|
|
|
|
<tr><td>1489</td>
|
|
|
|
<td class="normal"> public function call($callback, $column)
|
|
|
|
</td></tr>
|
|
|
|
<tr><td>1490</td>
|
|
|
|
<td class="normal"> {
|
|
|
|
</td></tr>
|
|
|
|
<tr><td>1491</td>
|
|
|
|
<td class="covered"> $args = func_get_args();
|
|
|
|
</td></tr>
|
|
|
|
<tr><td>1492</td>
|
|
|
|
<td class="covered"> array_shift($args);
|
|
|
|
</td></tr>
|
|
|
|
<tr><td>1493</td>
|
|
|
|
<td class="normal">
|
|
|
|
</td></tr>
|
|
|
|
<tr><td>1494</td>
|
|
|
|
<td class="covered"> if (isset($args[0])) {
|
|
|
|
</td></tr>
|
|
|
|
<tr><td>1495</td>
|
|
|
|
<td class="covered"> $column = $args[0];
|
|
|
|
</td></tr>
|
|
|
|
<tr><td>1496</td>
|
|
|
|
<td class="covered"> $args[0] = $this->get($column);
|
|
|
|
</td></tr>
|
|
|
|
<tr><td>1497</td>
|
|
|
|
<td class="normal">
|
|
|
|
</td></tr>
|
|
|
|
<tr><td>1498</td>
|
|
|
|
<td class="covered"> $newvalue = call_user_func_array($callback, $args);
|
|
|
|
</td></tr>
|
|
|
|
<tr><td>1499</td>
|
|
|
|
<td class="normal">
|
|
|
|
</td></tr>
|
|
|
|
<tr><td>1500</td>
|
|
|
|
<td class="covered"> $this->_data[$column] = $newvalue;
|
|
|
|
</td></tr>
|
|
|
|
<tr><td>1501</td>
|
|
|
|
<td class="covered"> }
|
|
|
|
</td></tr>
|
|
|
|
<tr><td>1502</td>
|
2007-10-14 01:45:08 +04:00
|
|
|
<td class="covered"> return $this;
|
|
|
|
</td></tr>
|
2007-10-21 20:12:20 +04:00
|
|
|
<tr><td>1503</td>
|
2007-10-14 01:45:08 +04:00
|
|
|
<td class="orange"> }
|
|
|
|
</td></tr>
|
2007-10-21 20:12:20 +04:00
|
|
|
<tr><td>1504</td>
|
|
|
|
<td class="normal">
|
|
|
|
</td></tr>
|
|
|
|
<tr><td>1505</td>
|
2007-10-14 01:45:08 +04:00
|
|
|
<td class="normal"> /**
|
|
|
|
</td></tr>
|
2007-10-21 20:12:20 +04:00
|
|
|
<tr><td>1506</td>
|
2007-10-14 01:45:08 +04:00
|
|
|
<td class="normal"> * getter for node assciated with this record
|
|
|
|
</td></tr>
|
2007-10-21 20:12:20 +04:00
|
|
|
<tr><td>1507</td>
|
2007-10-14 01:45:08 +04:00
|
|
|
<td class="normal"> *
|
|
|
|
</td></tr>
|
2007-10-21 20:12:20 +04:00
|
|
|
<tr><td>1508</td>
|
2007-10-14 01:45:08 +04:00
|
|
|
<td class="normal"> * @return mixed if tree returns Doctrine_Node otherwise returns false
|
|
|
|
</td></tr>
|
2007-10-21 20:12:20 +04:00
|
|
|
<tr><td>1509</td>
|
2007-10-14 01:45:08 +04:00
|
|
|
<td class="normal"> */
|
|
|
|
</td></tr>
|
2007-10-21 20:12:20 +04:00
|
|
|
<tr><td>1510</td>
|
2007-10-14 01:45:08 +04:00
|
|
|
<td class="normal"> public function getNode()
|
|
|
|
</td></tr>
|
2007-10-21 20:12:20 +04:00
|
|
|
<tr><td>1511</td>
|
2007-10-14 01:45:08 +04:00
|
|
|
<td class="normal"> {
|
|
|
|
</td></tr>
|
2007-10-21 20:12:20 +04:00
|
|
|
<tr><td>1512</td>
|
2007-10-14 01:45:08 +04:00
|
|
|
<td class="covered"> if ( ! $this->_table->isTree()) {
|
|
|
|
</td></tr>
|
2007-10-21 20:12:20 +04:00
|
|
|
<tr><td>1513</td>
|
2007-10-14 01:45:08 +04:00
|
|
|
<td class="red"> return false;
|
|
|
|
</td></tr>
|
2007-10-21 20:12:20 +04:00
|
|
|
<tr><td>1514</td>
|
2007-10-14 01:45:08 +04:00
|
|
|
<td class="orange"> }
|
|
|
|
</td></tr>
|
2007-10-21 20:12:20 +04:00
|
|
|
<tr><td>1515</td>
|
2007-10-14 01:45:08 +04:00
|
|
|
<td class="normal">
|
|
|
|
</td></tr>
|
2007-10-21 20:12:20 +04:00
|
|
|
<tr><td>1516</td>
|
2007-10-14 01:45:08 +04:00
|
|
|
<td class="covered"> if ( ! isset($this->_node)) {
|
|
|
|
</td></tr>
|
2007-10-21 20:12:20 +04:00
|
|
|
<tr><td>1517</td>
|
2007-10-14 01:45:08 +04:00
|
|
|
<td class="covered"> $this->_node = Doctrine_Node::factory($this,
|
|
|
|
</td></tr>
|
2007-10-21 20:12:20 +04:00
|
|
|
<tr><td>1518</td>
|
2007-10-14 01:45:08 +04:00
|
|
|
<td class="covered"> $this->getTable()->getOption('treeImpl'),
|
|
|
|
</td></tr>
|
2007-10-21 20:12:20 +04:00
|
|
|
<tr><td>1519</td>
|
2007-10-14 01:45:08 +04:00
|
|
|
<td class="covered"> $this->getTable()->getOption('treeOptions')
|
|
|
|
</td></tr>
|
2007-10-21 20:12:20 +04:00
|
|
|
<tr><td>1520</td>
|
2007-10-14 01:45:08 +04:00
|
|
|
<td class="covered"> );
|
|
|
|
</td></tr>
|
2007-10-21 20:12:20 +04:00
|
|
|
<tr><td>1521</td>
|
2007-10-14 01:45:08 +04:00
|
|
|
<td class="covered"> }
|
|
|
|
</td></tr>
|
2007-10-21 20:12:20 +04:00
|
|
|
<tr><td>1522</td>
|
2007-10-14 01:45:08 +04:00
|
|
|
<td class="normal">
|
|
|
|
</td></tr>
|
2007-10-21 20:12:20 +04:00
|
|
|
<tr><td>1523</td>
|
2007-10-14 01:45:08 +04:00
|
|
|
<td class="covered"> return $this->_node;
|
|
|
|
</td></tr>
|
2007-10-21 20:12:20 +04:00
|
|
|
<tr><td>1524</td>
|
2007-10-14 01:45:08 +04:00
|
|
|
<td class="orange"> }
|
|
|
|
</td></tr>
|
2007-10-21 20:12:20 +04:00
|
|
|
<tr><td>1525</td>
|
2007-10-14 01:45:08 +04:00
|
|
|
<td class="normal">
|
|
|
|
</td></tr>
|
2007-10-21 20:12:20 +04:00
|
|
|
<tr><td>1526</td>
|
2007-10-14 01:45:08 +04:00
|
|
|
<td class="normal"> public function unshiftFilter(Doctrine_Record_Filter $filter)
|
|
|
|
</td></tr>
|
2007-10-21 20:12:20 +04:00
|
|
|
<tr><td>1527</td>
|
2007-10-14 01:45:08 +04:00
|
|
|
<td class="normal"> {
|
|
|
|
</td></tr>
|
2007-10-21 20:12:20 +04:00
|
|
|
<tr><td>1528</td>
|
2007-10-14 01:45:08 +04:00
|
|
|
<td class="covered"> return $this->_table->unshiftFilter($filter);
|
|
|
|
</td></tr>
|
2007-10-21 20:12:20 +04:00
|
|
|
<tr><td>1529</td>
|
2007-10-14 01:45:08 +04:00
|
|
|
<td class="orange"> }
|
|
|
|
</td></tr>
|
2007-10-21 20:12:20 +04:00
|
|
|
<tr><td>1530</td>
|
|
|
|
<td class="normal">
|
|
|
|
</td></tr>
|
|
|
|
<tr><td>1531</td>
|
2007-10-14 01:45:08 +04:00
|
|
|
<td class="normal"> /**
|
|
|
|
</td></tr>
|
2007-10-21 20:12:20 +04:00
|
|
|
<tr><td>1532</td>
|
2007-10-14 01:45:08 +04:00
|
|
|
<td class="normal"> * revert
|
|
|
|
</td></tr>
|
2007-10-21 20:12:20 +04:00
|
|
|
<tr><td>1533</td>
|
2007-10-14 01:45:08 +04:00
|
|
|
<td class="normal"> * reverts this record to given version, this method only works if versioning plugin
|
|
|
|
</td></tr>
|
2007-10-21 20:12:20 +04:00
|
|
|
<tr><td>1534</td>
|
2007-10-14 01:45:08 +04:00
|
|
|
<td class="normal"> * is enabled
|
|
|
|
</td></tr>
|
2007-10-21 20:12:20 +04:00
|
|
|
<tr><td>1535</td>
|
2007-10-14 01:45:08 +04:00
|
|
|
<td class="normal"> *
|
|
|
|
</td></tr>
|
2007-10-21 20:12:20 +04:00
|
|
|
<tr><td>1536</td>
|
2007-10-14 01:45:08 +04:00
|
|
|
<td class="normal"> * @throws Doctrine_Record_Exception if given version does not exist
|
|
|
|
</td></tr>
|
2007-10-21 20:12:20 +04:00
|
|
|
<tr><td>1537</td>
|
2007-10-14 01:45:08 +04:00
|
|
|
<td class="normal"> * @param integer $version an integer > 1
|
|
|
|
</td></tr>
|
2007-10-21 20:12:20 +04:00
|
|
|
<tr><td>1538</td>
|
2007-10-14 01:45:08 +04:00
|
|
|
<td class="normal"> * @return Doctrine_Record this object
|
|
|
|
</td></tr>
|
2007-10-21 20:12:20 +04:00
|
|
|
<tr><td>1539</td>
|
2007-10-14 01:45:08 +04:00
|
|
|
<td class="normal"> */
|
|
|
|
</td></tr>
|
2007-10-21 20:12:20 +04:00
|
|
|
<tr><td>1540</td>
|
2007-10-14 01:45:08 +04:00
|
|
|
<td class="normal"> public function revert($version)
|
|
|
|
</td></tr>
|
2007-10-21 20:12:20 +04:00
|
|
|
<tr><td>1541</td>
|
2007-10-14 01:45:08 +04:00
|
|
|
<td class="normal"> {
|
|
|
|
</td></tr>
|
2007-10-21 20:12:20 +04:00
|
|
|
<tr><td>1542</td>
|
2007-10-14 01:45:08 +04:00
|
|
|
<td class="covered"> $data = $this->_table
|
|
|
|
</td></tr>
|
2007-10-21 20:12:20 +04:00
|
|
|
<tr><td>1543</td>
|
2007-10-14 01:45:08 +04:00
|
|
|
<td class="covered"> ->getTemplate('Doctrine_Template_Versionable')
|
|
|
|
</td></tr>
|
2007-10-21 20:12:20 +04:00
|
|
|
<tr><td>1544</td>
|
2007-10-14 01:45:08 +04:00
|
|
|
<td class="covered"> ->getAuditLog()
|
|
|
|
</td></tr>
|
2007-10-21 20:12:20 +04:00
|
|
|
<tr><td>1545</td>
|
2007-10-14 01:45:08 +04:00
|
|
|
<td class="covered"> ->getVersion($this, $version);
|
|
|
|
</td></tr>
|
2007-10-21 20:12:20 +04:00
|
|
|
<tr><td>1546</td>
|
2007-10-14 01:45:08 +04:00
|
|
|
<td class="normal">
|
|
|
|
</td></tr>
|
2007-10-21 20:12:20 +04:00
|
|
|
<tr><td>1547</td>
|
2007-10-14 01:45:08 +04:00
|
|
|
<td class="covered"> if ( ! isset($data[0])) {
|
|
|
|
</td></tr>
|
2007-10-21 20:12:20 +04:00
|
|
|
<tr><td>1548</td>
|
2007-10-14 01:45:08 +04:00
|
|
|
<td class="covered"> throw new Doctrine_Record_Exception('Version ' . $version . ' does not exist!');
|
|
|
|
</td></tr>
|
2007-10-21 20:12:20 +04:00
|
|
|
<tr><td>1549</td>
|
2007-10-14 01:45:08 +04:00
|
|
|
<td class="orange"> }
|
|
|
|
</td></tr>
|
2007-10-21 20:12:20 +04:00
|
|
|
<tr><td>1550</td>
|
2007-10-14 01:45:08 +04:00
|
|
|
<td class="normal">
|
|
|
|
</td></tr>
|
2007-10-21 20:12:20 +04:00
|
|
|
<tr><td>1551</td>
|
2007-10-14 01:45:08 +04:00
|
|
|
<td class="covered"> $this->_data = $data[0];
|
|
|
|
</td></tr>
|
2007-10-21 20:12:20 +04:00
|
|
|
<tr><td>1552</td>
|
2007-10-14 01:45:08 +04:00
|
|
|
<td class="normal">
|
|
|
|
</td></tr>
|
2007-10-21 20:12:20 +04:00
|
|
|
<tr><td>1553</td>
|
2007-10-14 01:45:08 +04:00
|
|
|
<td class="covered"> return $this;
|
|
|
|
</td></tr>
|
2007-10-21 20:12:20 +04:00
|
|
|
<tr><td>1554</td>
|
2007-10-14 01:45:08 +04:00
|
|
|
<td class="orange"> }
|
|
|
|
</td></tr>
|
2007-10-21 20:12:20 +04:00
|
|
|
<tr><td>1555</td>
|
|
|
|
<td class="normal">
|
|
|
|
</td></tr>
|
|
|
|
<tr><td>1556</td>
|
2007-10-14 01:45:08 +04:00
|
|
|
<td class="normal"> /**
|
|
|
|
</td></tr>
|
2007-10-21 20:12:20 +04:00
|
|
|
<tr><td>1557</td>
|
2007-10-14 01:45:08 +04:00
|
|
|
<td class="normal"> * unlink
|
|
|
|
</td></tr>
|
2007-10-21 20:12:20 +04:00
|
|
|
<tr><td>1558</td>
|
2007-10-14 01:45:08 +04:00
|
|
|
<td class="normal"> * removes links from this record to given records
|
|
|
|
</td></tr>
|
2007-10-21 20:12:20 +04:00
|
|
|
<tr><td>1559</td>
|
2007-10-14 01:45:08 +04:00
|
|
|
<td class="normal"> * if no ids are given, it removes all links
|
|
|
|
</td></tr>
|
2007-10-21 20:12:20 +04:00
|
|
|
<tr><td>1560</td>
|
2007-10-14 01:45:08 +04:00
|
|
|
<td class="normal"> *
|
|
|
|
</td></tr>
|
2007-10-21 20:12:20 +04:00
|
|
|
<tr><td>1561</td>
|
2007-10-14 01:45:08 +04:00
|
|
|
<td class="normal"> * @param string $alias related component alias
|
|
|
|
</td></tr>
|
2007-10-21 20:12:20 +04:00
|
|
|
<tr><td>1562</td>
|
2007-10-14 01:45:08 +04:00
|
|
|
<td class="normal"> * @param array $ids the identifiers of the related records
|
|
|
|
</td></tr>
|
2007-10-21 20:12:20 +04:00
|
|
|
<tr><td>1563</td>
|
2007-10-14 01:45:08 +04:00
|
|
|
<td class="normal"> * @return Doctrine_Record this object
|
|
|
|
</td></tr>
|
2007-10-21 20:12:20 +04:00
|
|
|
<tr><td>1564</td>
|
2007-10-14 01:45:08 +04:00
|
|
|
<td class="normal"> */
|
|
|
|
</td></tr>
|
2007-10-21 20:12:20 +04:00
|
|
|
<tr><td>1565</td>
|
2007-10-14 01:45:08 +04:00
|
|
|
<td class="normal"> public function unlink($alias, $ids = array())
|
|
|
|
</td></tr>
|
2007-10-21 20:12:20 +04:00
|
|
|
<tr><td>1566</td>
|
2007-10-14 01:45:08 +04:00
|
|
|
<td class="normal"> {
|
|
|
|
</td></tr>
|
2007-10-21 20:12:20 +04:00
|
|
|
<tr><td>1567</td>
|
2007-10-14 01:45:08 +04:00
|
|
|
<td class="covered"> $ids = (array) $ids;
|
|
|
|
</td></tr>
|
2007-10-21 20:12:20 +04:00
|
|
|
<tr><td>1568</td>
|
2007-10-14 01:45:08 +04:00
|
|
|
<td class="normal">
|
|
|
|
</td></tr>
|
2007-10-21 20:12:20 +04:00
|
|
|
<tr><td>1569</td>
|
2007-10-14 01:45:08 +04:00
|
|
|
<td class="covered"> $q = new Doctrine_Query();
|
|
|
|
</td></tr>
|
2007-10-21 20:12:20 +04:00
|
|
|
<tr><td>1570</td>
|
2007-10-14 01:45:08 +04:00
|
|
|
<td class="normal">
|
|
|
|
</td></tr>
|
2007-10-21 20:12:20 +04:00
|
|
|
<tr><td>1571</td>
|
2007-10-14 01:45:08 +04:00
|
|
|
<td class="covered"> $rel = $this->getTable()->getRelation($alias);
|
|
|
|
</td></tr>
|
2007-10-21 20:12:20 +04:00
|
|
|
<tr><td>1572</td>
|
2007-10-14 01:45:08 +04:00
|
|
|
<td class="normal">
|
|
|
|
</td></tr>
|
2007-10-21 20:12:20 +04:00
|
|
|
<tr><td>1573</td>
|
2007-10-14 01:45:08 +04:00
|
|
|
<td class="covered"> if ($rel instanceof Doctrine_Relation_Association) {
|
|
|
|
</td></tr>
|
2007-10-21 20:12:20 +04:00
|
|
|
<tr><td>1574</td>
|
2007-10-14 01:45:08 +04:00
|
|
|
<td class="covered"> $q->delete()
|
|
|
|
</td></tr>
|
2007-10-21 20:12:20 +04:00
|
|
|
<tr><td>1575</td>
|
2007-10-14 01:45:08 +04:00
|
|
|
<td class="covered"> ->from($rel->getAssociationTable()->getComponentName())
|
|
|
|
</td></tr>
|
2007-10-21 20:12:20 +04:00
|
|
|
<tr><td>1576</td>
|
2007-10-14 01:45:08 +04:00
|
|
|
<td class="covered"> ->where($rel->getLocal() . ' = ?', array_values($this->identifier()));
|
|
|
|
</td></tr>
|
2007-10-21 20:12:20 +04:00
|
|
|
<tr><td>1577</td>
|
2007-10-14 01:45:08 +04:00
|
|
|
<td class="normal">
|
|
|
|
</td></tr>
|
2007-10-21 20:12:20 +04:00
|
|
|
<tr><td>1578</td>
|
2007-10-14 01:45:08 +04:00
|
|
|
<td class="covered"> if (count($ids) > 0) {
|
|
|
|
</td></tr>
|
2007-10-21 20:12:20 +04:00
|
|
|
<tr><td>1579</td>
|
2007-10-14 01:45:08 +04:00
|
|
|
<td class="covered"> $q->whereIn($rel->getForeign(), $ids);
|
|
|
|
</td></tr>
|
2007-10-21 20:12:20 +04:00
|
|
|
<tr><td>1580</td>
|
2007-10-14 01:45:08 +04:00
|
|
|
<td class="covered"> }
|
|
|
|
</td></tr>
|
2007-10-21 20:12:20 +04:00
|
|
|
<tr><td>1581</td>
|
2007-10-14 01:45:08 +04:00
|
|
|
<td class="normal">
|
|
|
|
</td></tr>
|
2007-10-21 20:12:20 +04:00
|
|
|
<tr><td>1582</td>
|
2007-10-14 01:45:08 +04:00
|
|
|
<td class="covered"> $q->execute();
|
|
|
|
</td></tr>
|
2007-10-21 20:12:20 +04:00
|
|
|
<tr><td>1583</td>
|
2007-10-14 01:45:08 +04:00
|
|
|
<td class="normal">
|
|
|
|
</td></tr>
|
2007-10-21 20:12:20 +04:00
|
|
|
<tr><td>1584</td>
|
2007-10-14 01:45:08 +04:00
|
|
|
<td class="normal">
|
|
|
|
</td></tr>
|
2007-10-21 20:12:20 +04:00
|
|
|
<tr><td>1585</td>
|
2007-10-14 01:45:08 +04:00
|
|
|
<td class="covered"> } elseif ($rel instanceof Doctrine_Relation_ForeignKey) {
|
|
|
|
</td></tr>
|
2007-10-21 20:12:20 +04:00
|
|
|
<tr><td>1586</td>
|
2007-10-14 01:45:08 +04:00
|
|
|
<td class="covered"> $q->update($rel->getTable()->getComponentName())
|
|
|
|
</td></tr>
|
2007-10-21 20:12:20 +04:00
|
|
|
<tr><td>1587</td>
|
2007-10-14 01:45:08 +04:00
|
|
|
<td class="covered"> ->set($rel->getForeign(), '?', array(null))
|
|
|
|
</td></tr>
|
2007-10-21 20:12:20 +04:00
|
|
|
<tr><td>1588</td>
|
2007-10-14 01:45:08 +04:00
|
|
|
<td class="covered"> ->addWhere($rel->getForeign() . ' = ?', array_values($this->identifier()));
|
|
|
|
</td></tr>
|
2007-10-21 20:12:20 +04:00
|
|
|
<tr><td>1589</td>
|
2007-10-14 01:45:08 +04:00
|
|
|
<td class="normal">
|
|
|
|
</td></tr>
|
2007-10-21 20:12:20 +04:00
|
|
|
<tr><td>1590</td>
|
2007-10-14 01:45:08 +04:00
|
|
|
<td class="covered"> if (count($ids) > 0) {
|
|
|
|
</td></tr>
|
2007-10-21 20:12:20 +04:00
|
|
|
<tr><td>1591</td>
|
2007-10-14 01:45:08 +04:00
|
|
|
<td class="covered"> $q->whereIn($rel->getTable()->getIdentifier(), $ids);
|
|
|
|
</td></tr>
|
2007-10-21 20:12:20 +04:00
|
|
|
<tr><td>1592</td>
|
2007-10-14 01:45:08 +04:00
|
|
|
<td class="covered"> }
|
|
|
|
</td></tr>
|
2007-10-21 20:12:20 +04:00
|
|
|
<tr><td>1593</td>
|
2007-10-14 01:45:08 +04:00
|
|
|
<td class="normal">
|
|
|
|
</td></tr>
|
2007-10-21 20:12:20 +04:00
|
|
|
<tr><td>1594</td>
|
2007-10-14 01:45:08 +04:00
|
|
|
<td class="covered"> $q->execute();
|
|
|
|
</td></tr>
|
2007-10-21 20:12:20 +04:00
|
|
|
<tr><td>1595</td>
|
2007-10-14 01:45:08 +04:00
|
|
|
<td class="covered"> }
|
|
|
|
</td></tr>
|
2007-10-21 20:12:20 +04:00
|
|
|
<tr><td>1596</td>
|
2007-10-14 01:45:08 +04:00
|
|
|
<td class="covered"> if (isset($this->_references[$alias])) {
|
|
|
|
</td></tr>
|
2007-10-21 20:12:20 +04:00
|
|
|
<tr><td>1597</td>
|
2007-10-14 01:45:08 +04:00
|
|
|
<td class="covered"> foreach ($this->_references[$alias] as $k => $record) {
|
|
|
|
</td></tr>
|
2007-10-21 20:12:20 +04:00
|
|
|
<tr><td>1598</td>
|
2007-10-14 01:45:08 +04:00
|
|
|
<td class="covered"> if (in_array(current($record->identifier()), $ids)) {
|
|
|
|
</td></tr>
|
2007-10-21 20:12:20 +04:00
|
|
|
<tr><td>1599</td>
|
2007-10-14 01:45:08 +04:00
|
|
|
<td class="covered"> $this->_references[$alias]->remove($k);
|
|
|
|
</td></tr>
|
2007-10-21 20:12:20 +04:00
|
|
|
<tr><td>1600</td>
|
2007-10-14 01:45:08 +04:00
|
|
|
<td class="covered"> }
|
|
|
|
</td></tr>
|
2007-10-21 20:12:20 +04:00
|
|
|
<tr><td>1601</td>
|
2007-10-14 01:45:08 +04:00
|
|
|
<td class="covered"> }
|
|
|
|
</td></tr>
|
2007-10-21 20:12:20 +04:00
|
|
|
<tr><td>1602</td>
|
2007-10-14 01:45:08 +04:00
|
|
|
<td class="covered"> $this->_references[$alias]->takeSnapshot();
|
|
|
|
</td></tr>
|
2007-10-21 20:12:20 +04:00
|
|
|
<tr><td>1603</td>
|
2007-10-14 01:45:08 +04:00
|
|
|
<td class="covered"> }
|
|
|
|
</td></tr>
|
2007-10-21 20:12:20 +04:00
|
|
|
<tr><td>1604</td>
|
2007-10-14 01:45:08 +04:00
|
|
|
<td class="covered"> return $this;
|
|
|
|
</td></tr>
|
2007-10-21 20:12:20 +04:00
|
|
|
<tr><td>1605</td>
|
2007-10-14 01:45:08 +04:00
|
|
|
<td class="orange"> }
|
|
|
|
</td></tr>
|
2007-10-21 20:12:20 +04:00
|
|
|
<tr><td>1606</td>
|
|
|
|
<td class="normal">
|
|
|
|
</td></tr>
|
|
|
|
<tr><td>1607</td>
|
2007-10-14 01:45:08 +04:00
|
|
|
<td class="normal"> /**
|
|
|
|
</td></tr>
|
2007-10-21 20:12:20 +04:00
|
|
|
<tr><td>1608</td>
|
2007-10-14 01:45:08 +04:00
|
|
|
<td class="normal"> * __call
|
|
|
|
</td></tr>
|
2007-10-21 20:12:20 +04:00
|
|
|
<tr><td>1609</td>
|
2007-10-14 01:45:08 +04:00
|
|
|
<td class="normal"> * this method is a magic method that is being used for method overloading
|
|
|
|
</td></tr>
|
2007-10-21 20:12:20 +04:00
|
|
|
<tr><td>1610</td>
|
2007-10-14 01:45:08 +04:00
|
|
|
<td class="normal"> *
|
|
|
|
</td></tr>
|
2007-10-21 20:12:20 +04:00
|
|
|
<tr><td>1611</td>
|
2007-10-14 01:45:08 +04:00
|
|
|
<td class="normal"> * the function of this method is to try to find given method from the templates
|
|
|
|
</td></tr>
|
2007-10-21 20:12:20 +04:00
|
|
|
<tr><td>1612</td>
|
2007-10-14 01:45:08 +04:00
|
|
|
<td class="normal"> * this record is using and if it finds given method it will execute it
|
|
|
|
</td></tr>
|
2007-10-21 20:12:20 +04:00
|
|
|
<tr><td>1613</td>
|
2007-10-14 01:45:08 +04:00
|
|
|
<td class="normal"> *
|
|
|
|
</td></tr>
|
2007-10-21 20:12:20 +04:00
|
|
|
<tr><td>1614</td>
|
2007-10-14 01:45:08 +04:00
|
|
|
<td class="normal"> * So, in sense, this method replicates the usage of mixins (as seen in some programming languages)
|
|
|
|
</td></tr>
|
2007-10-21 20:12:20 +04:00
|
|
|
<tr><td>1615</td>
|
2007-10-14 01:45:08 +04:00
|
|
|
<td class="normal"> *
|
|
|
|
</td></tr>
|
2007-10-21 20:12:20 +04:00
|
|
|
<tr><td>1616</td>
|
2007-10-14 01:45:08 +04:00
|
|
|
<td class="normal"> * @param string $method name of the method
|
|
|
|
</td></tr>
|
2007-10-21 20:12:20 +04:00
|
|
|
<tr><td>1617</td>
|
2007-10-14 01:45:08 +04:00
|
|
|
<td class="normal"> * @param array $args method arguments
|
|
|
|
</td></tr>
|
2007-10-21 20:12:20 +04:00
|
|
|
<tr><td>1618</td>
|
2007-10-14 01:45:08 +04:00
|
|
|
<td class="normal"> * @return mixed the return value of the given method
|
|
|
|
</td></tr>
|
2007-10-21 20:12:20 +04:00
|
|
|
<tr><td>1619</td>
|
2007-10-14 01:45:08 +04:00
|
|
|
<td class="normal"> */
|
|
|
|
</td></tr>
|
2007-10-21 20:12:20 +04:00
|
|
|
<tr><td>1620</td>
|
2007-10-14 01:45:08 +04:00
|
|
|
<td class="normal"> public function __call($method, $args)
|
|
|
|
</td></tr>
|
2007-10-21 20:12:20 +04:00
|
|
|
<tr><td>1621</td>
|
2007-10-14 01:45:08 +04:00
|
|
|
<td class="normal"> {
|
|
|
|
</td></tr>
|
2007-10-21 20:12:20 +04:00
|
|
|
<tr><td>1622</td>
|
2007-10-14 01:45:08 +04:00
|
|
|
<td class="covered"> if (($template = $this->_table->getMethodOwner($method)) !== false) {
|
|
|
|
</td></tr>
|
2007-10-21 20:12:20 +04:00
|
|
|
<tr><td>1623</td>
|
2007-10-14 01:45:08 +04:00
|
|
|
<td class="red"> $template->setInvoker($this);
|
|
|
|
</td></tr>
|
2007-10-21 20:12:20 +04:00
|
|
|
<tr><td>1624</td>
|
2007-10-14 01:45:08 +04:00
|
|
|
<td class="red"> return call_user_func_array(array($template, $method), $args);
|
|
|
|
</td></tr>
|
2007-10-21 20:12:20 +04:00
|
|
|
<tr><td>1625</td>
|
2007-10-14 01:45:08 +04:00
|
|
|
<td class="orange"> }
|
|
|
|
</td></tr>
|
2007-10-21 20:12:20 +04:00
|
|
|
<tr><td>1626</td>
|
2007-10-14 01:45:08 +04:00
|
|
|
<td class="normal">
|
|
|
|
</td></tr>
|
2007-10-21 20:12:20 +04:00
|
|
|
<tr><td>1627</td>
|
2007-10-14 01:45:08 +04:00
|
|
|
<td class="covered"> foreach ($this->_table->getTemplates() as $template) {
|
|
|
|
</td></tr>
|
2007-10-21 20:12:20 +04:00
|
|
|
<tr><td>1628</td>
|
2007-10-14 01:45:08 +04:00
|
|
|
<td class="covered"> if (method_exists($template, $method)) {
|
|
|
|
</td></tr>
|
2007-10-21 20:12:20 +04:00
|
|
|
<tr><td>1629</td>
|
2007-10-14 01:45:08 +04:00
|
|
|
<td class="covered"> $template->setInvoker($this);
|
|
|
|
</td></tr>
|
2007-10-21 20:12:20 +04:00
|
|
|
<tr><td>1630</td>
|
2007-10-14 01:45:08 +04:00
|
|
|
<td class="covered"> $this->_table->setMethodOwner($method, $template);
|
|
|
|
</td></tr>
|
2007-10-21 20:12:20 +04:00
|
|
|
<tr><td>1631</td>
|
2007-10-14 01:45:08 +04:00
|
|
|
<td class="normal">
|
|
|
|
</td></tr>
|
2007-10-21 20:12:20 +04:00
|
|
|
<tr><td>1632</td>
|
2007-10-14 01:45:08 +04:00
|
|
|
<td class="covered"> return call_user_func_array(array($template, $method), $args);
|
|
|
|
</td></tr>
|
2007-10-21 20:12:20 +04:00
|
|
|
<tr><td>1633</td>
|
2007-10-14 01:45:08 +04:00
|
|
|
<td class="orange"> }
|
|
|
|
</td></tr>
|
2007-10-21 20:12:20 +04:00
|
|
|
<tr><td>1634</td>
|
2007-10-14 01:45:08 +04:00
|
|
|
<td class="red"> }
|
|
|
|
</td></tr>
|
2007-10-21 20:12:20 +04:00
|
|
|
<tr><td>1635</td>
|
2007-10-14 01:45:08 +04:00
|
|
|
<td class="normal">
|
|
|
|
</td></tr>
|
2007-10-21 20:12:20 +04:00
|
|
|
<tr><td>1636</td>
|
2007-10-14 01:45:08 +04:00
|
|
|
<td class="red"> throw new Doctrine_Record_Exception('Unknown method ' . $method);
|
|
|
|
</td></tr>
|
2007-10-21 20:12:20 +04:00
|
|
|
<tr><td>1637</td>
|
2007-10-14 01:45:08 +04:00
|
|
|
<td class="orange"> }
|
|
|
|
</td></tr>
|
2007-10-21 20:12:20 +04:00
|
|
|
<tr><td>1638</td>
|
|
|
|
<td class="normal">
|
|
|
|
</td></tr>
|
|
|
|
<tr><td>1639</td>
|
2007-10-14 01:45:08 +04:00
|
|
|
<td class="normal"> /**
|
|
|
|
</td></tr>
|
2007-10-21 20:12:20 +04:00
|
|
|
<tr><td>1640</td>
|
2007-10-14 01:45:08 +04:00
|
|
|
<td class="normal"> * used to delete node from tree - MUST BE USE TO DELETE RECORD IF TABLE ACTS AS TREE
|
|
|
|
</td></tr>
|
2007-10-21 20:12:20 +04:00
|
|
|
<tr><td>1641</td>
|
2007-10-14 01:45:08 +04:00
|
|
|
<td class="normal"> *
|
|
|
|
</td></tr>
|
2007-10-21 20:12:20 +04:00
|
|
|
<tr><td>1642</td>
|
2007-10-14 01:45:08 +04:00
|
|
|
<td class="normal"> */
|
|
|
|
</td></tr>
|
2007-10-21 20:12:20 +04:00
|
|
|
<tr><td>1643</td>
|
2007-10-14 01:45:08 +04:00
|
|
|
<td class="normal"> public function deleteNode() {
|
|
|
|
</td></tr>
|
2007-10-21 20:12:20 +04:00
|
|
|
<tr><td>1644</td>
|
2007-10-14 01:45:08 +04:00
|
|
|
<td class="red"> $this->getNode()->delete();
|
|
|
|
</td></tr>
|
2007-10-21 20:12:20 +04:00
|
|
|
<tr><td>1645</td>
|
2007-10-14 01:45:08 +04:00
|
|
|
<td class="red"> }
|
|
|
|
</td></tr>
|
2007-10-21 20:12:20 +04:00
|
|
|
<tr><td>1646</td>
|
2007-10-14 01:45:08 +04:00
|
|
|
<td class="normal"> public function toString()
|
|
|
|
</td></tr>
|
2007-10-21 20:12:20 +04:00
|
|
|
<tr><td>1647</td>
|
2007-10-14 01:45:08 +04:00
|
|
|
<td class="normal"> {
|
|
|
|
</td></tr>
|
2007-10-21 20:12:20 +04:00
|
|
|
<tr><td>1648</td>
|
2007-10-14 01:45:08 +04:00
|
|
|
<td class="red"> return Doctrine::dump(get_object_vars($this));
|
|
|
|
</td></tr>
|
2007-10-21 20:12:20 +04:00
|
|
|
<tr><td>1649</td>
|
2007-10-14 01:45:08 +04:00
|
|
|
<td class="orange"> }
|
|
|
|
</td></tr>
|
2007-10-21 20:12:20 +04:00
|
|
|
<tr><td>1650</td>
|
|
|
|
<td class="normal">
|
|
|
|
</td></tr>
|
|
|
|
<tr><td>1651</td>
|
2007-10-14 01:45:08 +04:00
|
|
|
<td class="normal"> /**
|
|
|
|
</td></tr>
|
2007-10-21 20:12:20 +04:00
|
|
|
<tr><td>1652</td>
|
2007-10-14 01:45:08 +04:00
|
|
|
<td class="normal"> * returns a string representation of this object
|
|
|
|
</td></tr>
|
2007-10-21 20:12:20 +04:00
|
|
|
<tr><td>1653</td>
|
2007-10-14 01:45:08 +04:00
|
|
|
<td class="normal"> */
|
|
|
|
</td></tr>
|
2007-10-21 20:12:20 +04:00
|
|
|
<tr><td>1654</td>
|
2007-10-14 01:45:08 +04:00
|
|
|
<td class="normal"> public function __toString()
|
|
|
|
</td></tr>
|
2007-10-21 20:12:20 +04:00
|
|
|
<tr><td>1655</td>
|
2007-10-14 01:45:08 +04:00
|
|
|
<td class="normal"> {
|
|
|
|
</td></tr>
|
2007-10-21 20:12:20 +04:00
|
|
|
<tr><td>1656</td>
|
2007-10-14 01:45:08 +04:00
|
|
|
<td class="red"> return (string) $this->_oid;
|
|
|
|
</td></tr>
|
2007-10-21 20:12:20 +04:00
|
|
|
<tr><td>1657</td>
|
2007-10-14 01:45:08 +04:00
|
|
|
<td class="orange"> }
|
|
|
|
</td></tr>
|
2007-10-21 20:12:20 +04:00
|
|
|
<tr><td>1658</td>
|
2007-10-14 01:45:08 +04:00
|
|
|
<td class="normal">}
|
|
|
|
</td></tr>
|
|
|
|
</table></body></html>
|