@param string $name  The name of the property to be set
@param mixed  $value The value of the property

@return int|bool Returns the number of changed properties,
or false if $name is invalid
177779
protected function _propertySet($name, $value) {
        if (array_key_exists($name, $this->_properties)) {
            if ($this->_properties[$name] !== $value) {
                $this->_properties[$name] = $value;
                $this->_modified[$name] = $value;
                return 1;
            }
            return 0;
        }
        return false;
    }
1023347
public function updateAttribute($name, $value)
	{
		$this->__set($name, $value);
		return $this->update(false);
	}
1325558
public function _set($name, $value)
    {
        $object = $this->getObject();
		$callable = function() use ($name, $value, $object) {
			if (!property_exists($object, $name) && !method_exists($object, '__set'))
			{
				throw new \Exception('Property ' . $name . ' doesn\'t exist on object of class ' . get_class($object));
			}
			$object->$name = $value;
		};
		$this->breakScopeAndExecute($callable);
    }
1280613
public function setProperty(string $name, $value): self
    {
        if (strpos($name, '_')) { // camelize
            $name = preg_replace_callback('~_([a-z])~', function($match) {
                return ucfirst($match[1]);
            }, strtolower($name));
        }

        if (!property_exists($this, $name)) {
            throw new PagerException("No property found such '{$name}'");
        }

        // forbid start & stop
        if (in_array($name, ['start', 'stop'])) {
            throw new PagerException("Not allowed property '{$name}' to set");
        }

        static $intProperties = ['stopMax', 'stopDefault', 'totalPages', 'totalRecords', 'linksLimit'];
        static $boolProperties = ['autorun', 'numerateFirstLast'];

        if (in_array($name, $intProperties)) {
            $value = (int) abs($value);
        } elseif (is_array($name, $boolProperties)) {
            $value = (bool) $value;
        }

        if ($name == 'stop' && $value > $this->stopMax) {
            $value = $this->stopMax;
        }

        $this->{$name} = $value;

        return $this;
    }
2266
public function setValue($name, $value) {
        $this->_states[count($this->_states) - 1][1][$name] = $value;
    }
965334
public function set($name, $value = null)
    {
        $this->loaded = true;

        // Set record for collection
        if (!$this->data && $value instanceof static) {
            $this->isColl = true;
        }

        if (!$this->isColl) {
            if (in_array($name, $this->getFields())) {
                $this->changedData[$name] = isset($this->data[$name]) ? $this->data[$name] : null;
                $this->data[$name] = $value;
                $this->isChanged = true;
            }
        } else {
            if (!$value instanceof static) {
                throw new \InvalidArgumentException('Value for collection must be an instance of Wei\Record');
            } else {
                // Support $coll[] = $value;
                if ($name === null) {
                    $this->data[] = $value;
                } else {
                    $this->data[$name] = $value;
                }
            }
        }
        return $this;
    }
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;
            }
        }
    }
256765
public function setSetting($name, $value = null)
    {
        $oldValue = $this->getSetting($name);
        if ($value != $oldValue) {
            if (!empty($value)) {
                $this->settings[$name] = $value;
            } else {
                unset($this->settings[$name]);
            }
            $this->settingsChanged = true;
        }
    }
781178
public function setProperty($name, $value)
    {
        if (strstr($name, '.')) {
            $this->setPropertyByPath($name, $value);

            return true;
        }

        if ($this->isArray()) {
            $this->object[$name] = $value;
        } else {
            $this->object->$name = $value;
        }

        return true;
    }
952336
public static function validation($name = false, $value = false) {
		if (!$name && !$value) {
			return self::$validate->getAll();
		}

		return self::$validate->validate($name, $value);
	}
527350
final public function set($name, $value)
    {
        $method = 'set'.ucfirst($name);
        if(!method_exists($this, $method) ) {
            parent::set($name, $value);
        } else {
            $this->$method($value);
        }

        return $this;
    }
891593
public function update( string $name, $value ) {
		if ( $this->post->$name ) {
			return wp_update_post( [
				'ID'  => $this->ID,
				$name => $value
			] );
		} elseif ( $this->$name ) {
			return update_field( $name, $value, $this->ID );
		}
		
		return FALSE;
	}
511080
public static function set($name, $value = null)
	{
		$names = parseCfgName($name);
		if (isset($names[0]))
		{
			$first = array_shift($names);
			$obj = self::getInstance($first);
			if ($obj)
			{
				return $obj->setVal($names, $value);
			}
			else
			{
				return false;
			}
		}
		else
		{
			return false;
		}
	}
86862
public function setProperty( $name, $value,
                                 $priority = self::PRIORITY_NORMAL )
    {
        if ( ! empty( static::$propertyAliases[$name] ) )
        {
            foreach ( static::$propertyAliases[$name] as $alias )
            {
                $this->setRawProperty(
                    String::decamelize( $alias ),
                    $value, $priority
                );
            }
        }

        $method = 'set' . String::camelize( $name, '-', false ) . 'Property';

        if ( is_callable( array( $this, $method ) ) )
        {
            return $this->$method( $value, $priority );
        }
        else
        {
            return $this->setRawProperty(
                String::decamelize( $name ),
                $value, $priority
            );
        }
    }
75918
public function setOption($name, $value)
    {
        if (! in_array($name, $this->validOptions)) {
            throw new Error('Invalid option ' . $name . '. Valid options are : ' . join(', ', $this->validOptions));
        }
        // Check duplicate fields in header
        if ('header' == $name) {
            $cnt = array_count_values($value);
            $duplicates = array();
            foreach ($cnt as $f => $c) {
                if ($c > 1) {
                    $duplicates[$f] = $c;
                }
            }
            if (sizeof($duplicates) > 0) {
                $msg = 'Duplicate fields found in header : ' . join(', ', array_keys($duplicates));
                throw new Error($msg);
            }
        }
        $this->$name = $value;

        return $this;
    }
175946
protected function _set($name, $value)
    {
        $this->_data[$name] = $value;

        // Do not reload / save here:
        // 1: other changes might follow,
        // 2: it might not be used,
        // 3: e.g. database saves may change other data.
        $this->invalidateCache();

        return $this;
    }
351637
public static function setVar($name,$value){
		self::init();
		self::$variables[$name]=$value;
		return true;
		}