Joins the fieldnames with the glue string between each fieldname
@param string $glue
@return sFire\Validator\Combine
199245
public function glue($glue) {

		if(false === is_string($glue)) {
			return trigger_error(sprintf('Argument 1 passed to %s() must be of the type string, "%s" given', __METHOD__, gettype($glue)), E_USER_ERROR);
		}

		$this -> glue = $glue;

		return $this;
	}
1073853
public function constructSQLClause($glue, array $columns)
    {
        $whereClause = [];

        foreach ($columns as $column => $value) {
            $newValue = ltrim($value, '!');
            $quotedValue = $this->quoteOrNot($newValue);
            $comparator = '%s=';
            $notOperator = '';

            // Check if the supplied value is null, if so change the format.
            if (strtolower($newValue) == 'null') {
                $comparator = 'is%s';
            }

            // Check if a not is applied to the value.
            if ($newValue !== $value) {
                if (strtolower($newValue) == 'null') {
                    $notOperator = ' not';
                } else {
                    $notOperator = '!';
                }
            }

            // Check if the value is surrounded by wildcards. If so, we'll want to use a LIKE comparator.
            if (preg_match('/^%.+%$/', $value)) {
                $comparator = 'LIKE';
            }

            // Make up the sql.
            $comparator = sprintf($comparator, $notOperator);

            $whereClause[] = sprintf('%s %s %s', $column, $comparator, $quotedValue);
        }

        return implode($glue, $whereClause);
    }
1257936
public function concat($source)
    {
        $result = new static($this);

        foreach ($source as $item) {
            $result->push($item);
        }

        return $result;
    }
79278
protected function recursiveImplode(string $glue, array $array): string
    {
        $return = '';
        $index = 0;
        $count = count($array);
        foreach ($array as $row) {
            if (is_array($row)) {
                $return .= $this->recursiveImplode($glue, $row);
            } else {
                $return .= (is_object($row)) ? get_class($row) : $row;
            }
            if ($index < $count - 1) {
                $return .= $glue;
            }
            ++$index;
        }

        return $return;
    }
700115
public function merge($spec)
    {
        if ($spec instanceof ConsoleOptionParser) {
            $spec = $spec->toArray();
        }
        if (!empty($spec['arguments'])) {
            $this->addArguments($spec['arguments']);
        }
        if (!empty($spec['options'])) {
            $this->addOptions($spec['options']);
        }
        if (!empty($spec['subcommands'])) {
            $this->addSubcommands($spec['subcommands']);
        }
        if (!empty($spec['description'])) {
            $this->setDescription($spec['description']);
        }
        if (!empty($spec['epilog'])) {
            $this->setEpilog($spec['epilog']);
        }

        return $this;
    }
907167
public function implode($column, $glue = null)
    {
        if (is_null($glue)) return implode($this->lists($column));

        return implode($glue, $this->lists($column));
    }
721666
public function implode($glue, $queries)
    {
        $first = true;
        foreach ($queries as $query) {
            if ($first) {
                $first = false;
            } else {
                $this->_query .= ' ' . $glue;
            };
            $this->append($query);
        };
        return $this;
    }
1507
public function implode($value, $glue = null)
	{
		if (is_null($glue)) return implode($this->lists($value));

		return implode($glue, $this->lists($value));
	}
265760
public function getSelect()
    {
        $concat = null;

        foreach ($this->fieldDescriptors as $fieldDescriptor) {
            if (null == $concat) {
                $concat = $fieldDescriptor->getSelect();
            } else {
                $concat = 'CONCAT(' . $concat . ', CONCAT(\'' . $this->glue . '\', ' . $fieldDescriptor->getSelect() . '))';
            }
        }

        return $concat;
    }
1298943
static function join($glue, array $list, callable $manipulator) {
		$glued = '';
		foreach ($list as $key => $value) {
			$item = $manipulator($key, $value);
			if ($item !== false) {
				$glued .= $glue.$item;
			}
		}

		if ( ! empty($glued)) {
			$glued = substr($glued, strlen($glue));
		}

		return $glued;
	}
331002
private function Array2string($arr, $glue = '&') {
    if (!is_array($arr)) {
      throw new Exception('Argument arr must be array');;
    }
    $new = array();
    foreach ($arr as $k => $v) {
      $new[] = urlencode($k) .'='. urlencode($v);
    }
    return implode($glue, $new);
  }
539080
protected static function joinParam( $param = [], $join = '=', $glue = '&', $useKey = true){



        $allParam = [];

        foreach ($param as $key => $val)
        {
            if( is_array( $val ) ){
                if ($useKey && isset($val[0]) && is_array($val[0]) === false) {
                    $newValue = [];
                    foreach ($val as $element) {
                        $newValue[] = $key . $join . self::replaceCharacters($element);
                    }

                    return implode($glue, $newValue);
                } else {
                    $val = self::joinParam( $val, $join, $glue, $useKey);
                }
            }

            // ommit parameters with empty values
            if( !empty( $val )){
                #self::$urlParam[] = $useKey
                $allParam[] = $useKey
                        ? $key . $join .urlencode(URLify::downcode($val))
                        : $join .urlencode(URLify::downcode($val));
            }
        }

        // no parameters given
        if( is_null( $allParam ) ) {
            return '';
        }

        $allParam = self::replaceCharacters($allParam);

        return implode($glue, $allParam );
    }
924624
public function having($conditions, $glue='AND')
  {
    if ( is_null($this->having) ){
      $glue = strtoupper($glue);
      $this->having = new Element('HAVING', $conditions, " $glue ");
    }
    else {
      $this->having->append($conditions);
    }

    return $this;
  }
1299596
static function implodeRecursive($glue, $pieces)
    {
        $items = [];
        foreach ($pieces as $item){
            if (is_array($item)){
                $items[] = self::implodeRecursive($glue, $item);
            }else{
                $items[] = $item;
            }
        }
        return implode($glue, $items);
    }
579501
public static function flatten($arr, $glue = '=')
    {
        $list = array();

        foreach ($arr as $key => $value) {
            $list[] = "{$key}{$glue}{$value}";
        }

        return $list;
    }
604130
public function forUpdate($table_name, $glue = ',')
	{
		$this->type = 'forUpdate';

		if ($this->forUpdate === null)
		{
			$glue            = strtoupper($glue);
			$this->forUpdate = new QueryElement('FOR UPDATE', 'OF ' . $table_name, "$glue ");
		}
		else
		{
			$this->forUpdate->append($table_name);
		}

		return $this;
	}
16700
public function format($format, array $arguments = array(), $glue = '<br>')
    {
        if (is_array($format)) {
            $format = implode($glue, gplcart_array_flatten($format));
        }

        return vsprintf($format, $arguments);
    }