Retrieve the model's properties as a collection of {@see PropertyInterface} objects.

@param  array $propertyIdents Optional. List of property identifiers
for retrieving a subset of property objects.
@return PropertyInterface[]|\Generator
777434
public function properties(array $propertyIdents = null)
    {
        // Hack: ensure metadata is loaded.
        $this->metadata();

        if ($propertyIdents === null) {
            $propertyIdents = array_keys($this->metadata()->properties());
        }

        if (empty($propertyIdents)) {
            return;
        }

        foreach ($propertyIdents as $propertyIdent) {
            yield $propertyIdent => $this->property($propertyIdent);
        }
    }
1146454
private function readPage($propertyName, NodeInterface $node)
    {
        $pagePropertyName = $propertyName . '-page';
        if (!$node->hasProperty($pagePropertyName)) {
            return;
        }

        try {
            $pageUuid = $node->getPropertyValue($pagePropertyName, PropertyType::STRING);
        } catch (ItemNotFoundException $exception) {
            return;
        }

        return [
            'uuid' => $pageUuid,
            'path' => $node->getPropertyValueWithDefault($pagePropertyName . '-path', ''),
            'webspace' => $node->getPropertyValueWithDefault($pagePropertyName . '-webspace', null),
        ];
    }
301671
protected function findObjects(array $ids)
    {
        $foundObjects = $this->domain->getRepository()->findBy([
            $this->identifier => array_unique($ids),
        ]);
        $mapFinds = [];
        $objects = [];

        foreach ($foundObjects as $foundObject) {
            $id = $this->propertyAccessor->getValue($foundObject, $this->identifier);
            $mapFinds[$id] = $foundObject;
        }

        foreach ($ids as $i => $id) {
            $objects[$i] = $mapFinds[$id]
                ?? $this->domain->newInstance($this->defaultValueOptions);
        }

        return $objects;
    }
1173805
protected function filterProperties(array $properties) {
        $tags = array_fill_keys($this->allowedTags, 1);

        if (empty($tags) || isset($tags['*'])) {
            return $properties;
        }

        $filtered = [];

        foreach ($properties as $key => $value) {
            if (isset($tags[$key])) {
                $filtered[$key] = $value;
                continue;
            }

            if (($pos = strpos($key, ':')) !== false) {
                $namespace = substr($key, 0, $pos);

                if (isset($tags[$namespace . ':*'])) {
                    $filtered[$key] = $value;
                    continue;
                }
            }
        }

        return $filtered;
    }
169258
private function initializeObjectDataProperties(PropertiesInterface $properties)
    {
        // get secondary types
        $propertyList = $properties->getProperties();
        if (isset($propertyList[PropertyIds::SECONDARY_OBJECT_TYPE_IDS])) {
            $this->secondaryTypes = [];
            foreach ($propertyList[PropertyIds::SECONDARY_OBJECT_TYPE_IDS]->getValues() as $secondaryTypeId) {
                $type = $this->getSession()->getTypeDefinition($secondaryTypeId);
                if ($type instanceof SecondaryTypeInterface) {
                    $this->secondaryTypes[] = $type;
                }
            }
        }

        $this->properties = $this->getObjectFactory()->convertPropertiesDataToPropertyList(
            $this->getObjectType(),
            (array) $this->getSecondaryTypes(),
            $properties
        );

        $this->extensions[(string) ExtensionLevel::cast(
            ExtensionLevel::PROPERTIES
        )] = $properties->getExtensions();
    }
563140
public static function fillPropertyGroups(&$models)
    {

        if (count($models) === 0) {
            return [];
        }
        /** @var \yii\db\ActiveRecord|\DevGroup\DataStructure\traits\PropertiesTrait|\DevGroup\TagDependencyHelper\TagDependencyTrait $firstModel */
        $firstModel = reset($models);
        //        if ($firstModel->propertyGroupIds !== null) {
        //            // assume that we have already got them
        //            return;
        //        }

        $tags = [
            PropertyGroup::commonTag(),
        ];
        foreach ($models as $modelForTag) {
            $tags[] = $modelForTag->objectTag();
        }

        $binding_rows = Yii::$app->cache->lazy(
            function () use ($firstModel, $models) {
                $query = new Query();

                $query->select(['model_id', 'property_group_id'])->from(
                    $firstModel::bindedPropertyGroupsTable()
                )->where(PropertiesHelper::getInCondition($models))->orderBy(['sort_order' => SORT_ASC]);

                return $query->all($firstModel::getDb());

            },
            static::generateCacheKey($models, 'property_groups_ids'),
            0,
            $tags
        );

        array_walk(
            $binding_rows,
            function (&$item) {
                $item['model_id'] = (int) $item['model_id'];
                $item['property_group_id'] = (int) $item['property_group_id'];
            }
        );

        foreach ($models as &$model) {
            $id = $model->id;
            $model->propertyGroupIds = array_reduce(
                $binding_rows,
                function ($carry, $item) use ($id) {
                    if ($item['model_id'] === $id) {
                        $carry[] = (int) $item['property_group_id'];
                    }
                    return $carry;
                },
                []
            );
        }

    }
1182176
public function getList($propertyValues, $propertyKeys = null, $uniqueValues = false) {
		$this->initialize($propertyValues);
		
		$list = [];		
		
		if ($propertyKeys === true) {
			$propertyKeys = $this->getPrimary();
		}
		
		if ($propertyKeys === null) {
			foreach($this->_map as $key) {
				if (isset($this->_data[$key][$propertyValues])) {
					$list[] = $this->_data[$key][$propertyValues];
				}
			}
		} else {
			foreach ($this->_map as $key) {
				if (isset($this->_data[$key][$propertyKeys], $this->_data[$key][$propertyValues])) {
					$list[$this->_data[$key][$propertyKeys]] = $this->_data[$key][$propertyValues];
				}
			}
		}
		
		if ($uniqueValues === true) {
			return array_unique($list);
		}
		
		return $list;
	}
690226
public function getPropertiesValues($properties)
    {
        $returnValue = array();
        if(!is_array($properties)){
			throw new common_exception_InvalidArgumentType(__CLASS__, __FUNCTION__, 0, 'array', $properties);
        }
        $returnValue = $this->getImplementation()->getPropertiesValues($this, $properties/*, $last*/);
        return (array) $returnValue;
    }
37263
public function getProperties(array $props = array())
    {
        if (empty($props)) {
            return $this->properties;
        }

        $properties = [];
        foreach ($props as $key) {
            $properties[$key] = isset($this->properties[$key]) ? $this->properties[$key] : null;
        }

        return $properties;
    }
904401
protected function getProperties($dynamicProperties = array())
    {
        $dynamicProperties = array_merge($dynamicProperties, $this->dynamicProperties);

        return parent::getProperties($dynamicProperties);
    }
135815
private function propertiesValuestoStdClasses($propertiesValues = null)
    {
        $returnValue =array();
        foreach ($propertiesValues as $uri => $values) {
            $propStdClass = new stdClass;
            $propStdClass->predicateUri = $uri;
            foreach ($values as $value){
                $stdValue = new stdClass;
                $stdValue->valueType = (get_class($value)=="core_kernel_classes_Literal") ? "literal" : "resource";
                $stdValue->value = (get_class($value)=="core_kernel_classes_Literal") ? $value->__toString() : $value->getUri();
                $propStdClass->values[]= $stdValue;
            }
            $returnValue[]=$propStdClass;
        }
        return $returnValue;
    }
1279464
protected function getPropertiesContentData($properties, $propertyValues)
    {
        $contentData = [];

        foreach ($properties as $property) {
            if ($this->exportManager->hasExport($property->getType(), $this->format)) {
                if (!isset($propertyValues[$property->getName()])) {
                    continue;
                }

                $propertyValue = $propertyValues[$property->getName()];

                if ($property instanceof BlockMetadata) {
                    $data = $this->getBlockPropertyData($property, $propertyValue);
                } else {
                    $data = $this->getPropertyData($property, $propertyValue);
                }

                $contentData[$property->getName()] = $data;
            }
        }

        return $contentData;
    }
854391
public function getByIds(array $ids): array
    {

        $entities = $this->getRepository()->findByIds($ids);

        $this->prepareEntitesForGet($entities);

        return $entities;
    }
781350
public static function getProperties($classes)
    {
        array_reverse($classes);
        $properties = array();
        foreach ($classes as $class) {
            foreach ($class->getProperties() as $property) {
                $properties[$property->getName()] = $property;
            }
        }

        return $properties;
    }
1023257
protected function getObjectProperties(array $objects): array
    {
        $objectProperties = [];
        /** @var ITypedObject[] $objects */
        foreach ($objects as $key => $object) {
            $objectProperties[$key] = $object->toArray();
        }

        return $objectProperties;
    }
263590
protected function getGeneratedProperties(): array
    {
        $reflectionObject = new \ReflectionObject($this);
        $properties = $reflectionObject->getProperties(\ReflectionProperty::IS_PUBLIC);
        $result = [];
        foreach ($properties as $property) {
            if (!$property->isPublic() || @$property->isDefault()) {
                continue;
            }

            $result[] = $property;
        }

        return $result;
    }
783031
public function getProperties($properties){
        $values= array();
        foreach ($properties as $key) {
            $values[$key]= $this->getProperty($key);
        }
        return $values;
    }