@param $propertyName
@return Change
@throws RuntimeException

@api
762493
public function getChangeFor($propertyName)
    {
        foreach ($this->getIterator() as $change) {
            /* @var \Isolate\UnitOfWork\Entity\Value\Change\ScalarChange $change */
            if ($change->isFor($propertyName)) {
                return $change;
            }
        }

        throw new RuntimeException(sprintf("There are no changes for \"%s\" property.", $propertyName));
    }
213745
public function get($propertyName)
    {
        return isset($this->result[$propertyName]) ? $this->result[$propertyName][1] : null;
    }
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] = [];
    }
348678
public function propertyValues($propertyName)
    {
        return $this->map(function (EntityInterface $entity) use ($propertyName) {
            return $entity->getByProperty($propertyName);
        });
    }
142350
public function hasPropertyChanged($propertyName)
    {
        $propertyValue = null;
        $inSnapshot = isset($this->changeSnapshotData[$propertyName]);
        $inModelData = isset($this->modelData[$propertyName]);
        if (!$inModelData && $inSnapshot) {
            // Key removed.
            return true;
        } elseif ($inModelData) {
            // Determine the current value (if it's safe to do so)
            $propertyValue = $this->modelData[$propertyName];
        }

        if (!$inSnapshot) {
            if ($propertyValue === null) {
                // Value is NULL so isset will have failed. Setting a previously unset key to NULL is treated as no change
                return false;
            }

            // Key added
            return true;
        }

        if ((is_string($propertyValue) && is_string($this->changeSnapshotData[$propertyName])) && $this->changeSnapshotData[$propertyName] !== $propertyValue) {
            return true;
        }

        if ($this->changeSnapshotData[$propertyName] != $propertyValue) {
            // Key changed
            return true;
        }

        return false;
    }
1317778
public function getterAvailable(string $propertyName): bool
    {
        $this->existsOrFail($propertyName);
        return $this->isExistingPropertyGetterAvailable($propertyName);
    }
604289
public function rename($oldName, $newName)
    {
        if (! ftp_rename($this->session, $oldName, $newName)) {
            throw new \RuntimeException('Name can not be changed');
        }
        return true;
    }
6917
public function removeAllProperties($propertyName, $value = null)
    {
        $updateable = Updatable::getInstance()
            ->table($this->getUserPropertiesDefinition()->table())
            ->where("{$this->getUserPropertiesDefinition()->getName()} = :name", ["name" => $propertyName]);

        if (!empty($value)) {
            $updateable->where("{$this->getUserPropertiesDefinition()->getValue()} = :value", ["value" => $value]);
        }

        $this->propertiesRepository->deleteByQuery($updateable);

        return true;
    }
744317
private function createChange() : Change
    {
        $changeClass = '\\CaptainHook\\App\\Runner\\Config\\Change\\' . $this->change;
        if (!class_exists($changeClass)) {
            throw new \RuntimeException('Invalid change requested');
        }

        return new $changeClass($this->io, $this->hookToEdit);
    }
51670
public function getColumnResult(string $columnName): FieldSearchResult
    {
        if (!$this->hasColumnResult($columnName)) {
            throw new \RuntimeException('Could not find changed column named "' . $columnName . '"');
        }

        return $this->fieldMatchList[$columnName];
    }
987403
public static function getClassPropertyValue($className, $propertyName)
    {
        $value = BeanProxy::getInjectValue($className, $propertyName);
        if(null === $value)
        {
            if(!class_exists($className))
            {
                $className = BeanParser::getInstance()->getData()[$className]['className'];
            }
            $ref = new \ReflectionClass($className);
            $value = $ref->getDefaultProperties()[$propertyName] ?? null;
        }
        return $value;
    }
951254
public List<PropertyChange> getPropertyChanges(final String propertyName) {
        argumentIsNotNull(propertyName);
        return (List)getChanges(input -> input instanceof PropertyChange && ((PropertyChange)input).getPropertyName().equals(propertyName));
    }
545644
public function getDefaultDbPropertyValue($propertyName)
    {
        // A default value is set
        if (array_key_exists('default', static::$dbProperties[$propertyName])) {
            $defaultValue = static::$dbProperties[$propertyName]['default'];
        // No default value set, use default for type
        } else {
            $defaultValue = self::$typeDefaults[static::$dbProperties[$propertyName]['type']];
        }

        return $defaultValue;
    }
811217
protected function processPropertyForCache($propertyName)
    {
        $value = $this->$propertyName;

        if ($value instanceof CacheableInterface) {
            $value = $value->getDataForCache();
        } elseif (is_object($value)) {
            $value = null;
        }

        return $value;
    }
79466
public function setCustomProperty($propertyName, $propertyValue = '', $propertyType = null)
    {
        if (($propertyType === null) || (!in_array($propertyType, array(self::PROPERTY_TYPE_INTEGER,
                                                                        self::PROPERTY_TYPE_FLOAT,
                                                                        self::PROPERTY_TYPE_STRING,
                                                                        self::PROPERTY_TYPE_DATE,
                                                                        self::PROPERTY_TYPE_BOOLEAN)))) {
            if ($propertyValue === null) {
                $propertyType = self::PROPERTY_TYPE_STRING;
            } elseif (is_float($propertyValue)) {
                $propertyType = self::PROPERTY_TYPE_FLOAT;
            } elseif (is_int($propertyValue)) {
                $propertyType = self::PROPERTY_TYPE_INTEGER;
            } elseif (is_bool($propertyValue)) {
                $propertyType = self::PROPERTY_TYPE_BOOLEAN;
            } else {
                $propertyType = self::PROPERTY_TYPE_STRING;
            }
        }

        $this->customProperties[$propertyName] = array(
            'value' => $propertyValue,
            'type' => $propertyType
        );
        return $this;
    }
741026
protected function getPropertyLabel($propertyName, NodeInterface $changedNode)
    {
        $properties = $changedNode->getNodeType()->getProperties();
        if (!isset($properties[$propertyName]) ||
            !isset($properties[$propertyName]['ui']['label'])
        ) {
            return $propertyName;
        }
        return $properties[$propertyName]['ui']['label'];
    }
1354993
public static function getDbFieldName($propertyName)
    {
        if (!isset(self::$cachedDbFieldNames[$propertyName])) {
            self::$cachedDbFieldNames[$propertyName] = Str::camelToSeparator($propertyName);
        }

        return self::$cachedDbFieldNames[$propertyName];
    }