Set setter

@param boolean $setter

@return Attribute

@throws \InvalidArgumentException
960941
public function setSetter($setter)
    {
        if (!is_bool($setter)) {
            throw new \InvalidArgumentException('The attribute setter on the class Attribute has to be boolean (' . gettype($setter) . ('object' === gettype($setter) ? ' ' . get_class($setter) : '') . ' given).');
        }

        $this->setter = $setter;

        return $this;
    }
665163
public function setAttribute($key, $value)
    {
        if ($this->hasSetMutator($key)) {
            $method = sprintf($this->methodNameSetMutator, Str::studly($key));

            return $this->{$method}($value);
        }

        $this->attributes[$key] = $value;

        return $this;
    }
503009
public function attributeUseObject(
        string $attribute,
        Value\ClassName $className,
        string $setter,
        string $getter
    ): ObjectInterface {
        return $this;
    }
637020
public function setAttr(string $name, string $value)
    {
        $this->attr[$name] = $value;

        return $this;
    }
68575
public function setAttr($attr, $value = null)
    {
        if (is_array($attr)) {
            $this->attr = array_merge($this->attr, $attr);

            return $this;
        }

        $this->attr[$attr] = $value;

        return $this;
    }
1286724
public function setLogger($logger) {
		if(!in_array('Psr\Log\LoggerInterface', class_implements($logger, true))) {
			throw new \InvalidArgumentException('Logger object does not implement Psr\Log\LoggerInterface');
		}
		$this->logger = $logger;
	}
1138976
public function setValidator($validator)
    {
        $this->clearCache();
        $this->validators = [];
        $this->addValidator($validator);

        return $this;
    }
1248343
public function callSetter($field, $value) {
    $f = 'set'.ucfirst($field);
    if (!method_exists($this, $f)) throw new \InvalidArgumentException($f.'() existiert nicht in '.\Psc\Code\Code::getClass($this));
    return $this->$f($value);
  }
84389
public function setLogger($logger = null)
    {
        if (! (is_null($logger)
            || $logger instanceof LoggerInterface)) {
            throw new InvalidArgumentException(
                'Argument to ' . __METHOD__ .
                " must be a valid Logger Interface (aka. Monolog), " .
                get_class($logger) . ' given.'
            );
        }

        $this->logger = $logger;
    }
476526
public function setNull($null)
    {
        if (!is_bool($null)) {
            throw new \InvalidArgumentException('The attribute null on the class Attribute has to be boolean (' . gettype($null) . ('object' === gettype($null) ? ' ' . get_class($null) : '') . ' given).');
        }

        $this->null = $null;

        return $this;
    }
961261
public function setTLS($isEnabled)
    {
        if (!is_bool($isEnabled)) {
            throw new InvalidArgumentException(
                sprintf('%s only accepts a boolean', __FUNCTION__)
            );
        }

        $this->tls = (bool)$isEnabled;

        return $this;
    }
877664
public function set_attr( $attribute, $value = null ) {
		if ( is_null( $value ) || $value === false ) {
			if ( array_key_exists( $attribute, $this->attr ) ) {
				unset( $this->attr[$attribute] );
			}
		} else {
			if ( $value === true ) {
				$value = $attribute;
			}
			$this->attr[ $attribute ] = $value;
		}
		
		return $this;
	}
1096593
public function attributeUseCollectionIdentifiedObject(
        string $attribute,
        string $setter,
        string $getter
    ): ObjectInterface {
        $this->attributes[$attribute] = new Type\Collection\IdentifiedObject($setter, $getter);

        return $this;
    }
359708
public function _setAttributes($attributes)
    {
        if (is_array($attributes)) {
            foreach ($attributes as $attribute => $value) {
                $this->{$attribute} = $value;
            }

            return $this;
        }

        //@todo: put real exception here cos exception' gon be thrown either ways, so put one that makes sense
        //or something else that has more meaning
        throw new \InvalidArgumentException('Invalid argument Passed to set attributes on object');
    }
781965
public function setAdaptor($adaptor = null)
    {

        // Set the adaptor
        $this->adaptor = $adaptor;

        // If we just want to reset the adaptor
        if ( ! $adaptor ) {
            return $this;
        }

        // Validate the adaptor
        if ( ! ( $adaptor instanceof CropAdaptorInterface ) ) {
            throw new \Exception( 'The adaptor need to implement LasseHaslev\Image\Adaptors\CropAdaptorInterface' );
        }

        // Return this for binding
        return $this;
    }
968656
public function setValidator($validator)
    {
        if (!($validator instanceof LibBaseControllerValidatorAbstract)) {
            if (is_string($validator) && strpos($validator, '.') === false) {
                $identifier = clone $this->getIdentifier();
                $identifier->path = array('controller', 'validator');
                $identifier->name = $validator;
                register_default(array('identifier' => $identifier, 'prefix' => $this));
            } else {
                $identifier = $this->getIdentifier($validator);
            }

            if ($identifier->path[1] != 'validator') {
                throw new AnControllerBehaviorException('Identifier: '.$identifier.' is not a validator identifier');
            }

            $validator = $identifier;
        }

        $this->_validator = $validator;
    }
1131811
public function setUpdater($updater)
    {
        if (!is_string($this->updatedByAttribute) || empty($this->updatedByAttribute)) {
            return false;
        }
        if ($updater instanceof Binary && $updater->getType() == Binary::TYPE_UUID) {
            return $this->{$this->updatedByAttribute} = $updater;
        }
        if ($updater instanceof $this->hostClass || $updater instanceof IdentityInterface) {
            return $this->{$this->updatedByAttribute} = new Binary($updater->getGUID(), Binary::TYPE_UUID);
        }
        if (is_string($updater) && preg_match(Number::GUID_REGEX, $updater)) {
            return $this->{$this->updatedByAttribute} = new Binary(Number::guid_bin($updater), Binary::TYPE_UUID);
        }
        if (strlen($updater) == 16) {
            return $this->{$this->updatedByAttribute} = new Binary($updater, Binary::TYPE_UUID);
        }
        return false;
    }