initial commit
[namibia] / data / DoctrineORMModule / Proxy / __CG__StockEntityStock.php
1 <?php
2
3 namespace DoctrineProxies\__CG__\Stock\Entity;
4
5 /**
6  * DO NOT EDIT THIS FILE - IT WAS CREATED BY DOCTRINE'S PROXY GENERATOR
7  */
8 class Stock extends \Stock\Entity\Stock implements \Doctrine\ORM\Proxy\Proxy
9 {
10     /**
11      * @var \Closure the callback responsible for loading properties in the proxy object. This callback is called with
12      *      three parameters, being respectively the proxy object to be initialized, the method that triggered the
13      *      initialization process and an array of ordered parameters that were passed to that method.
14      *
15      * @see \Doctrine\Common\Persistence\Proxy::__setInitializer
16      */
17     public $__initializer__;
18
19     /**
20      * @var \Closure the callback responsible of loading properties that need to be copied in the cloned object
21      *
22      * @see \Doctrine\Common\Persistence\Proxy::__setCloner
23      */
24     public $__cloner__;
25
26     /**
27      * @var boolean flag indicating if this object was already initialized
28      *
29      * @see \Doctrine\Common\Persistence\Proxy::__isInitialized
30      */
31     public $__isInitialized__ = false;
32
33     /**
34      * @var array properties to be lazy loaded, with keys being the property
35      *            names and values being their default values
36      *
37      * @see \Doctrine\Common\Persistence\Proxy::__getLazyProperties
38      */
39     public static $lazyPropertiesDefaults = array();
40
41
42
43     /**
44      * @param \Closure $initializer
45      * @param \Closure $cloner
46      */
47     public function __construct($initializer = null, $cloner = null)
48     {
49
50         $this->__initializer__ = $initializer;
51         $this->__cloner__      = $cloner;
52     }
53
54     /**
55      * {@inheritDoc}
56      * @param string $name
57      */
58     public function __get($name)
59     {
60         $this->__initializer__ && $this->__initializer__->__invoke($this, '__get', array($name));
61
62         return parent::__get($name);
63     }
64
65     /**
66      * {@inheritDoc}
67      * @param string $name
68      * @param mixed  $value
69      */
70     public function __set($name, $value)
71     {
72         $this->__initializer__ && $this->__initializer__->__invoke($this, '__set', array($name, $value));
73
74         return parent::__set($name, $value);
75     }
76
77
78
79     /**
80      * 
81      * @return array
82      */
83     public function __sleep()
84     {
85         if ($this->__isInitialized__) {
86             return array('__isInitialized__', 'id', 'uvi', 'company', 'createdBy', 'valuation', 'priceGuide', 'auction', 'region', 'type', 'referenceNumber', 'stockNumber', 'registrationNumber', 'vinNumber', 'engineNumber', 'fuelType', 'transmissionType', 'exteriorColour', 'interiorColour', 'condition', 'vehicleYear', 'km', 'upholstery', 'papers', 'papersNotes', 'natis', 'spareKeys', 'fullServiceHistory', 'fshNotes', 'tradePriceDate', 'tradePrice', 'retailPrice', 'oldTradePriceDate', 'oldTradePrice', 'oldRetailPrice', 'retailAmountRequired', 'purchasePrice', 'salePrice', 'listPriceDate', 'listPrice', 'oldListPriceDate', 'oldListPrice', 'mainImage', 'frontImage', 'rightImage', 'leftImage', 'backImage', 'interiorImage', 'engineImage', 'natisImage', 'accessories', 'accessoryNotes', 'damages', 'damageTotal', 'damageNotes', 'previousRepairsNoted', 'previousRepairsNotes', 'coverReceived', 'numberOfOffers', 'highestOffer', 'loadedOnPriceGuide', 'timesListed', 'highestBid', 'adherence', 'reset', 'previousState', 'jobState', 'created', 'updated', 'archived');
87         }
88
89         return array('__isInitialized__', 'id', 'uvi', 'company', 'createdBy', 'valuation', 'priceGuide', 'auction', 'region', 'type', 'referenceNumber', 'stockNumber', 'registrationNumber', 'vinNumber', 'engineNumber', 'fuelType', 'transmissionType', 'exteriorColour', 'interiorColour', 'condition', 'vehicleYear', 'km', 'upholstery', 'papers', 'papersNotes', 'natis', 'spareKeys', 'fullServiceHistory', 'fshNotes', 'tradePriceDate', 'tradePrice', 'retailPrice', 'oldTradePriceDate', 'oldTradePrice', 'oldRetailPrice', 'retailAmountRequired', 'purchasePrice', 'salePrice', 'listPriceDate', 'listPrice', 'oldListPriceDate', 'oldListPrice', 'mainImage', 'frontImage', 'rightImage', 'leftImage', 'backImage', 'interiorImage', 'engineImage', 'natisImage', 'accessories', 'accessoryNotes', 'damages', 'damageTotal', 'damageNotes', 'previousRepairsNoted', 'previousRepairsNotes', 'coverReceived', 'numberOfOffers', 'highestOffer', 'loadedOnPriceGuide', 'timesListed', 'highestBid', 'adherence', 'reset', 'previousState', 'jobState', 'created', 'updated', 'archived');
90     }
91
92     /**
93      * 
94      */
95     public function __wakeup()
96     {
97         if ( ! $this->__isInitialized__) {
98             $this->__initializer__ = function (Stock $proxy) {
99                 $proxy->__setInitializer(null);
100                 $proxy->__setCloner(null);
101
102                 $existingProperties = get_object_vars($proxy);
103
104                 foreach ($proxy->__getLazyProperties() as $property => $defaultValue) {
105                     if ( ! array_key_exists($property, $existingProperties)) {
106                         $proxy->$property = $defaultValue;
107                     }
108                 }
109             };
110
111         }
112     }
113
114     /**
115      * 
116      */
117     public function __clone()
118     {
119         $this->__cloner__ && $this->__cloner__->__invoke($this, '__clone', array());
120     }
121
122     /**
123      * Forces initialization of the proxy
124      */
125     public function __load()
126     {
127         $this->__initializer__ && $this->__initializer__->__invoke($this, '__load', array());
128     }
129
130     /**
131      * {@inheritDoc}
132      * @internal generated method: use only when explicitly handling proxy specific loading logic
133      */
134     public function __isInitialized()
135     {
136         return $this->__isInitialized__;
137     }
138
139     /**
140      * {@inheritDoc}
141      * @internal generated method: use only when explicitly handling proxy specific loading logic
142      */
143     public function __setInitialized($initialized)
144     {
145         $this->__isInitialized__ = $initialized;
146     }
147
148     /**
149      * {@inheritDoc}
150      * @internal generated method: use only when explicitly handling proxy specific loading logic
151      */
152     public function __setInitializer(\Closure $initializer = null)
153     {
154         $this->__initializer__ = $initializer;
155     }
156
157     /**
158      * {@inheritDoc}
159      * @internal generated method: use only when explicitly handling proxy specific loading logic
160      */
161     public function __getInitializer()
162     {
163         return $this->__initializer__;
164     }
165
166     /**
167      * {@inheritDoc}
168      * @internal generated method: use only when explicitly handling proxy specific loading logic
169      */
170     public function __setCloner(\Closure $cloner = null)
171     {
172         $this->__cloner__ = $cloner;
173     }
174
175     /**
176      * {@inheritDoc}
177      * @internal generated method: use only when explicitly handling proxy specific cloning logic
178      */
179     public function __getCloner()
180     {
181         return $this->__cloner__;
182     }
183
184     /**
185      * {@inheritDoc}
186      * @internal generated method: use only when explicitly handling proxy specific loading logic
187      * @static
188      */
189     public function __getLazyProperties()
190     {
191         return self::$lazyPropertiesDefaults;
192     }
193
194     
195     /**
196      * {@inheritDoc}
197      */
198     public function addAccessory(\Stock\Entity\Accessory $accessory)
199     {
200
201         $this->__initializer__ && $this->__initializer__->__invoke($this, 'addAccessory', array($accessory));
202
203         return parent::addAccessory($accessory);
204     }
205
206     /**
207      * {@inheritDoc}
208      */
209     public function addDamage(\Stock\Entity\Damage $damage)
210     {
211
212         $this->__initializer__ && $this->__initializer__->__invoke($this, 'addDamage', array($damage));
213
214         return parent::addDamage($damage);
215     }
216
217     /**
218      * {@inheritDoc}
219      */
220     public function setCreateTime()
221     {
222
223         $this->__initializer__ && $this->__initializer__->__invoke($this, 'setCreateTime', array());
224
225         return parent::setCreateTime();
226     }
227
228     /**
229      * {@inheritDoc}
230      */
231     public function setUpdateTime()
232     {
233
234         $this->__initializer__ && $this->__initializer__->__invoke($this, 'setUpdateTime', array());
235
236         return parent::setUpdateTime();
237     }
238
239     /**
240      * {@inheritDoc}
241      */
242     public function postInsert()
243     {
244
245         $this->__initializer__ && $this->__initializer__->__invoke($this, 'postInsert', array());
246
247         return parent::postInsert();
248     }
249
250     /**
251      * {@inheritDoc}
252      */
253     public function toArray(array $expand = array (
254 ), array $intersect = array (
255 ), $showIdentifiers = false, $expandAll = 0)
256     {
257
258         $this->__initializer__ && $this->__initializer__->__invoke($this, 'toArray', array($expand, $intersect, $showIdentifiers, $expandAll));
259
260         return parent::toArray($expand, $intersect, $showIdentifiers, $expandAll);
261     }
262
263     /**
264      * {@inheritDoc}
265      */
266     public function accessoriesToArray($showIdentifiers = false)
267     {
268
269         $this->__initializer__ && $this->__initializer__->__invoke($this, 'accessoriesToArray', array($showIdentifiers));
270
271         return parent::accessoriesToArray($showIdentifiers);
272     }
273
274     /**
275      * {@inheritDoc}
276      */
277     public function damagesToArray($showIdentifiers = false)
278     {
279
280         $this->__initializer__ && $this->__initializer__->__invoke($this, 'damagesToArray', array($showIdentifiers));
281
282         return parent::damagesToArray($showIdentifiers);
283     }
284
285     /**
286      * {@inheritDoc}
287      */
288     public function fromArray($data = array (
289 ))
290     {
291
292         $this->__initializer__ && $this->__initializer__->__invoke($this, 'fromArray', array($data));
293
294         return parent::fromArray($data);
295     }
296
297 }