Appends a value to a property if it already exists with a delimiter

If the property does not, it just adds it.

@param string $key
@param mixed $value
@param string $delimiter
354424
public function append($key, $value, $delimiter = ',')
    {
        $newValue = $value;
        if (isset($this->properties[$key]) && !empty($this->properties[$key])) {
            $newValue = $this->properties[$key] . $delimiter . $value;
        }
        $this->properties[$key] = $newValue;
    }
33027
public static function setValue($key, $value, &$data)
    {
        $parts = explode('.', $key);
        $first = array_shift($parts);
        if (count($parts) > 0) {
            $newKey = implode('.', $parts);
            if (!array_key_exists($first, $data)) {
                $data[$first] = array();
            }
            static::setValue($newKey, $value, $data[$first]);
            return;
        }
        $data[$first] = $value;
    }
129961
public function setDelimiter($delimiter)
    {
        if (!is_string($delimiter) || strlen($delimiter) < 1) {
            throw new \InvalidArgumentException("Invalid delimiter specified, must be a string at least 1 character long");
        }

        $this->delimiter = $delimiter;

        return $this;
    }
1116481
protected function mergeDataEntry($value, $key) {
        if (!isset($this->shared[$key])) {
            $this->shared[$key] = $value;
        } elseif (isset($this->shared[$key]['#merged'])) {
            $this->shared[$key]['#value'][] = $value;
        } else {
            $oldValue = $this->shared[$key];
            $this->shared[$key] = [
                '#merged' => true,
                '#value' => [$oldValue, $value]
            ];
        }
    }
48711
public function increment($key, $value = 1)
    {
        $this->pushStandardKeys($this->tags->getNamespace(), $key);

        parent::increment($key, $value);
    }
1139949
public static function insert(&$arr, $path, $value, $delimiter = '.')
    {
        if (! static::exists($arr, $path, $delimiter)) {
            static::set($arr, $path, $value, $delimiter);
        }
    }
203194
public function add($key, $value)
    {
        $header = $this->get($key, true);
        if (is_array($value)) {
            $header = array_merge($header, $value);
        } else {
            $header[] = $value;
        }
        parent::set($this->normalizeKey($key), $header);
    }
1207324
public function add(string $key, $value)
    {
        $current = $this->get($key, []);
        $adds = is_array($value) ? $value : [$value];
        $this->set($key, array_merge($current, array_values($adds)));
    }
701849
public function add ($key , $value) {
        if (!$this->beforeAdd()) {
            return false;
        }
        if (!$this->getConnection ()->getClient ()->zadd ($this->name , $value , $key)) {
            return false;
        }
        $this->_data = null;
        $this->_count = null;
        $this->afterAdd();
        return true;
    }
439540
public function appendToData($key, $value, $urlEncode = true)
    {
        $key = '{' . $key . '}';
        $this->_data[$key] = $urlEncode ? static::encodeData($value) : $value;
    }
502032
public function addValue($key, $value, $overwrite = false)
    {
        if (!isset($this->data[$key]) || $overwrite) {
            $this->data[$key] = (string) $value;
        }
    }
617272
private function set($key, $value = "")
    {
        if (property_exists($this, $key)) {
            $key = implode('', array_map('ucfirst', explode('_', $key)));
            $this->{'set' . $key}($value);
        }
    }
369419
public static function explode($string, $delimiter)
    {
        if (!String::isValid($string) ||
            String::isEmpty($string)) {
            return false;
        }

        return explode($delimiter, $string);
    }
472146
public function addWordDelimiter($delimiter)
    {
        if (in_array($delimiter, $this->getWordDelimiters())) {
            throw new \Exception("Word delimiter '$delimiter' is already there.");
        }
        if (empty($delimiter)) {
            throw new \Exception('Word delimiter cannot be null.');
        }
        if (is_array($delimiter)) {
            $this->_wordDelimiters = array_merge($this->getWordDelimiters(), $delimiter);
        } else {
            $this->_wordDelimiters[] = $delimiter;
        }
        return $this;
    }
119037
public function offsetSet( $key, $value )
    {
        $lowerKey = strtolower( $key );
        if ( !array_key_exists( $lowerKey, $this->lookup ) )
        {
            $this->map[$key] = $value;
            $this->lookup[$lowerKey] = $key;
        }
        else // use old case
        {
            $this->map[$this->lookup[$lowerKey]] = $value;
        }
    }
28307
public function implode($key, $delimiter = ',')
    {
        $this->prepare();

        $implode = [];
        if (is_string($key)) {
            return $this->makeImplode($key, $delimiter);
        }

        if (is_array($key)) {
            foreach ($key as $k) {
                $imp = $this->makeImplode($k, $delimiter);
                $implode[$k] = $imp;
            }

            return $implode;
        }
        return '';
    }
770351
public static function cache( $value, $name, $delimiter = null )
	{
		if( $value === '' )
		{
			return $value;
		}

		$func = $name;
		$arg2 = $name == "snake";

		if( $arg2 )
		{
			if( is_null($delimiter) )
			{
				$delimiter = "_";
			}
		}
		else if( ($arg2 = $arg2 == "ascii") )
		{
			if( is_null($delimiter) )
			{
				$delimiter = "en";
			}
		}

		if( $arg2 )
		{
			$name .= $delimiter;
		}

		if( isset(self::$cache[$name][$value]) )
		{
			return self::$cache[$name][$value];
		}

		return self::$cache[$name][$value] = ( $func == "snake" ? static::snake($value, $delimiter) : static::$func($value) );
	}