3 namespace DoctrineProxies\__CG__\Stock\Entity;
6 * DO NOT EDIT THIS FILE - IT WAS CREATED BY DOCTRINE'S PROXY GENERATOR
8 class Stock extends \Stock\Entity\Stock implements \Doctrine\ORM\Proxy\Proxy
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.
15 * @see \Doctrine\Common\Persistence\Proxy::__setInitializer
17 public $__initializer__;
20 * @var \Closure the callback responsible of loading properties that need to be copied in the cloned object
22 * @see \Doctrine\Common\Persistence\Proxy::__setCloner
27 * @var boolean flag indicating if this object was already initialized
29 * @see \Doctrine\Common\Persistence\Proxy::__isInitialized
31 public $__isInitialized__ = false;
34 * @var array properties to be lazy loaded, with keys being the property
35 * names and values being their default values
37 * @see \Doctrine\Common\Persistence\Proxy::__getLazyProperties
39 public static $lazyPropertiesDefaults = array();
44 * @param \Closure $initializer
45 * @param \Closure $cloner
47 public function __construct($initializer = null, $cloner = null)
50 $this->__initializer__ = $initializer;
51 $this->__cloner__ = $cloner;
58 public function __get($name)
60 $this->__initializer__ && $this->__initializer__->__invoke($this, '__get', array($name));
62 return parent::__get($name);
70 public function __set($name, $value)
72 $this->__initializer__ && $this->__initializer__->__invoke($this, '__set', array($name, $value));
74 return parent::__set($name, $value);
83 public function __sleep()
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');
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');
95 public function __wakeup()
97 if ( ! $this->__isInitialized__) {
98 $this->__initializer__ = function (Stock $proxy) {
99 $proxy->__setInitializer(null);
100 $proxy->__setCloner(null);
102 $existingProperties = get_object_vars($proxy);
104 foreach ($proxy->__getLazyProperties() as $property => $defaultValue) {
105 if ( ! array_key_exists($property, $existingProperties)) {
106 $proxy->$property = $defaultValue;
117 public function __clone()
119 $this->__cloner__ && $this->__cloner__->__invoke($this, '__clone', array());
123 * Forces initialization of the proxy
125 public function __load()
127 $this->__initializer__ && $this->__initializer__->__invoke($this, '__load', array());
132 * @internal generated method: use only when explicitly handling proxy specific loading logic
134 public function __isInitialized()
136 return $this->__isInitialized__;
141 * @internal generated method: use only when explicitly handling proxy specific loading logic
143 public function __setInitialized($initialized)
145 $this->__isInitialized__ = $initialized;
150 * @internal generated method: use only when explicitly handling proxy specific loading logic
152 public function __setInitializer(\Closure $initializer = null)
154 $this->__initializer__ = $initializer;
159 * @internal generated method: use only when explicitly handling proxy specific loading logic
161 public function __getInitializer()
163 return $this->__initializer__;
168 * @internal generated method: use only when explicitly handling proxy specific loading logic
170 public function __setCloner(\Closure $cloner = null)
172 $this->__cloner__ = $cloner;
177 * @internal generated method: use only when explicitly handling proxy specific cloning logic
179 public function __getCloner()
181 return $this->__cloner__;
186 * @internal generated method: use only when explicitly handling proxy specific loading logic
189 public function __getLazyProperties()
191 return self::$lazyPropertiesDefaults;
198 public function addAccessory(\Stock\Entity\Accessory $accessory)
201 $this->__initializer__ && $this->__initializer__->__invoke($this, 'addAccessory', array($accessory));
203 return parent::addAccessory($accessory);
209 public function addDamage(\Stock\Entity\Damage $damage)
212 $this->__initializer__ && $this->__initializer__->__invoke($this, 'addDamage', array($damage));
214 return parent::addDamage($damage);
220 public function setCreateTime()
223 $this->__initializer__ && $this->__initializer__->__invoke($this, 'setCreateTime', array());
225 return parent::setCreateTime();
231 public function setUpdateTime()
234 $this->__initializer__ && $this->__initializer__->__invoke($this, 'setUpdateTime', array());
236 return parent::setUpdateTime();
242 public function postInsert()
245 $this->__initializer__ && $this->__initializer__->__invoke($this, 'postInsert', array());
247 return parent::postInsert();
253 public function toArray(array $expand = array (
254 ), array $intersect = array (
255 ), $showIdentifiers = false, $expandAll = 0)
258 $this->__initializer__ && $this->__initializer__->__invoke($this, 'toArray', array($expand, $intersect, $showIdentifiers, $expandAll));
260 return parent::toArray($expand, $intersect, $showIdentifiers, $expandAll);
266 public function accessoriesToArray($showIdentifiers = false)
269 $this->__initializer__ && $this->__initializer__->__invoke($this, 'accessoriesToArray', array($showIdentifiers));
271 return parent::accessoriesToArray($showIdentifiers);
277 public function damagesToArray($showIdentifiers = false)
280 $this->__initializer__ && $this->__initializer__->__invoke($this, 'damagesToArray', array($showIdentifiers));
282 return parent::damagesToArray($showIdentifiers);
288 public function fromArray($data = array (
292 $this->__initializer__ && $this->__initializer__->__invoke($this, 'fromArray', array($data));
294 return parent::fromArray($data);