/
home
/
obinna
/
html
/
restaurants
/
var
/
cache
/
dev
/
doctrine
/
odm
/
mongodb
/
Proxies
/
Upload File
HOME
<?php namespace MongoDBODMProxies\__PM__\App\Document\Item; class Generatedd61ea7ee6451e671b065dcdb9be226ee extends \App\Document\Item implements \ProxyManager\Proxy\GhostObjectInterface { /** * @var \Closure|null initializer responsible for generating the wrapped object */ private $initializerbab93 = null; /** * @var bool tracks initialization status - true while the object is initializing */ private $initializationTracker53327 = false; /** * @var bool[] map of public properties of the parent class */ private static $publicPropertiesdadd6 = [ ]; /** * @var array[][] visibility and default value of defined properties, indexed by * property name and class name */ private static $privateProperties12226 = [ 'name' => [ 'App\\Document\\Item' => true, ], 'price' => [ 'App\\Document\\Item' => true, ], 'discount' => [ 'App\\Document\\Item' => true, ], 'category' => [ 'App\\Document\\Item' => true, ], 'img' => [ 'App\\Document\\Item' => true, ], 'deleted' => [ 'App\\Document\\Item' => true, ], 'owner' => [ 'App\\Document\\Item' => true, ], 'description' => [ 'App\\Document\\Item' => true, ], 'place_slug' => [ 'App\\Document\\Item' => true, ], 'place_name' => [ 'App\\Document\\Item' => true, ], 'created' => [ 'App\\Document\\Item' => true, ], ]; /** * @var string[][] declaring class name of defined protected properties, indexed by * property name */ private static $protectedProperties04616 = [ ]; private static $signatured61ea7ee6451e671b065dcdb9be226ee = 'YTo0OntzOjk6ImNsYXNzTmFtZSI7czoxNzoiQXBwXERvY3VtZW50XEl0ZW0iO3M6NzoiZmFjdG9yeSI7czo0NDoiUHJveHlNYW5hZ2VyXEZhY3RvcnlcTGF6eUxvYWRpbmdHaG9zdEZhY3RvcnkiO3M6MTk6InByb3h5TWFuYWdlclZlcnNpb24iO3M6NDc6InYxLjAuNUAwMDZhYTVkMzJmODg3YTRkYjQzNTNiMTNiNWI1MDk1NjEzZTA2MTFmIjtzOjEyOiJwcm94eU9wdGlvbnMiO2E6MTp7czoxNzoic2tpcHBlZFByb3BlcnRpZXMiO2E6MTp7aTowO3M6MjE6IgBBcHBcRG9jdW1lbnRcSXRlbQBpZCI7fX19'; /** * Triggers initialization logic for this ghost object * * @param string $methodName * @param mixed[] $parameters * * @return mixed */ private function callInitializera326d($methodName, array $parameters) { if ($this->initializationTracker53327 || ! $this->initializerbab93) { return; } $this->initializationTracker53327 = true; static $cacheApp_Document_Item; $cacheApp_Document_Item ?? $cacheApp_Document_Item = \Closure::bind(static function ($instance) { $instance->name = NULL; $instance->price = NULL; $instance->discount = NULL; $instance->category = NULL; $instance->img = NULL; $instance->deleted = NULL; $instance->owner = NULL; $instance->description = NULL; $instance->place_slug = NULL; $instance->place_name = NULL; $instance->created = NULL; }, null, 'App\\Document\\Item'); $cacheApp_Document_Item($this); $properties = [ ]; static $cacheFetchApp_Document_Item; $cacheFetchApp_Document_Item ?? $cacheFetchApp_Document_Item = \Closure::bind(function ($instance, array & $properties) { $properties['' . "\0" . 'App\\Document\\Item' . "\0" . 'name'] = & $instance->name; $properties['' . "\0" . 'App\\Document\\Item' . "\0" . 'price'] = & $instance->price; $properties['' . "\0" . 'App\\Document\\Item' . "\0" . 'discount'] = & $instance->discount; $properties['' . "\0" . 'App\\Document\\Item' . "\0" . 'category'] = & $instance->category; $properties['' . "\0" . 'App\\Document\\Item' . "\0" . 'img'] = & $instance->img; $properties['' . "\0" . 'App\\Document\\Item' . "\0" . 'deleted'] = & $instance->deleted; $properties['' . "\0" . 'App\\Document\\Item' . "\0" . 'owner'] = & $instance->owner; $properties['' . "\0" . 'App\\Document\\Item' . "\0" . 'description'] = & $instance->description; $properties['' . "\0" . 'App\\Document\\Item' . "\0" . 'place_slug'] = & $instance->place_slug; $properties['' . "\0" . 'App\\Document\\Item' . "\0" . 'place_name'] = & $instance->place_name; $properties['' . "\0" . 'App\\Document\\Item' . "\0" . 'created'] = & $instance->created; }, $this, 'App\\Document\\Item'); $cacheFetchApp_Document_Item($this, $properties); $result = $this->initializerbab93->__invoke($this, $methodName, $parameters, $this->initializerbab93, $properties); $this->initializationTracker53327 = false; return $result; } /** * Constructor for lazy initialization * * @param \Closure|null $initializer */ public static function staticProxyConstructor($initializer) { static $reflection; $reflection = $reflection ?? new \ReflectionClass(__CLASS__); $instance = $reflection->newInstanceWithoutConstructor(); \Closure::bind(function (\App\Document\Item $instance) { unset($instance->name, $instance->price, $instance->discount, $instance->category, $instance->img, $instance->deleted, $instance->owner, $instance->description, $instance->place_slug, $instance->place_name, $instance->created); }, $instance, 'App\\Document\\Item')->__invoke($instance); $instance->initializerbab93 = $initializer; return $instance; } public function & __get($name) { $this->initializerbab93 && ! $this->initializationTracker53327 && $this->callInitializera326d('__get', array('name' => $name)); if (isset(self::$publicPropertiesdadd6[$name])) { return $this->$name; } if (isset(self::$protectedProperties04616[$name])) { if ($this->initializationTracker53327) { return $this->$name; } // check protected property access via compatible class $callers = debug_backtrace(\DEBUG_BACKTRACE_PROVIDE_OBJECT, 2); $caller = isset($callers[1]) ? $callers[1] : []; $object = isset($caller['object']) ? $caller['object'] : ''; $expectedType = self::$protectedProperties04616[$name]; if ($object instanceof $expectedType) { return $this->$name; } $class = isset($caller['class']) ? $caller['class'] : ''; if ($class === $expectedType || is_subclass_of($class, $expectedType) || $class === 'ReflectionProperty') { return $this->$name; } } elseif (isset(self::$privateProperties12226[$name])) { // check private property access via same class $callers = debug_backtrace(\DEBUG_BACKTRACE_PROVIDE_OBJECT, 2); $caller = isset($callers[1]) ? $callers[1] : []; $class = isset($caller['class']) ? $caller['class'] : ''; static $accessorCache = []; if (isset(self::$privateProperties12226[$name][$class])) { $cacheKey = $class . '#' . $name; $accessor = isset($accessorCache[$cacheKey]) ? $accessorCache[$cacheKey] : $accessorCache[$cacheKey] = \Closure::bind(static function & ($instance) use ($name) { return $instance->$name; }, null, $class); return $accessor($this); } if ($this->initializationTracker53327 || 'ReflectionProperty' === $class) { $tmpClass = key(self::$privateProperties12226[$name]); $cacheKey = $tmpClass . '#' . $name; $accessor = isset($accessorCache[$cacheKey]) ? $accessorCache[$cacheKey] : $accessorCache[$cacheKey] = \Closure::bind(static function & ($instance) use ($name) { return $instance->$name; }, null, $tmpClass); return $accessor($this); } } $realInstanceReflection = new \ReflectionClass(get_parent_class($this)); if (! $realInstanceReflection->hasProperty($name)) { $targetObject = $this; $backtrace = debug_backtrace(false, 1); trigger_error( sprintf( 'Undefined property: %s::$%s in %s on line %s', $realInstanceReflection->getName(), $name, $backtrace[0]['file'], $backtrace[0]['line'] ), \E_USER_NOTICE ); return $targetObject->$name; } $targetObject = $realInstanceReflection->newInstanceWithoutConstructor(); $accessor = function & () use ($targetObject, $name) { return $targetObject->$name; }; $backtrace = debug_backtrace(true, 2); $scopeObject = isset($backtrace[1]['object']) ? $backtrace[1]['object'] : new \ProxyManager\Stub\EmptyClassStub(); $accessor = $accessor->bindTo($scopeObject, get_class($scopeObject)); $returnValue = & $accessor(); return $returnValue; } public function __set($name, $value) { $this->initializerbab93 && $this->callInitializera326d('__set', array('name' => $name, 'value' => $value)); if (isset(self::$publicPropertiesdadd6[$name])) { return ($this->$name = $value); } if (isset(self::$protectedProperties04616[$name])) { // check protected property access via compatible class $callers = debug_backtrace(\DEBUG_BACKTRACE_PROVIDE_OBJECT, 2); $caller = isset($callers[1]) ? $callers[1] : []; $object = isset($caller['object']) ? $caller['object'] : ''; $expectedType = self::$protectedProperties04616[$name]; if ($object instanceof $expectedType) { return ($this->$name = $value); } $class = isset($caller['class']) ? $caller['class'] : ''; if ($class === $expectedType || is_subclass_of($class, $expectedType) || $class === 'ReflectionProperty') { return ($this->$name = $value); } } elseif (isset(self::$privateProperties12226[$name])) { // check private property access via same class $callers = debug_backtrace(\DEBUG_BACKTRACE_PROVIDE_OBJECT, 2); $caller = isset($callers[1]) ? $callers[1] : []; $class = isset($caller['class']) ? $caller['class'] : ''; static $accessorCache = []; if (isset(self::$privateProperties12226[$name][$class])) { $cacheKey = $class . '#' . $name; $accessor = isset($accessorCache[$cacheKey]) ? $accessorCache[$cacheKey] : $accessorCache[$cacheKey] = \Closure::bind(static function ($instance, $value) use ($name) { return ($instance->$name = $value); }, null, $class); return $accessor($this, $value); } if ('ReflectionProperty' === $class) { $tmpClass = key(self::$privateProperties12226[$name]); $cacheKey = $tmpClass . '#' . $name; $accessor = isset($accessorCache[$cacheKey]) ? $accessorCache[$cacheKey] : $accessorCache[$cacheKey] = \Closure::bind(static function ($instance, $value) use ($name) { return ($instance->$name = $value); }, null, $tmpClass); return $accessor($this, $value); } } $realInstanceReflection = new \ReflectionClass(get_parent_class($this)); if (! $realInstanceReflection->hasProperty($name)) { $targetObject = $this; $targetObject->$name = $value; return $targetObject->$name; } $targetObject = $realInstanceReflection->newInstanceWithoutConstructor(); $accessor = function & () use ($targetObject, $name, $value) { $targetObject->$name = $value; return $targetObject->$name; }; $backtrace = debug_backtrace(true, 2); $scopeObject = isset($backtrace[1]['object']) ? $backtrace[1]['object'] : new \ProxyManager\Stub\EmptyClassStub(); $accessor = $accessor->bindTo($scopeObject, get_class($scopeObject)); $returnValue = & $accessor(); return $returnValue; } public function __isset($name) { $this->initializerbab93 && $this->callInitializera326d('__isset', array('name' => $name)); if (isset(self::$publicPropertiesdadd6[$name])) { return isset($this->$name); } if (isset(self::$protectedProperties04616[$name])) { // check protected property access via compatible class $callers = debug_backtrace(\DEBUG_BACKTRACE_PROVIDE_OBJECT, 2); $caller = isset($callers[1]) ? $callers[1] : []; $object = isset($caller['object']) ? $caller['object'] : ''; $expectedType = self::$protectedProperties04616[$name]; if ($object instanceof $expectedType) { return isset($this->$name); } $class = isset($caller['class']) ? $caller['class'] : ''; if ($class === $expectedType || is_subclass_of($class, $expectedType)) { return isset($this->$name); } } else { // check private property access via same class $callers = debug_backtrace(\DEBUG_BACKTRACE_PROVIDE_OBJECT, 2); $caller = isset($callers[1]) ? $callers[1] : []; $class = isset($caller['class']) ? $caller['class'] : ''; static $accessorCache = []; if (isset(self::$privateProperties12226[$name][$class])) { $cacheKey = $class . '#' . $name; $accessor = isset($accessorCache[$cacheKey]) ? $accessorCache[$cacheKey] : $accessorCache[$cacheKey] = \Closure::bind(static function ($instance) use ($name) { return isset($instance->$name); }, null, $class); return $accessor($this); } if ('ReflectionProperty' === $class) { $tmpClass = key(self::$privateProperties12226[$name]); $cacheKey = $tmpClass . '#' . $name; $accessor = isset($accessorCache[$cacheKey]) ? $accessorCache[$cacheKey] : $accessorCache[$cacheKey] = \Closure::bind(static function ($instance) use ($name) { return isset($instance->$name); }, null, $tmpClass); return $accessor($this); } } $realInstanceReflection = new \ReflectionClass(get_parent_class($this)); if (! $realInstanceReflection->hasProperty($name)) { $targetObject = $this; return isset($targetObject->$name); } $targetObject = $realInstanceReflection->newInstanceWithoutConstructor(); $accessor = function () use ($targetObject, $name) { return isset($targetObject->$name); }; $backtrace = debug_backtrace(true, 2); $scopeObject = isset($backtrace[1]['object']) ? $backtrace[1]['object'] : new \ProxyManager\Stub\EmptyClassStub(); $accessor = $accessor->bindTo($scopeObject, get_class($scopeObject)); $returnValue = $accessor(); return $returnValue; } public function __unset($name) { $this->initializerbab93 && $this->callInitializera326d('__unset', array('name' => $name)); if (isset(self::$publicPropertiesdadd6[$name])) { unset($this->$name); return; } if (isset(self::$protectedProperties04616[$name])) { // check protected property access via compatible class $callers = debug_backtrace(\DEBUG_BACKTRACE_PROVIDE_OBJECT, 2); $caller = isset($callers[1]) ? $callers[1] : []; $object = isset($caller['object']) ? $caller['object'] : ''; $expectedType = self::$protectedProperties04616[$name]; if ($object instanceof $expectedType) { unset($this->$name); return; } $class = isset($caller['class']) ? $caller['class'] : ''; if ($class === $expectedType || is_subclass_of($class, $expectedType) || $class === 'ReflectionProperty') { unset($this->$name); return; } } elseif (isset(self::$privateProperties12226[$name])) { // check private property access via same class $callers = debug_backtrace(\DEBUG_BACKTRACE_PROVIDE_OBJECT, 2); $caller = isset($callers[1]) ? $callers[1] : []; $class = isset($caller['class']) ? $caller['class'] : ''; static $accessorCache = []; if (isset(self::$privateProperties12226[$name][$class])) { $cacheKey = $class . '#' . $name; $accessor = isset($accessorCache[$cacheKey]) ? $accessorCache[$cacheKey] : $accessorCache[$cacheKey] = \Closure::bind(static function ($instance) use ($name) { unset($instance->$name); }, null, $class); return $accessor($this); } if ('ReflectionProperty' === $class) { $tmpClass = key(self::$privateProperties12226[$name]); $cacheKey = $tmpClass . '#' . $name; $accessor = isset($accessorCache[$cacheKey]) ? $accessorCache[$cacheKey] : $accessorCache[$cacheKey] = \Closure::bind(static function ($instance) use ($name) { unset($instance->$name); }, null, $tmpClass); return $accessor($this); } } $realInstanceReflection = new \ReflectionClass(get_parent_class($this)); if (! $realInstanceReflection->hasProperty($name)) { $targetObject = $this; unset($targetObject->$name); return; } $targetObject = $realInstanceReflection->newInstanceWithoutConstructor(); $accessor = function () use ($targetObject, $name) { unset($targetObject->$name); return; }; $backtrace = debug_backtrace(true, 2); $scopeObject = isset($backtrace[1]['object']) ? $backtrace[1]['object'] : new \ProxyManager\Stub\EmptyClassStub(); $accessor = $accessor->bindTo($scopeObject, get_class($scopeObject)); $accessor(); } public function __clone() { $this->initializerbab93 && $this->callInitializera326d('__clone', []); } public function __sleep() { $this->initializerbab93 && $this->callInitializera326d('__sleep', []); return array_keys((array) $this); } public function setProxyInitializer(\Closure $initializer = null) : void { $this->initializerbab93 = $initializer; } public function getProxyInitializer() : ?\Closure { return $this->initializerbab93; } public function initializeProxy() : bool { return $this->initializerbab93 && $this->callInitializera326d('initializeProxy', []); } public function isProxyInitialized() : bool { return ! $this->initializerbab93; } }