Add property to class.

@param string|ClassMemberListNode $property
@return $this
438813
public function appendProperty($property) {
    if (is_string($property)) {
      $property = ClassMemberListNode::create($property);
    }
    $properties = $this->statements->children(Filter::isInstanceOf('\Pharborist\ClassMemberListNode'));
    if ($properties->count() === 0) {
      $this->statements->firstChild()->after($property);
    }
    else {
      $properties->last()->after($property);
    }
    FormatterFactory::format($this);
    return $this;
  }
147196
public static function duplicateProperty($className, Property $property)
    {
        return new self(sprintf(
            'Property "%s" in "%s" was already declared in "%s", but it must be declared only once',
            $property->getName(),
            $className,
            $property->getDeclaringClass()->getClassName()
        ));
    }
860111
public PropertyContainer add(String property) {
		
		// Si la propriete n'est pas nulle
		if(property != null && property.trim().length() > 0) properties.add(property);
		
		// On retourne le conteneur
		return this;
	}
1117867
public function addInheritedProperty(Property $property)
    {
        $inheritedProperty = clone $property;
        $declaringClass    = $property->getDeclaringClass();

        if ($inheritedProperty instanceof FieldMetadata) {
            if (! $declaringClass->isMappedSuperclass) {
                $inheritedProperty->setTableName($property->getTableName());
            }

            $this->fieldNames[$property->getColumnName()] = $property->getName();
        } elseif ($inheritedProperty instanceof AssociationMetadata) {
            if ($declaringClass->isMappedSuperclass) {
                $inheritedProperty->setSourceEntity($this->className);
            }

            // Need to add inherited fieldNames
            if ($inheritedProperty instanceof ToOneAssociationMetadata && $inheritedProperty->isOwningSide()) {
                foreach ($inheritedProperty->getJoinColumns() as $joinColumn) {
                    /** @var JoinColumnMetadata $joinColumn */
                    $this->fieldNames[$joinColumn->getColumnName()] = $property->getName();
                }
            }
        }

        if (isset($this->declaredProperties[$property->getName()])) {
            throw MappingException::duplicateProperty($this->className, $this->getProperty($property->getName()));
        }

        $this->declaredProperties[$property->getName()] = $inheritedProperty;

        if ($inheritedProperty instanceof VersionFieldMetadata) {
            $this->versionProperty = $inheritedProperty;
        }
    }
574020
public function addProperty($property)
    {
        $property = $this->resolvePropertyName($property);
        $this->properties[$property] = true;
        return $this;
    }
1313258
protected function addChild(PropertyInterface $property)
    {
        if ($property instanceof SectionPropertyInterface) {
            foreach ($property->getChildProperties() as $childProperty) {
                $this->addPropertyTags($childProperty);
            }
        } else {
            $this->addPropertyTags($property);
        }

        $this->properties[$property->getName()] = $property;
    }
1312150
public function add($property, $value)
	{
		if ('_' == substr($property, 0, 1))
		{
			$this->setError("Can't access private properties");
			return false;
		}

		if (property_exists(__CLASS__, $property) || property_exists(__CLASS__, '_auxs_' . $property))
		{
			$this->setError("Can't add value(s) to non-array property.");
			return false;
		}

		if (!property_exists(__CLASS__, '_auxv_' . $property))
		{
			$this->setError("Unknown property: $property");
			return false;
		}

		if (empty($value))
		{
			return true;
		}

		if (!is_array($value))
		{
			$value = array($value);
		}

		$property = '_auxv_' . $property;

		foreach ($value as $v)
		{
			$v = strval($v);

			if (!in_array($v, $this->$property))
			{
				array_push($this->$property, $v);
			}
		}

		sort($this->$property);

		return true;
	}
980637
public function addProperty(Property $property) {
        $properties = $this->getProperties();
        $properties[] = $property;
        $this->setProperties($properties);
    }
818935
protected function addFieldDefaultValue(&$property, Field $field)
    {
        if (!is_null($field->dataValue) && !$field->nullable) {
            $property .= sprintf("->default('%s')", $field->dataValue);
        }

        return $this;
    }
1309293
public function add(ListCreationInformation $properties)
    {
        $list = new SPList($this->getContext());
        $qry = new InvokePostMethodQuery($this->getResourcePath(),null,null,$properties);
        $this->getContext()->addQuery($qry,$list);
        $this->addChild($list);
        return $list;
    }
816367
private function manyNestedInThe(string $property): MapsProperty
    {
        if (null !== $this->container && !class_exists($this->container)) {
            throw NoSuchClass::couldNotLoadCollection($this->container);
        }
        return $this->addConstraintTo(HasManyNested::inPropertyWithDifferentKey(
            $property,
            $this->keyOr($property),
            $this->container(),
            $this->hydrator()
        ));
    }
451881
public function add(Property $property)
    {
        $name = $property->getName();

        if (isset($this->elements[$name])) {
            throw new \Exception("Property with name '{$name}' already exists");
        }

        $this->elements[$name] = $property;

        return $this;
    }
423316
public function setObject($property, $content)
    {
        $property = 'og:' . $property;
        $element = new Element('meta');

        $element->attributes[ 'name' ] = $property;
        $element->attributes[ 'content' ] = (is_array($content) ? implode(', ', $content) : trim($content));

        parent::offsetSet($property, $element);

        return $this;
    }
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;
    }
151906
public function set($property, $value = null)
    {
        if (is_string($property) && $value != '') {
            $property = [$property => $value];
        }

        foreach ($property as $name => $value) {
            $this->properties[$name] = $value;
        }

        return $this;
    }
1208982
public function setProperty(PropertyInterface $property)
    {
        $this->property      = $property;
        $this->propertyType  = $property->type();
        $this->propertyIdent = $property->ident();

        $inputType = $property['input_type'];
        if ($inputType) {
            $this->inputType = $inputType;
        }

        $displayType = $property['display_type'];
        if ($displayType) {
            $this->displayType = $displayType;
        }

        return $this;
    }
822394
public function addProperties($property, $editable)
    {
        $platformRoles = $this->roleManager->getAllPlatformRoles();

        foreach ($platformRoles as $role) {
            $prop = $this->profilePropertyRepo
                ->findBy(array('property' => $property, 'role' => $role));

            if (count($prop) === 0) $this->addProperty($property, $editable, $role);
        }
    }