3 namespace DoctrineProxies\__CG__\Location\Entity;
6 * DO NOT EDIT THIS FILE - IT WAS CREATED BY DOCTRINE'S PROXY GENERATOR
8 class Country extends \Location\Entity\Country 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', 'name', 'isoCode', 'fipsCode', 'dailingCode', 'archived', '' . "\0" . 'Location\\Entity\\Country' . "\0" . 'regions');
89 return array('__isInitialized__', 'id', 'name', 'isoCode', 'fipsCode', 'dailingCode', 'archived', '' . "\0" . 'Location\\Entity\\Country' . "\0" . 'regions');
95 public function __wakeup()
97 if ( ! $this->__isInitialized__) {
98 $this->__initializer__ = function (Country $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 addRegion(\Location\Entity\Region $region)
201 $this->__initializer__ && $this->__initializer__->__invoke($this, 'addRegion', array($region));
203 return parent::addRegion($region);
209 public function toArray(array $expand = array (
210 ), array $intersect = array (
214 $this->__initializer__ && $this->__initializer__->__invoke($this, 'toArray', array($expand, $intersect));
216 return parent::toArray($expand, $intersect);
222 public function toSynchArray()
225 $this->__initializer__ && $this->__initializer__->__invoke($this, 'toSynchArray', array());
227 return parent::toSynchArray();
233 public function fromArray($data = array (
237 $this->__initializer__ && $this->__initializer__->__invoke($this, 'fromArray', array($data));
239 return parent::fromArray($data);