Populates by Reflection the domain object with the given SQL plain values.

@param File   $file          The file domain object
@param string $propertyName  The property name
@param mixed  $propertyValue The property value

@return File
169213
private function set(File $file, $propertyName, $propertyValue)
    {
        $reflectionFile = new \ReflectionClass($file);
        $reflectionCreatedOn = $reflectionFile->getProperty($propertyName);
        $reflectionCreatedOn->setAccessible(true);
        $reflectionCreatedOn->setValue($file, $propertyValue);

        return $file;
    }
226214
public static function collect(string $className, $objectAnnotation = null, string $propertyName = "", string $methodName = "", $propertyValue = null)
    {
        if ($objectAnnotation instanceof Breaker) {
            $breakerName = $objectAnnotation->getName();
            $breakerName = empty($breakerName) ? $className : $breakerName;

            self::$breakers[$breakerName] = $className;
        }
    }
570040
protected LinkedHashMap<Pattern, String> load(File propertyFile) {
    LinkedHashMap<Pattern, String> result = new LinkedHashMap<Pattern, String>();
    BufferedReader reader = null;
    try {
      reader =
          new BufferedReader(new InputStreamReader(new FileInputStream(propertyFile), "UTF-8"));
      String line;
      while ((line = reader.readLine()) != null) {
        if (line.length() == 0) {
          continue;
        }
        char firstChar = line.charAt(0);
        if (firstChar == '#' || firstChar == '!') {
          continue;
        }
        int pos = line.indexOf('=');
        if (pos < 0) {
          continue;
        }
        String key = line.substring(0, pos);
        String value = line.substring(pos + 1, line.length());
        int pos2 = line.indexOf('@');
        if (pos2 == 0) {
          key = key.substring(1);
        } else if (pos2 > 0) {
          key = Pattern.quote(key.substring(0, pos2)) + key.substring(pos2);
        }
        result.put(Pattern.compile(key), value);
      }
    } catch (IOException e) {
      throw new GenException(Message.DOMAGEN9001, e, e);
    } finally {
      IOUtil.close(reader);
    }
    return result;
  }
9994
private static function validate(array $columnAry, $propertyValue)
    {
        // 验证信息
        $column    = $columnAry['column'];
        $length    = $columnAry['length'] ?? -1;
        $validates = $columnAry['validates'] ?? [];
        $type      = $columnAry['type'] ?? Types::STRING;
        $required  = $columnAry['required'] ?? false;

        // 必须传值验证
        if ($propertyValue === null && $required) {
            throw new MysqlException(sprintf('The %s must pass values', $column));
        }

        if($propertyValue === null){
            return ;
        }

        // 类型验证器
        $validator = [
            'name'  => ucfirst($type),
            'value' => [$length],
        ];

        // 所有验证器
        array_unshift($validates, $validator);

        // 循环验证，一个验证不通过，验证失败
        foreach ($validates as $validate) {
            $name     = $validate['name'];
            $params   = $validate['value'];
            $beanName = 'Db' . $name . 'Validator';

            // 验证器未定义
            if (!BeanFactory::hasBean($beanName)) {
                App::warning('验证器不存在，beanName=' . $beanName);
                continue;
            }

            /* @var ValidatorInterface $objValidator */
            $objValidator = App::getBean($beanName);
            $objValidator->validate($column, $propertyValue, $params);
        }
    }
467884
public function like($propertyName, $propertyValue) {
		$parameterName = ':' . md5($propertyName . '#' . count($this->where));
		$this->where[] = '(`' . $propertyName . '` LIKE ' . $parameterName . ')';
		$this->parameterMap[$parameterName] = '%' . $propertyValue . '%';

		return $this;
	}
861341
public function getDefaultPropertyValue($className, $propertyName)
    {
        $reflection = new \ReflectionClass($className);
        $values = $reflection->getDefaultProperties();
        return $values[$propertyName] ?? null;
    }
924052
public <T> T set( final String propertyName, final T propertyValue )
    {
        m_properties.put( propertyName, propertyValue );
        return propertyValue;
    }
291249
protected function generateAttributeForArrayValue(array $attributeValueArray = array(), $propertyName = '')
    {
        if (!empty($attributeValueArray) && $propertyName == 'style') {
            $attribute_string = array();

            foreach($attributeValueArray as $_name => $_value) {
                if (is_string($_name) && !empty($_name)) {
                    if (is_string($_value) && !empty($_value)) {
                        $attribute_string[] = "{$_name}: {$_value}";
                    }
                }
            }

            return implode(";", $attribute_string);
        }

        return implode(" ", $attributeValueArray);
    }
877512
public function parser(string $className, $objectAnnotation = null, string $propertyName = "", string $methodName = "", $propertyValue = null)
    {
        Collector::$methodAnnotations[$className][$methodName][] = get_class($objectAnnotation);
        return null;
    }
1070873
public static function getProperty($object, string $propertyName)
    {
        $reflection = new \ReflectionObject($object);
        $property = $reflection->getProperty($propertyName);
        $property->setAccessible(true);

        return $property->getValue($object);
    }
442463
public static String getProperty(String propertyName, String defaultValue) {
        String value = get(propertyName);
        return value == null ? defaultValue : value;
    }
811217
protected function processPropertyForCache($propertyName)
    {
        $value = $this->$propertyName;

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

        return $value;
    }
6291
protected function getWidget($fieldName, $serializedId, $propertyValue)
    {
        $environment    = $this->getEnvironment();
        $property       = $environment->getDataDefinition()->getPropertiesDefinition()->getProperty($fieldName);
        $propertyValues = new PropertyValueBag();

        if (null !== $serializedId) {
            $model = $this->getModelFromSerializedId($serializedId);
        } else {
            $dataProvider = $environment->getDataProvider();
            $model        = $dataProvider->getEmptyModel();
        }

        $widgetManager = new ContaoWidgetManager($environment, $model);

        // Process input and update changed properties.
        $treeType      = \substr($property->getWidgetType(), 0, 4);
        $propertyValue = $this->getTreeValue($treeType, $propertyValue);
        if (('file' === $treeType) || ('page' === $treeType)) {
            $extra = $property->getExtra();
            if (\is_array($propertyValue) && !isset($extra['multiple'])) {
                $propertyValue = $propertyValue[0];
            } else {
                $propertyValue = \implode(',', (array) $propertyValue);
            }
        }

        $propertyValues->setPropertyValue($fieldName, $propertyValue);
        $widgetManager->processInput($propertyValues);
        $model->setProperty($fieldName, $propertyValues->getPropertyValue($fieldName));

        return $widgetManager->getWidget($fieldName);
    }
765432
public static function getPropertyValue($obj,$propertyName,$fieldAccess=false)
    {
        $getter=self::getGetter($obj, $propertyName);
        if(!empty($getter)){
            return $obj->$getter();
        }else if($fieldAccess && property_exists($obj, $propertyName)){
            return $obj->$propertyName;
        }
    }
727812
public static void setProperty(String propertyName, String propertyValue) {
		try {
			FreeMarkerRender.getConfiguration().setSetting(propertyName, propertyValue);
		} catch (TemplateException e) {
			throw new RuntimeException(e);
		}
	}
443741
public static function getPropertyValue($object,$propertyName)
    {
        $getter = "get" . ucfirst($propertyName);
        if (method_exists($object, $getter)) {
            return $object->$getter();
        }
        return null;
    }
1250154
private function setPropertyValue($propertyName, $value)
    {
        $this->getAccessibleReflectionProperty($propertyName)
        ->setValue($this->object, $value);
    }