Adds a property to list of soft properties if condition is true.

@param 	$condition <Boolean>
@param 	$property <String>
@param 	$value <Mixed>
@access 	public
@return 	<void>
170607
final public function addPropertyIf(Bool $condition=null, String $property, $value=null)
	{
		if ($condition == true) {
			$this->softProperties[$property] = $value;
		}
	}
82824
public function inc($property, $value = 1) {
		if (isset($this->_data[$property])) {
			$this->_data[$property] += $value;
		} else {
			$this->_data[$property] = $value;
		}
		
		$this->_changed[$property] = true;
		
		return $this->_data[$property];
	}
377254
protected function setFileSize($property, $value) {
		try {
			$this->$property = \n2n\log4php\option\OptionConverter::toFileSizeEx($value);
		} catch (\Exception $ex) {
			$value = var_export($value, true);
			$this->warn("Invalid value given for '$property' property: [$value]. Expected a file size value.  Property not changed.");
		}
	}
39878
public function set(string $property, $value)
    {
        $this->validateProperty($property);

        // Note: do not round here!
        $old = 0;
        foreach (array_keys($this->perTaxRate) as $percent) {
            $old += $this->perTaxRate[$percent][$property];
        }

        if ($old) {
            $this->changeToFactor($value / $old);
        }

        return $this;
    }
301508
public function where($condition, $value = null): object
    {
        if (!is_array($condition)) {
            $condition = [$condition => $value];
        }
        $this->container[$this->id]['s']['where'] = array_merge($this->container[$this->id]['s']['where'], $condition);
        return $this;
    }
833554
public function set($property, $value = null, $overwrite = false)
    {

        $previous = isset($this->$property) ? $this->$property : null;

        $this->$property = $value;

        return $previous;
    }
701709
protected function setBoolean($property, $value) {
		try {
			$this->$property = \n2n\log4php\option\OptionConverter::toBooleanEx($value);
		} catch (\Exception $ex) {
			$value = var_export($value, true);
			$this->warn("Invalid value given for '$property' property: [$value]. Expected a boolean value. Property not changed.");
		}
	}
771265
public function set($property, $value) {

    // Vérification que la propriété existe bien
		if ($this->isProperty($property)) {

			// Si le type de la propriété est connu...
			/*if ($this->properties[$property]->type() != null) {

				// Forçage des types majeurs
				switch ($this->properties[$property]->type()) {
					case 'boolean':  $value_typed = (boolean)$value; break;
					case 'integer':  $value_typed = (int)$value;		 break;
					case 'string':   $value_typed = (string)$value;	 break;
					case 'array':    $value_typed = $value;				   break;
					case 'datetime': $value_typed = $value;				   break;
					case 'date':     $value_typed = $value;			     break;
					default:         $value_typed = $value;			     break;
				}

				$current_type = gettype($value_typed);

				if ($current_type != 'object') {
					if ($current_type == $this->properties[$property]->type() ||
              $current_type == NULL ||
              $this->properties[$property]->type() == 'date' ||
              $this->properties[$property]->type() == 'datetime') {
						if ($current_type == 'NULL') { $current_type = NULL; }
						$this->properties[$property]->setValue($value_typed);
					} else {
              throw new Exception("le type '".$this->properties[$property]["type"]."' de la propriété '".$property."' est invalide : '".$value_typed."' => '".$current_type."'", '00010006');
					}
				} else {
					if (is_a($value, $this->properties[$property]->type()) || $current_type == NULL || $current_type == 'NULL') {
						if ($current_type == 'NULL') { $current_type = NULL; }
						//$this->properties[$property]["value"] = $value;
            $this->properties[$property]->setValue($value);
					} else {
            throw new Exception("le type '".$this->properties[$property]["type"]."' de la propriété '".$property."' est invalide : '".$value_typed."' => '".$current_type."'", '00010006');
					}
				}
			} else {*/
				//$this->properties[$property]["value"] = $value;

        $this->properties[$property]->setValue($value);
			//}
		}
	}
310247
public function where($key, $condition = null, $value = null)
    {
        if (!is_null($condition) && is_null($value)) {
            $value = $condition;
            $condition = '=';
        }

        if (count($this->_conditions) < 1) {
            array_push($this->_conditions, []);
        }
        return $this->makeWhere($key, $condition, $value);
    }
1022532
protected function validateValue($property, $value)
    {
        $type = $this->getType($property);
        if (!$type) {
            $this->stdErr->writeln("Property not writable: <error>$property</error>");

            return false;
        }
        $valid = true;
        $message = '';
        // @todo find out exactly how these should best be validated
        $selectedEnvironment = $this->getSelectedEnvironment();
        switch ($property) {
            case 'parent':
                if ($selectedEnvironment->id === 'master') {
                    $message = "The master environment cannot have a parent";
                    $valid = false;
                } elseif ($value === $selectedEnvironment->id) {
                    $message = "An environment cannot be the parent of itself";
                    $valid = false;
                } elseif (!$parentEnvironment = $this->api()->getEnvironment($value, $this->getSelectedProject())) {
                    $message = "Environment not found: <error>$value</error>";
                    $valid = false;
                } elseif ($parentEnvironment->parent === $selectedEnvironment->id) {
                    $valid = false;
                }
                break;
        }
        switch ($type) {
            case 'boolean':
                $valid = in_array($value, ['1', '0', 'false', 'true']);
                break;
        }
        if (!$valid) {
            if ($message) {
                $this->stdErr->writeln($message);
            } else {
                $this->stdErr->writeln("Invalid value for <error>$property</error>: $value");
            }

            return false;
        }

        return true;
    }
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);
        }
    }
258820
public function set($property, $value)
    {
        list($slug, $key) = explode('::', $property);

        $cachePath = $this->getCachePath();
        $cache = $this->getCache();
        $module = $this->where('slug', $slug);

        if (isset($module[$key])) {
            unset($module[$key]);
        }

        $module[$key] = $value;

        $module = collect([$module['basename'] => $module]);

        $merged = $cache->merge($module);
        $content = json_encode($merged->all(), JSON_PRETTY_PRINT);

        return $this->files->put($cachePath, $content);
    }
360521
public function set($property, $value = null)
    {
        if (is_object($property)) {
            $property = get_object_vars($property);
        }

        if (is_array($property)) {
            foreach ($property as $k => $v) {
                $this->set($k, $v);
            }
        } elseif ('_' != substr($property, 0, 1)) {
            if (method_exists($this, 'set'.ucfirst($property))) {
                $this->{'set'.ucfirst($property)}($value);
            } else {
                $this->$property = $value;
            }
        }

        return $this;
    }
539519
public function setColumnProperty($column, $property, $value)
    {
        if (!isset($this->columns[$column])) {
            $this->columns[$column] = array();
        }
        $this->columns[$column][$property] = $value;
        return $this;
    }
1123270
public function setProperty($name, $property, $value)
    {
        if($this->has($name))
        {
            if($this->hasProperty($name, $property))
            {
                if($property !== 'value') {
                    $this->_data[$name]->$property = $value;
                } else {
                    $this->set($name, $value);
                }
            }
        }

        return $this;
    }
1161336
private function addPropertyToObject(Property $property, array &$object, $value)
    {
        $propertyName = $property->getName();
        if ($property->isArray()) {
            $keys = explode('.', $propertyName);
            $objectProp = array_pop($keys);
            $value = array_map(function ($value) use ($objectProp) {
                $object = [];
                $object[$objectProp] = $value;

                return $object;
            }, explode(',', $value));

            $propertyName = implode('.', $keys);
        }

        if ('integer' === $property->getType()) {
            $value = (int) $value;
        }

        if ('boolean' === $property->getType()) {
            $value = (bool) $value;
        }

        ArrayUtils::set($object, $propertyName, $value);
    }
262423
private function addCondition($property, $condition)
    {
        $currentCondition = $property->getVisibleCondition();
        if ((!($currentCondition instanceof ConditionChainInterface))
            || ($currentCondition->getConjunction() != ConditionChainInterface::OR_CONJUNCTION)
        ) {
            if ($currentCondition === null) {
                $currentCondition = new PropertyConditionChain([$condition]);
            } else {
                $currentCondition = new PropertyConditionChain([$currentCondition, $condition]);
            }
            $currentCondition->setConjunction(ConditionChainInterface::OR_CONJUNCTION);
            $property->setVisibleCondition($currentCondition);
        } else {
            $currentCondition->addCondition($condition);
        }
    }