@param \ReflectionClass $class
@param object           $object

@return void
358639
private function injectProperties(\ReflectionClass $class, $object) : void
    {
        foreach ($this->reflectionTools->getClassProperties($class) as $property) {
            if ($this->policy->isPropertyInjected($property)) {
                $value = $this->resolver->getPropertyValue($property);
                $property->setAccessible(true);
                $property->setValue($object, $value);
            }
        }
    }
80880
private static function methodsOf(\ReflectionClass $class): \Iterator
    {
        return new \CallbackFilterIterator(
                new \ArrayIterator($class->getMethods()),
                function(\ReflectionMethod $method)
                {
                    return !$method->isPrivate()
                            && !$method->isFinal()
                            && !$method->isStatic()
                            && !$method->isConstructor()
                            && !$method->isDestructor();
                }
        );
    }
1108221
public function setProperty(&$object, string $propertyName, $value)
    {
        $reflection = new ReflectionClass(get_class($object));

        /** @var ReflectionProperty $property */
        $property = $reflection->getProperty($propertyName);
        $property->setAccessible(true);

        $property->setValue($object, $value);
    }
422429
public function instance_of($object, $class){
	    if(is_object($object)) return $object instanceof $class;
	    if(is_string($object)){
	        if(is_object($class)) $class=get_class($class);
	
	        if(class_exists($class)) return is_subclass_of($object, $class) || $object==$class;
	        if(interface_exists($class)) {
	            $reflect = new ReflectionClass($object);
	            return !$reflect->implementsInterface($class);
	        }
	
	    }
	    return false;
	}
894465
public function initialize($object)
    {
        if (!is_object($object)) {
            return;
        }

        foreach ($this->knownDependencies as $interface => $dependencyInfo) {
            list($setterMethod, $serviceId) = $dependencyInfo;

            if (is_a($object, $interface)) {
                $object->$setterMethod($this->container->get($serviceId));
            }
        }
    }
1116416
protected function doRestore($object): void
    {
        $changeSet = $this->uow->getObjectChangeSet($object);
        $ref = new \ReflectionClass($object);

        foreach ($changeSet as $field => $values) {
            $fv = new FieldVote($object, $field);

            if ($this->isRestoreViewGranted($fv, $values)) {
                $property = $ref->getProperty($field);
                $property->setAccessible(true);
                $property->setValue($object, $values['old']);
            }
        }
    }
81955
public function add($class = null)
        {
            $class = $this->getClass($class);

            if (!Arrays::exists($class, $this->reflections)) {
                $this->reflections[$class] = new ReflectionClass($class);
            }

            return $this;
        }
1255625
public function add($class=null)
	{
		$class = $this->get_class($class);

		if (!isset($this->reflections[$class]))
			$this->reflections[$class] = new ReflectionClass($class);
			
		return $this;
	}
419561
public function wakeupReflection(ReflectionService $reflectionService) : void
    {
        // Restore ReflectionClass and properties
        $this->reflectionClass = $reflectionService->getClass($this->className);

        if (! $this->reflectionClass) {
            return;
        }

        $this->className = $this->reflectionClass->getName();

        foreach ($this->declaredProperties as $property) {
            /** @var Property $property */
            $property->wakeupReflection($reflectionService);
        }
    }
619752
private function createMap(string $class, $object)
    {
        $rule = $this->rules[$class];
        $reflectionObject = new \ReflectionObject($object);
        $result = [];

        foreach ($rule->getMap() as $property => $key) {
            $reflectionProperty = $reflectionObject->getProperty($property);
            $reflectionProperty->setAccessible(true);

            $serializer = $rule->getSerializer($property);

            $result[$key] = is_callable($serializer)
                ? $serializer($reflectionProperty->getValue($object))
                : $reflectionProperty->getValue($object);
        }

        return $result;
    }
656937
public function setClass($class = '')
    {
        if (is_string($class) && (empty($class) === true || Format::isClass($class) === true)) {
            $class = trim($class);
            $this->class = $class;
        } else {
            $msg = "The 'class' argument must be a valid class name, '" . $class . "' given";
            throw new InvalidArgumentException($msg);
        }
    }
716818
public function postUpdate($object): void
    {
        /** @var BlockAdmin $block */
        $blockManager = $this->blockManager;

        $block = $blockManager->get($object);
        $block->postUpdate($object);

        $service = $blockManager->get($object);

        $this->cacheManager->invalidate($service->getCacheKeys($object));
    }
261415
private function saveInCache(string $class, ClassMetadataInterface $classMetadata): void
    {
        if (null === $this->cache) {
            return;
        }

        if ($this->cache instanceof Cache) {
            $this->cache->save($class, $classMetadata);
        } else {
            $class = preg_replace('#[\{\}\(\)/\\\\@:]#', '_', str_replace('_', '__', $class));
            $item = $this->cache->getItem($class);
            $item->set($classMetadata);

            $this->cache->save($item);
        }
    }
370637
public function inherits($class)
    {
        if ($this instanceof $class) {
            return true;
        }

        $objects = array_values($this->__mixed_methods);

        foreach($objects as $object)
        {
            if($object instanceof $class) {
                return true;
            }
        }

        return false;
    }
1228891
public function setObject(WeavedInterface $object, \ReflectionMethod $method)
    {
        $this->object = $object;
        $this->method = $method->name;
    }
406146
private function executeInserts(ClassMetadata $class) : void
    {
        $className      = $class->getClassName();
        $persister      = $this->getEntityPersister($className);
        $invoke         = $this->listenersInvoker->getSubscribedSystems($class, Events::postPersist);
        $generationPlan = $class->getValueGenerationPlan();

        foreach ($this->entityInsertions as $oid => $entity) {
            if ($this->em->getClassMetadata(get_class($entity))->getClassName() !== $className) {
                continue;
            }

            $persister->insert($entity);

            if ($generationPlan->containsDeferred()) {
                // Entity has post-insert IDs
                $oid = spl_object_id($entity);
                $id  = $persister->getIdentifier($entity);

                $this->entityIdentifiers[$oid]  = $this->em->getIdentifierFlattener()->flattenIdentifier($class, $id);
                $this->entityStates[$oid]       = self::STATE_MANAGED;
                $this->originalEntityData[$oid] = $id + $this->originalEntityData[$oid];

                $this->addToIdentityMap($entity);
            }

            unset($this->entityInsertions[$oid]);

            if ($invoke !== ListenersInvoker::INVOKE_NONE) {
                $eventArgs = new LifecycleEventArgs($entity, $this->em);

                $this->listenersInvoker->invoke($class, Events::postPersist, $entity, $eventArgs, $invoke);
            }
        }
    }
343399
protected function findProperties(\ReflectionClass $reflection): void
    {
        if (false !== $reflection->getParentClass()) {
            $this->findProperties($reflection->getParentClass());
        }

        $this->properties = array_unique(array_merge($this->properties, array_keys($reflection->getDefaultProperties())));
    }