Given a TSProperty blob, decode the name/value/type/etc.

@param string $tsProperty
968365
protected function decode($tsProperty)
    {
        $nameLength = hexdec(substr($tsProperty, 0, 2));

        # 1 data byte is 3 encoded bytes
        $valueLength = hexdec(substr($tsProperty, 2, 2)) * 3;

        $this->valueType = hexdec(substr($tsProperty, 4, 2));
        $this->name = pack('H*', substr($tsProperty, 6, $nameLength));
        $this->value = $this->getDecodedValueForProp($this->name, substr($tsProperty, 6 + $nameLength, $valueLength));
    }
1314150
public function setRequiredPropertyTypes(string $property, $types)
    {
        $this->required[$property] = $types;
        $this->requiredTypes[$property] = $types;

        return $this;
    }
527770
public function decodeProperties($properties)
	{
		// Compose components to objects
		foreach ($this->composed_properties as $property => $components) {
			$value = array();
			foreach ($components as $component => $column) {
				$value[$component] = isset($properties[$column]) ? $properties[$column] : null;
			}
			$properties[$property] = $value;
		}

		// Decode JSON columns
		foreach ($this->json_columns as $column_name) {
			if (isset($properties[$column_name])) {
				$properties[$column_name] = json_decode($properties[$column_name], TRUE, 512, JSON_BIGINT_AS_STRING);
			}
		}
		return $properties;
	}
137302
private function parseProperty(string $propertyStub, array $fieldInfo)
    {
        $property      = $fieldInfo['name'];
        $aliasProperty = StringHelper::camel($property);
        $primaryKey    = $fieldInfo['key'] === 'PRI';
        $required      = $primaryKey ? false : ($fieldInfo['nullable'] === 'NO' && $fieldInfo['default'] === null);
        $default       = $fieldInfo['default'];
        $dbType        = $this->schema->typeMap[$fieldInfo['type']] ?? '';
        $phpType       = $this->schema->phpMap[$fieldInfo['type']] ?? 'mixed';
        $length        = $fieldInfo['length'];
        $columnType    = $fieldInfo['column_type'];
        $comment       = $fieldInfo['column_comment'];
        $isEnum        = strpos($columnType, 'enum') !== false;
        if ($isEnum) {
            preg_match_all("/enum\((.*?)\)/", $columnType, $matches);
            $enumParam = $matches[1][0];
            $enumParam = explode(',', str_replace('\'', '', $enumParam));
            // TODO $enumParam never use ?
        }

        //字段类型
        $dbType = !empty($dbType) ? sprintf('"%s"', $dbType) : ($isEnum ? '"feature-enum"' : (\is_int($default) ? '"int"' : '"string"'));

        $this->checkAliasProperty($aliasProperty);

        $formatComment = "     * @var {$phpType} \${$aliasProperty} {$comment}\n";

        $default            = $this->parserDefault($dbType, $default, $primaryKey);
        $this->propertyStub .= PHP_EOL . str_replace([
                "{{comment}}\n",
                "{{@Id}}\n",
                '{{property}}',
                '{{aliasProperty}}',
                '{{type}}',
                '{{length}}',
                '{{default}}',
                "{{@Required}}\n",
                '{{hasDefault}}',
            ], [
                $formatComment,
                $primaryKey ? "     * @Id()\n" : '',
                $property,
                $aliasProperty,
                $dbType,
                $length !== null ? ", length={$length}" : '',
                $default !== null ? ", default={$default}" : '',
                $required ? "     * @Required()\n" : '',
                ';',
            ], $propertyStub);
    }
1187917
protected function decode($value, string $type)
    {
        try {
            return $this->encoders->getEncoderForType($type)
                ->decode($value, $type, new EncodingContext());
        } catch (EncodingException | InvalidArgumentException | OutOfBoundsException $ex) {
            throw new SerializationException('Failed to deserialize value', 0, $ex);
        }
    }
483071
public function getAutocodeProperty($property)
    {
        return isset($this->autocodeProperties[$property])
            ? $this->autocodeProperties[$property]
            : null;
    }
440979
protected function parseProperties(array $properties)
    {
        $parsed = [];

        foreach ($properties as $propertyString) {
            if (!mb_strpos($propertyString, ':')) {
                list($key, $value) = $this->parseBooleanShortcut($propertyString);
                $parsed[Type::camelCase($key)] = $value;
                continue;
            }


            list($key, $value) = explode(':', $propertyString, 2);


            if (!$this->isNestedShortCut($value)) {
                $parsed[Type::camelCase($key)] = $value;
                continue;
            }

            $type = $this->stringToType(trim($value, '[]'));

            $parsed[Type::camelCase($key)] = $type;
        }

        return $parsed;
    }
95863
public function beforePropertyModelSave(Property &$property, $insert)
    {
        if ($property->canTranslate()) {
            $property->data_type = Property::DATA_TYPE_INVARIANT_STRING;
        }
        $data = Yii::$app->request->post(Property::PACKED_HANDLER_PARAMS);
        if (empty($data) === true) {
            $data = ArrayHelper::getValue(
                Yii::$app->request->post($property->formName()),
                'params.' . Property::PACKED_HANDLER_PARAMS,
                []
            );
        }
        $param = $property->params;
        if (empty($data) === false) {
            $params[Property::PACKED_HANDLER_PARAMS] = $data;
            $property->params = $params;
            $property->packAttributes();
        }
        return parent::beforePropertyModelSave($property, $insert);
    }
535397
public function parse($propertyValue)
    {
        $return = $this->cloneValue($propertyValue);
        $return = $this->createInstanceOfTypeFromValue($return);
        $return = $this->runFilters($return);
        $this->validate($return);

        return $return;
    }
263285
private function getHashMapAnnotationData(\ReflectionProperty $property)
    {
        $result = $this->reader->getPropertyAnnotation($property, self::HASH_MAP_ANNOTATION);

        if ($result !== null && $result->name === null) {
            $result->name = Caser::snake($property->getName());
        }

        return $result;
    }
5581
private function getRawType(\ReflectionProperty $property)
    {
        $matches = [];
        if (preg_match('/@var\s+([^\s]+)/', $property->getDocComment(), $matches)) {
            list(, $rawType) = $matches;
        } else {
            $rawType = 'mixed';
        }
        return $rawType;
    }
759972
protected function resolveStreamProperties(array $properties)
	{
		// defaults keys for transforming
		$properties += [
			'tags'            => [],
			'sample_rate'     => 0,
			'codec_name'      => null,
			'codec_long_name' => '',
			'type'            => $properties['codec_type'],
			'frequency'       => 0,
			'channels'        => 1
		];
		
		$properties['metadata'] = (array) $properties['tags'];
		$properties['frequency'] = (int) $properties['sample_rate'];
		$properties['codec'] = new Codec($properties['codec_name'], $properties['codec_long_name']);
		$properties['frame_rate'] = isset($properties['r_frame_rate']) ? $properties['r_frame_rate'] : 0.0;
		
		if (strpos($properties['frame_rate'], '/') > 0)
		{
			list($val1, $val2) = explode('/', $properties['frame_rate']);
			
			if ($val1 > 0 && $val2 > 0)
			{
				$properties['frame_rate'] = (float) $val1 / (float) $val2;
			}
		}
		
		return $properties;
	}
611888
void encodeProperty(ByteArrayOutputStream baos, Object value) throws JMSException {
    if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) SibTr.entry(this, tc, "encodeProperty", new Object[]{baos, value});

    if (value.equals(ApiJmsConstants.ON)) {
      super.encodeProperty(baos, SHORT_ON);
    }
    else {
      super.encodeProperty(baos, SHORT_OFF);
    }

    if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) SibTr.exit(this, tc, "encodeProperty");
  }
222288
protected function getFilesystemProperty($property)
    {
        $path = $property . 'Path';

        if (!$this->$property && $this->$path) {
            $this->$property = new Filesystem(
                new Local(Yii::getAlias($this->$path))
            );
        }
        return $this->$property;
    }
1198667
public function beforePropertyModelSave(Property &$property, $insert)
    {
        if ($property->canTranslate()) {
            $property->data_type = Property::DATA_TYPE_INVARIANT_STRING;
        }
        return parent::beforePropertyModelSave($property, $insert);
    }
392330
public function asObject($strProperty){
		$strProperty = $this->_formatPropertyName($strProperty);
		return $this->_arrData[$strProperty]->asObject();
	}
1064720
public function formatPropertyValue($value, string $property)
    {
        switch ($this->propertyHolder->getPropertyType($property)) {
            case PropertyHolder::TYPE_BOOLEAN:
                if (true === $value || 'true' === $value || '1' === $value) {
                    return true;
                }

                return false;

                break;
            case PropertyHolder::TYPE_IN_ARRAY:
                try {
                    return $this->propertyHolder->checkValueInArray($property, (string) $value);
                } catch (\InvalidArgumentException $ex) {
                    return '';
                }

                break;
        }

        return $value;
    }