Formats address as a single line string

@return string
514735
public function toString()
    {
        $sFirstName = $this->oxaddress__oxfname->value;
        $sLastName = $this->oxaddress__oxlname->value;
        $sStreet = $this->oxaddress__oxstreet->value;
        $sStreetNr = $this->oxaddress__oxstreetnr->value;
        $sCity = $this->oxaddress__oxcity->value;

        //format it
        $sAddress = "";
        if ($sFirstName || $sLastName) {
            $sAddress = $sFirstName . ($sFirstName ? " " : "") . "$sLastName, ";
        }
        $sAddress .= "$sStreet $sStreetNr, $sCity";

        return trim($sAddress);
    }
89648
public static String formatAddress(int address) {
		int b1 = (address >>> 24) & 0xff;
		int b2 = (address >>> 16) & 0xff;
		int b3 = (address >>>  8) & 0xff;
		int b4 =  address         & 0xff;

		return "" + b1 + '.' + b2 + '.' + b3 + '.' + b4;
	}
1140723
public function format() {

        /*         * Add the mandatary props* */
        if (!is_null($this->fromEmail)) {
            $result[self::FROMEMAIL_KEY] = $this->fromEmail;
        }
        /*         * Add the optional props if any* */
        if (!is_null($this->optionalProperties)) {
            $result = array_merge($result, $this->optionalProperties);
        }


        return $result;
    }
719179
def onelineaddress(self, address, **kwargs):
        '''
        '''
        fields = {
            'address': address,
        }

        return self._fetch('onelineaddress', fields, **kwargs)
440749
public function toString(): string
    {
        // first line
        $output = $this->buildFirstLine() . self::EOL;

        // add headers
        $output .= $this->headers->toHeaderLines(true);

        // append cookies
        if ($cookie = $this->cookies->toRequestHeader()) {
            $output .= "Cookie: $cookie" . self::EOL;
        }

        $output .= self::EOL;

        return $output . $this->getBody();
    }
1311978
protected function getAddress() {
        $address = "{".$this->host.":".$this->port."/".($this->protocol ? $this->protocol : 'imap');
        if (!$this->validate_cert) {
            $address .= '/novalidate-cert';
        }
        if (in_array($this->encryption,['tls','ssl'])) {
            $address .= '/'.$this->encryption;
        }

        $address .= '}';

        return $address;
    }
1078058
public function getShortAddressString()
    {
        //Оно может быть не сохранено если определяли по ip
        $result = [];

        $result[] = ArrayHelper::getValue($this->data, 'street_with_type');

        if (ArrayHelper::getValue($this->data, 'house'))
        {
            $result[] = ArrayHelper::getValue($this->data, 'house_type') . " " . ArrayHelper::getValue($this->data, 'house');
        }
        if (ArrayHelper::getValue($this->data, 'flat'))
        {
            $result[] = ArrayHelper::getValue($this->data, 'flat_type') . " " . ArrayHelper::getValue($this->data, 'flat');
        }

        $result = array_unique($result);

        foreach ($result as $key => $value)
        {
            if (!$value)
            {
                unset($result[$key]);
            }
        }

        return implode(", ", $result);
    }
1324090
public function toString()
    {
        if (!empty($this->alias)) {
            return $this->alias;
        }

        $version = '';

        if (!empty($this->nickname)) {
            $version .= $this->nickname . ' ';
        }

        if (!empty($this->value)) {
            if (preg_match("/([0-9]+)(?:\.([0-9]+))?(?:\.([0-9]+))?(?:\.([0-9]+))?(?:([ab])([0-9]+))?/", $this->value, $match)) {
                $v = [ $match[1] ];

                if (array_key_exists(2, $match) && strlen($match[2])) {
                    $v[] = $match[2];
                }

                if (array_key_exists(3, $match) && strlen($match[3])) {
                    $v[] = $match[3];
                }

                if (array_key_exists(4, $match) && strlen($match[4])) {
                    $v[] = $match[4];
                }

                if (!empty($this->details)) {
                    if ($this->details < 0) {
                        array_splice($v, $this->details, 0 - $this->details);
                    }

                    if ($this->details > 0) {
                        array_splice($v, $this->details, count($v) - $this->details);
                    }
                }

                if (isset($this->builds) && !$this->builds) {
                    $count = count($v);
                    for ($i = 0; $i < $count; $i++) {
                        if ($v[$i] > 999) {
                            array_splice($v, $i, 1);
                        }
                    }
                }

                $version .= implode($v, '.');

                if (array_key_exists(5, $match) && strlen($match[5])) {
                    $version .= $match[5] . (!empty($match[6]) ? $match[6] : '');
                }
            }
        }

        return $version;
    }
637238
public function toString() {
        $str = $this->protocol . '://' . $this->hostName;
        if ($this->protocol==='http' && $this->portNumber==80) {
            //don't add port
        } else if ($this->protocol==='https' && $this->portNumber==443) {
            //don't add port
        } else {
            $str .= ':'. $this->portNumber;
        }
        return $str;
    }
749966
public function outputShort()
    {
        return implode(', ', array_filter([
            $this->place,
            $this->number,
            $this->detail,
            $this->neighborhood,
            implode(' ', array_filter([
                $this->county->name . '/' . $this->county->state->code,
                Validation::cep($this->zipcode),
            ]))
        ]));
    }
591843
public function toString()
    {
        $result = "";

        if (!empty($this->scheme)) {
            $result .= "{$this->scheme}://";
        }

        if (!empty($this->user)) {
            $result .= !empty($this->pass)
                ? "{$this->user}:{$this->pass}@"
                : "{$this->user}@";
        }

        $result .= $this->host;

        if (!empty($this->port) && (isset($this->portMap[$this->scheme]) && $this->port != $this->portMap[$this->scheme])) {
            $result .= ":{$this->port}";
        }

        $result .= $this->path;

        $qs = $this->query->toString();
        if (!empty($qs)) {
            $result .= "?{$qs}";
        }

        if (!empty($this->fragment)) {
            $result .= "#{$this->fragment}";
        }

        return $result;
    }
705903
public function toString ()
	{
		$content = "<VirtualHost {$this->address}:{$this->port}>" . PHP_EOL;
		
		foreach ($this->directives as $directive) {
			$content .= $directive->toString() . PHP_EOL;
		}
		
		$content .= PHP_EOL;
		
		foreach ($this->directories as $directory) {
			$content .= $directory->toString() . PHP_EOL;
		}
		$content .= PHP_EOL;
		
		$content .= "</VirtualHost>";
		
		return $content;
	}
845703
public function getFullAddress()
    {
        $parts = [
            $this->owner->Address,
            $this->owner->Address2,
            $this->owner->City,
            $this->owner->State,
            $this->owner->PostalCode,
            $this->owner->Country,
        ];

        return implode(', ', array_filter($parts));
    }
1004894
public function getAddress()
    {
        $isUnix = $this->getAddressType() === AF_UNIX;

        $address = array();
        $address['transport'] = $this->getTransport() . ( $isUnix ? ':///' : '://' );
        $address['target']    = $this->getTarget();
        $address['port']      = ( $isUnix ? '' : ':' ) . $this->getTargetPort();

        return implode('', $address);
    }
1213146
public function toHeaderLine() : string
  {
    $cookie = sprintf('%s=%s', $this->name, urlencode($this->value));
    
    if ($this->expires !== 0) {
      $cookie .= sprintf('; expires=%s', gmdate('D, d-M-Y H:i:s T', $this->expires));
    }

    if (!empty($this->path)) {
      $cookie .= sprintf('; path=%s', $this->path);
    }

    if (!empty($this->domain)) {
      $cookie .= sprintf('; domain=%s', $this->domain);
    }

    if (!empty($this->secure)) {
      $cookie .= '; secure';
    }

    if (!empty($this->httpOnly)) {
      $cookie .= '; httponly';
    }

    return $cookie;
  }
341525
public function toString()
    {
        $adapter = $this->getAdapter();
        $prefix  = $adapter->getTablePrefix();
        $query   = $this->type;

        if($this->table) {
            $query .= ' INTO '.$adapter->quoteIdentifier($prefix.$this->table);
        }

        if($this->columns) {
            $query .= '('.implode(', ', array_map(array($adapter, 'quoteIdentifier'), $this->columns)).')';
        }

        if($this->values)
        {
            if(!$this->values instanceof KDatabaseQuerySelect)
            {
                $query .= ' VALUES'.PHP_EOL;

                $values = array();
                foreach ($this->values as $row)
                {
                    $data = array();
                    foreach($row as $column) {
                        $data[] = $adapter->quoteValue(is_object($column) ? (string) $column : $column);
                    }

                    $values[] = '('.implode(', ', $data).')';
                }

                $query .= implode(', '.PHP_EOL, $values);
            }
            else $query .= ' '.$this->values;
        }

        if($this->duplicate_key_values && $this->type === 'INSERT')
        {
            $values = array();
            foreach($this->duplicate_key_values as $value) {
                $values[] = ' '. $adapter->quoteIdentifier($value);
            }

            $update_clause = implode(', ', $values);

            if($this->_parameters) {
                $update_clause = $this->_replaceParams($update_clause);
            }

            $query .= ' ON DUPLICATE KEY UPDATE '.$update_clause;
        }

        return $query;
    }
145969
private static function format() {

		$routes = static :: getRoutes();

		foreach($routes as $identifier => $route) {

			$url = preg_quote($route -> getUrl(), '/'); 

			//Prepend prefix for url
			if($prefix = $route -> getPrefix()) {
				$url = $prefix['url'] . $url;
			}

			if(preg_match_all('#(\\\/)*\\\{([a-zA-Z0-9_.]+)(\\\\\?)?\\\}#i', $url, $matches)) {
				
				foreach($matches[0] as $index => $match) {

					$match 		= $matches[0][$index];
					$slash 		= $matches[1][$index];
					$type 		= $matches[2][$index];
					$optional 	= $matches[3][$index];
					$where 		= $route -> getWhere();
					$variable 	= '';
					$typefound 	= false;

					if('' !== $slash) {
						$variable .= '\/';
					}

					if(true === is_array($where)) {
						
						foreach($where as $key => $regex) {
							
							if($key === $type) {
								
								$variable .= $regex;
								$typefound = true;
								break;
							}
						}
					}

					if(false === $typefound) {

						if(isset(static :: $types[$type])) {
							$variable .= static :: $types[$type];
						}
						else {
							$variable .= static :: $types['string'];	
						}
					}

					if('' !== $optional) {
						$variable = '('. $variable .')?';
					}
					else {
						$variable = '('. $variable .')';
					}
					
					$url = preg_replace('#' . preg_quote($match, '/') . '#', $variable, $url, 1);
				}
			}

			$route -> setMatch($url);
		}
	}