Registers the child properties with the generated Trait Descriptor.

@param Property[] $properties
184199
protected function addProperties(array $properties, TraitDescriptor $traitDescriptor): void
    {
        foreach ($properties as $property) {
            $propertyDescriptor = $this->getBuilder()->buildDescriptor($property);
            if ($propertyDescriptor instanceof PropertyDescriptor) {
                $propertyDescriptor->setParent($traitDescriptor);
                $traitDescriptor->getProperties()->set($propertyDescriptor->getName(), $propertyDescriptor);
            }
        }
    }
671386
protected function preUpdate(array $properties = null)
    {
        $this->verifyDates();
        $this->setSlug($this->generateSlug());

        return parent::preUpdate($properties);
    }
1154351
public function fill(array $properties)
    {
        foreach ($properties as $key => $value)
        {
            $this->setAttribute($key, $value);
        }

        return $this;
    }
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();
    }
327383
public function validateProperties(array $properties): bool
    {
        foreach ($properties as $property => $allowed) {
            $this->validateProperty($property, $allowed);
        }

        return true;
    }
346856
protected function setLabelsProperty(array $properties)
    {
        $labels = $this->getLabelsFromProperties($properties);

        foreach ($labels as $label) {
            $this->addLabel($label->text, $label->isPlain, $label->lang);
        }

        return $this;
    }
903228
public function sets(array $properties)
  {
    foreach($properties as $k => $v){
      $this->set($k, $v);
    }
    return $this;
  }
1176254
protected function setPlaceholder(&$properties)
    {
        if (!Helpers::isKeyExists($properties, 'placeholder')) {
            $properties['placeholder'] = $this->getPlaceholders($properties['name'], $this->getHtmlType($properties));
        }

        return $this;
    }
515025
protected function registerServiceProvider($properties)
    {
        $namespace = $this->resolveNamespace($properties);

        $name = Str::studly(
            isset($properties['type']) ? $properties['type'] : 'package'
        );

        // The main service provider from a package should be named like:
        // AcmeCorp\Pages\Providers\PackageServiceProvider

        $provider = "{$namespace}\\Providers\\{$name}ServiceProvider";

        if (! class_exists($provider)) {
            // We will try to find the alternate service provider, named like:
            // AcmeCorp\Pages\PageServiceProvider

            $name = Str::singular(
                $properties['basename']
            );

            if (! class_exists($provider = "{$namespace}\\{$name}ServiceProvider")) {
                return;
            }
        }

        $this->app->register($provider);
    }
1044931
public function setOptionsProperty(array $properties)
    {
        if (Helpers::isKeyExists($properties, 'options') && is_array($properties['options'])) {
            $labels = $this->transferOptionsToLabels($properties['options']);

            foreach ($labels as $label) {
                $this->addOption($label->text, $label->isPlain, $label->lang, $label->value);
            }

        }

        return $this;
    }
91188
public function setProperties(array $properties)
    {
        foreach ($properties as $propertyIdent => $propertyMetadata) {
            if (isset($this->properties[$propertyIdent])) {
                $this->properties[$propertyIdent] = array_replace_recursive(
                    $this->properties[$propertyIdent],
                    $propertyMetadata
                );
            } else {
                $this->properties[$propertyIdent] = $propertyMetadata;
            }
        }

        return $this;
    }
1349309
public function fromRaw($properties)
	{
		$this->validateProperties($properties);

		foreach ($properties as $property => $value) {
			$this->properties[$property] = $value;
		}
	}
1275959
public function setParamProperties($properties = array())
    {
        $map = array('type'    => 'type',
                     'io'       => 'io',
                 'comment'  => 'comment',
                 'var'      => 'varName',
                 'data'     => 'data',
                 'varying'  => 'varying',
                 'dim'      => 'dimension',
                 'by'       => 'by',
                 'array'    => 'isArray',
                 'setlen'   => 'labelSetLen',
                 'len'      => 'labelLen',
                 'dou'      => 'labelDoUntil',
                 'enddo'    => 'labelEndDo',
                 'ccsidBefore' => 'ccsidBefore',
                 'ccsidAfter'  => 'ccsidAfter',
                 'useHex'      => 'useHex',
        );

        // go through all properties and set the ones that are valid,
        // using the mapping above to find the true property name.
        foreach ($properties as $key=>$value) {
            $propName = isset($map[$key]) ? $map[$key] : '';
            
            if ($propName) {
                // a valid property name was found so set it
                $this->$propName = $value;
            }
        }
    }
3717
protected function initializeProperties($properties = null)
    {
        $this->getPropertiesInfo();

        // Initialize the properties that were defined using the Initialize / InitializeObject annotations
        $initializeValueValidationEnabled = Configuration::isInitializeValuesValidationEnabled();
        foreach ($this->_initialPropertiesValues as $propertyName => $initialization) {
            $value = null;
            switch ($initialization['type']) {
                case 'initialize':
                    $value = $initialization['value'];
                    break;
                default:
                    $className = $initialization['value'];
                    $value = new $className();
                    break;
            }

            if ($initializeValueValidationEnabled) {
                $this->assertPropertyValue($propertyName, $value);
            }

            $this->$propertyName = $value;
            $this->updateInitializedPropertyValue($propertyName, $value);
        }

        // Initialize the propeties using given arguments
        if ($this->_initializationNeededArguments !== null && $properties !== null) {
            $numberOfNeededArguments = count($this->_initializationNeededArguments);

            MethodCallManager::assertArgsNumber($numberOfNeededArguments, $properties);

            for ($i = 0; $i < $numberOfNeededArguments; $i++) {
                $propertyName = $this->_initializationNeededArguments[$i];
                $argument = $properties[$i];

                $this->assertPropertyValue($propertyName, $argument);
                $this->$propertyName = $argument;
                $this->updateInitializedPropertyValue($propertyName, $argument);
            }
        }
    }
1105649
protected function validateProperties($properties)
	{
		foreach ($this->required as $required) {
			if (!array_key_exists($required, $properties)) {
				throw new \InvalidArgumentException("Required open graph property [$required] is not present.");
			}
		}
	}
1366817
public function withProperties(array $properties): self
    {
        $map = $this->properties;

        foreach ($properties as $key => $value) {
            $map = $map->put($key, $value);
        }

        return new self(
            $this->object,
            $map,
            $this->injectionStrategy,
            $this->extractionStrategy
        );
    }
333314
private function setType(array &$properties)
    {
        $type = array_pull($properties, 'type', null);

        $this->type = is_null($type)
            ? $this->guessType($properties)
            : $type;

        return $this;
    }