Internal function that fetches the properties of a class.

@param $targetType
@return array
183370
protected function getProperties($targetType)
    {
        $properties = ReflectionService::get()->getClassReflection($targetType)->getProperties();
        $propertiesKeys = array_map(
            function (PropertyReflection $propertyReflection) {
                return $propertyReflection->getName();
            },
            $properties
        );

        return array_combine($propertiesKeys, $properties);
    }
136789
function getPropertiesOf (...$types)
  {
    $result = [];
    $names  = $this->getPropertyNames ();
    if (isset($names))
      foreach ($names as $name)
        if (in_array ($this->getTypeOf ($name), $types))
          $result[$name] = $this->get ($name);
    return $result;
  }
739018
public function getBusinessPropertiesByType($type)
    {
        $bp = [];

        if (isset($this->businessProperties[$type])) {
            $bp = $this->businessProperties[$type];
        }

        return $bp;
    }
1281331
public <T extends TypeDefinition> List<T> getTypes(Class<T> targetClass) {
        return types.values().stream()
                .filter(targetClass::isInstance)
                .map(targetClass::cast)
                .collect(Collectors.toList());
    }
797201
protected function fetchObjectFromPersistence($identity, $targetType)
    {
        if ($targetType === Thumbnail::class) {
            $object = $this->persistenceManager->getObjectByIdentifier($identity, $targetType);
        } elseif (is_string($identity)) {
            $object = $this->assetRepository->findByIdentifier($identity);
        } else {
            throw new InvalidSourceException('The identity property "' . $identity . '" is not a string.', 1415817618);
        }

        return $object;
    }
645457
public function getPropertiesAsArray()
    {
        $array = array();

        foreach ($this->getProperties() as $property) {
            $array[$property->getName()] = [ 'value' => $property->getValue(), 'type' => $property->getType() ];
        }

        return $array;
    }
309173
protected function getPropertyTypes()
	{
		$manager = \Aimeos\MShop::create( $this->getContext(), 'customer/property/type' );

		$search = $manager->createSearch( true )->setSlice( 0, 10000 );
		$search->setSortations( [$search->sort( '+', 'customer.property.type.position')] );

		return $manager->searchItems( $search );
	}
1081571
@SuppressWarnings("unchecked")
    public <T> T get(Class<T> targetClass, Object propName) {
        return N.convert(values.get(propName), targetClass);
    }
25135
public function getTypeOfChildProperty($targetType, $propertyName, PropertyMappingConfigurationInterface $configuration) {
		$typeDeclaration = \TYPO3\Flow\Utility\TypeHandling::parseType($targetType);
		if ($typeDeclaration['elementType'] !== NULL) {
			return $typeDeclaration['elementType'];
		}

		$configuredTargetType = $configuration->getConfigurationFor($propertyName)->getConfigurationValue('TYPO3\Flow\Property\TypeConverter\ObjectConverter', self::CONFIGURATION_TARGET_TYPE);
		if ($configuredTargetType !== NULL) {
			return $configuredTargetType;
		}

		$methodParameters = $this->reflectionService->getMethodParameters($targetType, '__construct');
		if (isset($methodParameters[$propertyName]) && isset($methodParameters[$propertyName]['type'])) {
			return $methodParameters[$propertyName]['type'];
		} elseif ($this->reflectionService->hasMethod($targetType, ObjectAccess::buildSetterMethodName($propertyName))) {
			$methodParameters = $this->reflectionService->getMethodParameters($targetType, ObjectAccess::buildSetterMethodName($propertyName));
			$methodParameter = current($methodParameters);
			if (isset($methodParameter['type'])) {
				return $methodParameter['type'];
			}
		} else {
			$targetPropertyNames = $this->reflectionService->getClassPropertyNames($targetType);
			if (in_array($propertyName, $targetPropertyNames)) {
				$values = $this->reflectionService->getPropertyTagValues($targetType, $propertyName, 'var');
				if (count($values) > 0) {
					return current($values);
				}
			}
		}

		return 'string';
	}
1155197
public function fetchAll($fetchType = 'assoc')
    {
        if ($fetchType === 'num') {
            return $this->statement->fetchAll(\PDO::FETCH_NUM);
        } elseif ($fetchType === 'assoc') {
            return $this->statement->fetchAll(\PDO::FETCH_ASSOC);
        } elseif ($fetchType === 'obj') {
            return $this->statement->fetchAll(\PDO::FETCH_OBJ);
        }
    }
728146
public function get($type)
    {
        if (isset($this->definitions[$type])) {
            return $this->definitions[$type];
        }

        throw new UnregisteredDefinitionException(
            $type,
            UnregisteredDefinitionException::TARGET_MIME_TYPE
        );
    }
435537
public function when($targetProperty)
    {
        $this->property = $targetProperty;
        $this->clause = new ValidationClause($this->parent, $this, true);
        return $this->clause;
    }
435094
protected function extractDtoProperties($class)
    {
        $properties = [];
        $reflector = new \ReflectionClass($class);
        if ($reflector->isSubclassOf(self::DTO_INTERFACE)) {
            $properties = array_merge($properties, InjectorHelper::extractVariables($reflector));
        }

        return $properties;
    }
1132329
public function toArray($fetchType = Model::FETCH_ALL)
    {
        if ($fetchType === Model::FETCH_RAW) {
            return $this->attributes;
        }

        $attributes = array();

        if (empty($this->attributes)) {
            $this->attributes = array();
        }

        if ($fetchType === Model::FETCH_ALL or $fetchType === Model::FETCH_HIDDEN) {
            $attributes['$type'] = $this->getClass();
            $attributes['$id'] = $this->getId();

            foreach ($this->attributes as $key => $value) {
                if ($key[0] === '$') {
                    $attributes[$key] = $value;
                }
            }
        }

        if ($fetchType === Model::FETCH_ALL or $fetchType === Model::FETCH_PUBLISHED) {
            foreach ($this->attributes as $key => $value) {
                if ($key[0] !== '$') {
                    $attributes[$key] = $value;
                }
            }
        }

        return $attributes;
    }
248324
public function getAllProperties($types = self::FULL_HIERARCHY) {
    if ($types & self::WITH_OWN) {
      $properties = clone $this->properties;
    } else {
      $properties = new GObjectCollection(array());
    }
    
    if ($types & self::WITH_PARENTS && $this->getParent() != NULL) {
      // treat duplicates (aka: overriden properties):
      $parentTypes = $types | self::WITH_OWN;
      foreach ($this->getParent()->getAllProperties($parentTypes) as $property) {
        if (!$properties->has($property)) {
          $properties->add($property);
        }
      }
    }
    
    return $properties->toArray();
  }
1300596
public function get(string $type): array
    {
        try {
            return $this->converters[$this->resolveType($type)];
        } catch (\Throwable $t) {
            throw new InvalidTypeConverterException(
                sprintf('Invalid converter type `%s`.', $type)
            );
        }
    }
622676
public function getObjectsKeys($type = 'all')
	{
		$keys = null;

		if ($type == 'all')
		{
			$function = 'array_merge';
		}
		elseif ($type == 'common')
		{
			$function = 'array_intersect_key';
		}
		else
		{
			throw new \InvalidArgumentException("Unknown selection type: $type");
		}

		foreach ($this->objects as $object)
		{
			if (version_compare(PHP_VERSION, '5.4.0', '<'))
			{
				$objectVars = json_decode(json_encode($object->jsonSerialize()), true);
			}
			else
			{
				$objectVars = json_decode(json_encode($object), true);
			}

			$keys = ($keys === null) ? $objectVars : $function($keys, $objectVars);
		}

		return array_keys($keys);
	}