@param string       $propertyName
@param Closure|null $getter
@param Closure|null $setter

@throws DuplicatePropertyException
@throws InvalidPropertyException
188017
public function newVirtualProperty(string $propertyName, ?Closure $getter, ?Closure $setter): void
    {
        if ($this->propertyExists($propertyName)) {
            throw new DuplicatePropertyException($propertyName);
        }
        if (is_null($getter) && is_null($setter)) {
            throw new InvalidPropertyException($propertyName);
        }
        $this->properties[$propertyName] = self::PROPERTY_VIRTUAL;
        $this->virtualGetters[$propertyName] = $getter;
        $this->virtualSetters[$propertyName] = $setter;
        $this->setterHooks[$propertyName] = [];
        $this->getterHooks[$propertyName] = [];
    }
147196
public static function duplicateProperty($className, Property $property)
    {
        return new self(sprintf(
            'Property "%s" in "%s" was already declared in "%s", but it must be declared only once',
            $property->getName(),
            $className,
            $property->getDeclaringClass()->getClassName()
        ));
    }
671983
public static function toPropertyValue($obj,$propertyName,$value)
    {
        if(property_exists($obj, $propertyName)){
            $obj->$propertyName=$value;
        }
    }
1221918
public function set($propertyName, $value, $status = null)
    {
        if (is_null($status)) {
            $status = is_null($value) ? 404 : 200;
        }
        $this->result[$propertyName] = [$status, $value];
    }
846971
function(target, propertyName, eventName) {
		var self = this,
			handler;


		// This is objects that can be bound to with can.bind.
		handler = function () {
			self.updater(self._get(), self.value);
		};
		this._get = function() {
			return getObject(target, propertyName);
		};
		this._set = function(value) {
			// allow setting properties n levels deep, if separated with dot syntax
			var properties = propertyName.split("."),
				leafPropertyName = properties.pop();

			if(properties.length) {
				var targetProperty = getObject(target, properties.join('.'));
				targetProperty[leafPropertyName] = value;
			} else {
				target[propertyName] = value;
			}
		};

		this._on = function(update) {
			eventQueue.on.call(target, eventName || propertyName, handler);
			// Set the cached value
			this.value = this._get();
		};
		this._off = function() {
			return eventQueue.off.call( target, eventName || propertyName, handler);
		};
	}
1351298
public function hasChangeFor($propertyName)
    {
        foreach ($this->getIterator() as $change) {
            /* @var ScalarChange $change */
            if ($change->isFor($propertyName)) {
                return true;
            }
        }

        return false;
    }
618700
public static function setPropertyValue($object, $property, $value): void
    {
        $ref = new \ReflectionClass($object);
        $prop = static::getPrivateProperty($ref, $property);
        $prop->setAccessible(true);
        $prop->setValue($object, $value);
        $prop->setAccessible(false);
    }
718082
public function setter($id, Closure $setter) {
		// Format id
		$id = $this->_format($id);
		// Verify existence
		if(!$this->has($id)) {
			throw new NotFoundException("'$id' value does not exist");
		}
		// Add inflector
		$this->values[$id]->addInputInflector($setter);
	}
601201
public static function isPropertyClassArray($class, $propertyName)
    {
        // If the class doesn't exist, or the method doesn't exist, return null.
        if (!class_exists($class) || !method_exists($class, self::getter($class, $propertyName))) {
            return null;
        }

        if (($annotations = self::propertyAnnotations($class, $propertyName)) && isset($annotations['return'])) {
            $param = $annotations['return'];
        }

        if (isset($param)) {
            return substr($param, -strlen('[]')) === '[]';
        } else {
            throw new BlockCypherConfigurationException("Getter function for '$propertyName' in '$class' class should have a proper return type.");
        }
    }
503009
public function attributeUseObject(
        string $attribute,
        Value\ClassName $className,
        string $setter,
        string $getter
    ): ObjectInterface {
        return $this;
    }
475726
public function unsetParameterForSetter($instanceName, $setterName) {
		unset($this->declaredInstances[$instanceName]['setterProperties'][$setterName]);
		unset($this->declaredInstances[$instanceName]['setterBinds'][$setterName]);
	}
1195321
private static function triggerVisibilityError($className, $propertyName)
    {
        $existed = property_exists($className, $propertyName);
        if ($existed) {
            trigger_error(sprintf(
                'Cannot access %s property %s',
                (new \ReflectionProperty($className, $propertyName))->isPrivate() ? 'private' : 'protected',
                $className . '::' . $propertyName
            ), E_USER_ERROR);
        }
        return $existed;
    }
274295
public static function init($model, $propertyName, $annotation, $forceInit = false)
    {
        $className = BeanFactory::getObjectClass($model);

        if(!$forceInit)
        {
            $autoSelect = AnnotationManager::getPropertyAnnotations($className, $propertyName, AutoSelect::class)[0] ?? null;
            if($autoSelect && !$autoSelect->status)
            {
                return;
            }
        }

        if(is_array($annotation))
        {
            $firstAnnotation = reset($annotation);
            if($firstAnnotation instanceof \Imi\Model\Annotation\Relation\PolymorphicToOne)
            {
                static::initByPolymorphicToOne($model, $propertyName, $annotation);
            }
        }
        else if($annotation instanceof \Imi\Model\Annotation\Relation\OneToOne)
        {
            static::initByOneToOne($model, $propertyName, $annotation);
        }
        else if($annotation instanceof \Imi\Model\Annotation\Relation\OneToMany)
        {
            static::initByOneToMany($model, $propertyName, $annotation);
        }
        else if($annotation instanceof \Imi\Model\Annotation\Relation\ManyToMany)
        {
            static::initByManyToMany($model, $propertyName, $annotation);
        }
        else if($annotation instanceof \Imi\Model\Annotation\Relation\PolymorphicOneToOne)
        {
            static::initByPolymorphicOneToOne($model, $propertyName, $annotation);
        }
        else if($annotation instanceof \Imi\Model\Annotation\Relation\PolymorphicOneToMany)
        {
            static::initByPolymorphicOneToMany($model, $propertyName, $annotation);
        }
        else if($annotation instanceof \Imi\Model\Annotation\Relation\PolymorphicManyToMany)
        {
            static::initByPolymorphicManyToMany($model, $propertyName, $annotation);
        }
        else if($annotation instanceof \Imi\Model\Annotation\Relation\PolymorphicToMany)
        {
            static::initByPolymorphicToMany($model, $propertyName, $annotation);
        }
    }
1356078
public function getBoundComponentsOnSetter($instanceName, $setterName) {
		if (isset($this->declaredInstances[$instanceName]) && isset($this->declaredInstances[$instanceName]['setterBinds']) && isset($this->declaredInstances[$instanceName]['setterBinds'][$setterName]))
			return $this->declaredInstances[$instanceName]['setterBinds'][$setterName];
		else
			return null;
	}
868763
protected function invokeSetter(ReflectionProperty $property, $value) : void
    {
        $methodName = $this->generateSetterName($property->getName());
        if ($this->hasInternalMethod($methodName)) {
            $this->$methodName($value);
            return;
        }

        throw new UndefinedPropertyException(sprintf(
            'No "%s"() method available for property "%s"', $methodName,
            $property->getName()
        ));
    }
454573
private function setValue($object, \ReflectionProperty $property, $value)
    {
        if ($property->isPublic()) {
            $property->setValue($object, $value);
        } else {
            // Try to use mutator if property is not public
            $mutatorName = $this->formatter->getPhpMutator($property->getName(), false);
            $reflectedObject = new \ReflectionObject($object);
            $reflectedMethod = $reflectedObject->getMethod($mutatorName);

            if (null !== $reflectedMethod) {
                $reflectedMethod->invoke($object, $value);
            }
        }
    }
1221475
protected function mapToClass($propertyName, $className, \Closure $callback)
    {
        $temporary = new GenericDataMapper($this->resolver);
        $callback($temporary);
        if (!is_null($className)) {
            $temporary->toClassName                     = $className;
        }
        $this->properties[]                       = $propertyName;
        $this->propertiesToClasses[$propertyName] = $temporary;

        return $this;
    }