protected function affix($affix, $value, $propagate = true)
	{
		$affixes = ['prefix', 'suffix'];

		if (in_array($affix, $affixes)) {

			if (is_scalar($value)) {
				$this->{$affix} = strval($value);
				return $this->propagateMutation($affix, $propagate);
			}

			throw new InvalidArgumentException("The given {$affix} cannot be converted to a string.");

		}
	}
protected function affix($affix, $value, $propagate = true)
	{
		$affixes = ['prefix', 'suffix'];

		if (in_array($affix, $affixes)) {

			if (is_scalar($value)) {
				$this->{$affix} = strval($value);
				return $this->propagateMutation($affix, $propagate);
			}

			throw new InvalidArgumentException("The given {$affix} cannot be converted to a string.");

		}
	}
protected function affix ( $ affix , $ value , $ propagate = true ) { $ affixes = [ 'prefix' , 'suffix' ] ; if ( in_array ( $ affix , $ affixes ) ) { if ( is_scalar ( $ value ) ) { $ this -> { $ affix } = strval ( $ value ) ; return $ this -> propagateMutation ( $ affix , $ propagate ) ; } throw new InvalidArgumentException ( "The given {$affix} cannot be converted to a string." ) ; } }
Affixes string to generated keys.

@param string $affix Affix type (either 'prefix' or 'suffix')
@param string $value
@param bool $propagate
@return $this

@throws \InvalidArgumentException
Affixes string to generated keys .