Process properties of class

@param \ReflectionClass $reflection
@param Definition       $definition
762329
public function process(\ReflectionClass $reflection, Definition $definition)
    {
        foreach ($reflection->getProperties() as $property)
        {
            $this->processProperty($property, $definition);
        }
    }
576573
public function hasInjector(\ReflectionClass $reflection): bool
    {
        if (isset($this->injectors[$reflection->getName()])) {
            return true;
        }

        //Auto injection!
        return $reflection->isSubclassOf(InjectableInterface::class);
    }
481403
private function getPropertyValue(ReflectionClass $reflection, $property, $object)
    {
        $propertyReflection = $this->accessProperty($reflection, $property);
        $value = $propertyReflection->getValue($object);
        $propertyReflection->setAccessible(false);

        return $value;
    }
815536
private function injectMethods(\ReflectionClass $class, $object) : void
    {
        foreach ($this->reflectionTools->getClassMethods($class) as $method) {
            if ($this->policy->isMethodInjected($method)) {
                $parameters = $this->getFunctionParameters($method);
                $method->setAccessible(true);
                $method->invokeArgs($object, $parameters);
            }
        }
    }
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();
                }
        );
    }
824993
private static function getSetters(\ReflectionClass $reflectionClass)
    {
        foreach ($reflectionClass->getMethods(\ReflectionMethod::IS_PUBLIC) as $reflectionMethod) {
            if (!$reflectionMethod->isStatic() && 1 === $reflectionMethod->getNumberOfParameters() && 0 === strpos($reflectionMethod->name, 'set')) {
                yield $reflectionMethod;
            }
        }
    }
377842
protected function loadBusinessProperties(\ReflectionClass $class)
    {
        $businessProperties = [];
        $properties = $class->getProperties();
        $traits = $class->getTraits();
        $className = $class->getName();
        // if the class is translatable, then parse annotations on it's translation class
        if (array_key_exists(Translatable::class, $traits)) {
            $translation = new \ReflectionClass($className::getTranslationEntityClass());
            $translationProperties = $translation->getProperties();
            $properties = array_merge($properties, $translationProperties);
        }

        foreach ($properties as $property) {
            $annotations = $this->reader->getPropertyAnnotations($property);
            foreach ($annotations as $key => $annotationObj) {
                if ($annotationObj instanceof BusinessProperty && !in_array($class, $businessProperties)) {
                    if (!$annotations[$key]->getTypes()) {
                        $message = $class->name.':$'.$property->name.'" field';

                        throw AnnotationException::requiredError('type', 'BusinessProperty annotation', $message, 'array or string');
                    }
                    foreach ($annotations[$key]->getTypes() as $type) {
                        $businessProperties[$type][] = $property->name;
                    }
                }
            }
        }
        // we load business properties of parents recursively
        // because they are defined by an annotation not by the property type(private, protected, public)
        $parentClass = $class->getParentClass();
        if ($parentClass) {
            //load parent properties recursively
            $parentProperties = $this->loadBusinessProperties(new \ReflectionClass($parentClass->getName()));
            foreach ($parentProperties as $key => $parentProperty) {
                if (array_key_exists($key, $businessProperties)) {
                    //if parent and current have a same business property type we merge the properties and remove
                    //duplicates if properties are the same;
                    $businessProperties[$key] = array_unique(array_merge($parentProperty, $businessProperties[$key]));
                } else {
                    //else we had a business property type for the parent properties
                    $businessProperties[$key] = $parentProperty;
                }
            }
        }

        return $businessProperties;
    }
365719
public function setDefinition($definition)
	{
		if ($definition instanceof InputDefinition)
		{
			$this->definition = $definition;
		}
		else
		{
			$this->definition->setDefinition($definition);
		}

		$this->applicationDefinitionMerged = false;
	}
1285145
protected function processDefinitionParameters(array $params, stdClass $definition) {
		foreach ($params as $param) {
			$name = $param->getName();
			
			if ($name === 'arguments') {
				$content = $param->getContent();
				
				if (! empty($content)) {
					$definition->arguments = $this->processArguments($content);
				}
				continue;
			}
			
			if ($name === 'calls') {
				$content = $param->getContent();
				
				if (! empty($content)) {
					$definition->calls = $this->processCalls($content);
				}
				continue;
			}
			
			throw new InvalidConfig('Unknown element "' . $param->getName() . '" in service devinition', null, null, $param);
		}
	}
242047
public function setDefinition($definition)
    {
        if ($definition instanceof Expression) {
            $definition = (string) $definition;
        }

        $this->definition = $definition;
    }
87712
private function _parseProperties($docComment, \ReflectionClass $reflectionClass)
    {
        $properties = [];
        foreach (Reflection\Annotation::parseProperties($docComment) as $definition) {

            try {
                $property = new Reflection\Property(
                    $definition[2],
                    $definition[3],
                    $this,
                    !$definition[1],
                    $definition[4]
                );
            } catch (Exception\PropertyException $e) {
                throw new Exception\ReflectionException(
                    $e->getMessage(),
                    $this->className,
                    $definition[0]
                );
            }

            // Prevent duplications
            if (isset($properties[$property->getName()])) {
                throw new Exception\ReflectionException(
                    "Duplicate property with name '" . $property->getName() . "'!",
                    $this->className,
                    $definition[0]
                );
            }

            // Prevent class property duplications
            if ($reflectionClass->hasProperty($property->getName())) {
                throw new Exception\ReflectionException(
                    "Property '" . $property->getName() . "' already defined as"
                    . " public property!",
                    $this->className,
                    $definition[0]
                );
            }

            $this->properties[$property->getName()] = $property;
        }
    }
13747
public function findProperties(ReflectionClass $reflectionClass)
	{
		$allProperties = [];

		/** @var ReflectionClass $currentReflectionClass */
		$currentReflectionClass = $reflectionClass;

		while ($currentReflectionClass) {// class without parent has null in getParentClass()

			$properties = $currentReflectionClass->getProperties();

			foreach ($properties as $property) {
				if (isset($allProperties[$property->getName()])) {
					// Do not add the same property few times
					// If parent class has public or protected property - the same property will be returned for the Child class
					// As child class is processed first - its property will be taken
					continue;
				}

				$allProperties[$property->getName()] = $property;
			}

			$currentReflectionClass = $currentReflectionClass->getParentClass();
		}

		return $allProperties;
	}
6293
protected function setPropertyValue($reflection, $classInstance, $classProperty, $object)
    {
        /*
         | We will make property accessible and set the value into it
         */
        $reflection->makePropertyAccessible($classProperty);
        $reflectionProperty = $reflection->getReflectionProperty();
        $reflectionProperty->setValue($classInstance, $object);
    }
414053
protected function applyParameters(stdClass $definitions) {
		$parameters = $this->processArguments($definitions);
		$config     = $this->container->getParametersConfig();
		
		foreach ($parameters as $name => $value) {
			$config->set($name, $value);
		}
	}
1258309
public function setReflection(ReflectionClass $reflection) {
		$this->reflection = $reflection;
		$this->class      = $reflection->getName();
		
		$this->reset();
		
		return $this;
	}
167160
final protected function defineClass(ClassDefinition $class)
    {
        $class->property($this->object)->asObject($this->getObjectType());
        $class->property($this->dataSource)->asObject(IObjectSet::class);

        $this->defineClassStructure($class);
    }
936682
protected function defineEntity(ClassDefinition $class)
    {
        $class->property($this->driverName)->asString();

        $class->property($this->options)->asObject(FormObject::class);
    }