Add a property.
@param string                $name
@param string|array|Property $property
181868
public function addProperty($name, $property=null) {
		$name = strtolower($name);
		if($property === null)
			$property = 'string';
		if(is_string($property))
			$property = ['type'=>$property];
		if(is_array($property)) {
			foreach($property as $k=>$v) {
				if(is_int($k)) {
					unset($property[$k]);
					$property[$v] = true;
				}
			}

			if(!isset($property['type']) || !$property['type'])
				$property['type'] = 'string';

			$type = $property['type'];
			$property = $this->getContainer()->make('Asgard.Entity.PropertyType.'.$type, [$property], function($params) use($type) {
				$class = '\Asgard\Entity\Property\\'.ucfirst(strtolower($type)).'Property';
				return new $class($params);
			});
		}

		$property->setDefinition($this);
		$property->setName($name);

		if($property->getPosition() === null)
			$property->setPosition(count($this->properties)+1);
		$this->properties[$name] = $property;

		uasort($this->properties, function($a, $b) {
			return $a->getPosition() > $b->getPosition();
		});
	}
1265913
public function property($name, $value)
    {
        $this->_properties[$name] = new PropertyInjection($name, $value);
        return $this;
    }
859605
public function addProperty(SonarProperty $property)
    {
        $this->propertyElements[] = $property;

        $message = sprintf("Added property: [%s] = [%s].", $property->getName(), $property->getValue());
        $this->log($message, Project::MSG_DEBUG);
    }
1201724
public function setPropertiesAsArray($properties)
    {
        if (\is_array($properties)) {
            if (\array_key_exists('id', $properties)) {
                unset($properties['id']);
            }

            foreach ($properties as $propertyName => $value) {
                $this->setProperty($propertyName, $value);
            }
        }
    }
537247
def _add_property(self, name, default_value):
        

        name = str(name)
        self._properties[name] = default_value
780094
public function add(string $name, string $value): void
    {
        $key = strtolower($name);
        if (!isset($this->headers[$key])) {
            $this->headers[$key] = [$name, $value];

            return;
        }

        $this->headers[$key] = [$name, $this->headers[$key][1] . ', ' . $value];
    }
603757
public function set($name, $value = null)
    {
        if (is_array($name)) {
            foreach ($name as $k => $v) {
                $this->set($k, $v);
            }
        } else {
            if (is_callable($value)) {
                $this->dynamic[$name] = $value;
            } else {
                $this->properties[$name] = $value;
            }
        }
    }
1278097
public function hasProperty($name, $property)
    {
        $result = false;
        if($this->has($name)) {
            $result = property_exists($this->_data[$name], $property);
        }

        return $result;
    }
355460
def add(name, options)
      @properties[name.to_sym] = Property.new(name.to_sym, options[:type], options[:default])
    end
1084351
public function add($property)
    {
        if (!$property instanceof PropertyInterface) {
            throw new \InvalidArgumentException(
                'This Property must be a instance of \ClassGeneration\PropertyInterface'
            );
        }
        if ($property->getName() === null) {
            $property->setName('property' . ($this->count() + 1));
        }

        parent::set($property->getName(), $property);

        return true;
    }
214666
protected function setProperty($name, $value)
    {
        // adds both camelized key and unchanged key to properties
        $this->properties[str_replace(' ', '', ltrim(ucwords(preg_replace('/[^A-Z^a-z^0-9]+/', ' ', 'z' . $name)), 'Z'))] = $value;
        $this->properties[str_replace(' ', '', ucwords(preg_replace('/[^A-Z^a-z^0-9]+/', ' ', $name)))] = $value;
        $this->properties[$name] = $value;
    }
998539
public void addProperty(final String propertyName, final String value) {
        Preconditions.checkNotNull(propertyName);
        Preconditions.checkNotNull(value);
        List<String> values = properties.get(propertyName);
        if (values == null) {
            values = new ArrayList<>();
            values.add(value);
            properties.put(propertyName, values);
        } else {
            values.add(value);
        }
    }
500495
public function set($property, $value)
    {
        $properties = $this->getValue('properties', []);
        $properties[$property] = [$value];
        $this->setValue('properties', $properties);
    }
819632
public function addProperty($property)
    {
        $properties = $this->getProperties();
        array_push($properties, $property);
        $this->setProperties($properties);
    }
193722
public function addPropertyMetadata($property, $index, $value)
    {
        if (!isset($this->propertyMetadata[$property])) {
            $this->propertyMetadata[$property] = array($index => $value);
        } else {
            $this->propertyMetadata[$property][$index] = $value;
        }

        return $this;
    }
637324
public function addProperties($properties)
    {
        foreach ($properties as $key => $value) {
            $this->setProperty($key, $value);
        }

        return $this;
    }
269527
public function addColumn(string $name): void
    {
        if (!in_array($name, $this->columns, true)) {
            $this->columns[] = $name;
        }
    }