合并biz_content
@param array $args
@return string
494034
protected function encodeContent(array $args) {
        $data = [];
        foreach ($args as $key => $item) {
            $data[] = sprintf('"%s"="%s"', $key, $item);
        }
        return '{'.implode(',', $data).'}';
    }
345993
public function output($args = null) {
        $i = 0;
        foreach ($this->jobs as $job)
            if($job['function']($job['msg']) === TRUE)
                $i++;

        $this->jobs = [];
        return $i;
    }
1068664
public static function getCombinedContents($paths)
    {
        if (!Arr::iterable($paths)) {
            return '';
        }

        $out = array();
        foreach ($paths as $path) {
            $out[] = file_get_contents($path);
        }
        return join("\n", $out);
    }
306811
protected function _prepareLogMessage(array $args)
    {
        $pattern = $args[0];
        $substitutes = array_slice($args, 1);

        if ( ! $this->_validatePattern($pattern, $substitutes)) {
            return $pattern;
        }

        return vsprintf($pattern, $substitutes);
    }
427990
public static function zdump(...$args)
    {
        ob_start();

        foreach ($args as $v) {
            debug_zval_dump($v);
        }

        $dump = ob_get_contents();
        ob_end_clean();

        return $dump;
    }
156123
public function url( array $args = []) {
		$url = get_term_link( $this->term );
		if ( $args ) {
			$url = add_query_arg( $args, $url );
		}

		return $url;
	}
666564
private function Format($args){
		$message = array();
		if( $args ){
			foreach($args as $a){
				$argValue = '';
				if( $a['name'] ){
					$argValue .= $a['name'] . ':';
				}
				if( is_object($a['value']) ){
					$argValue .= $a['value']->toCSS();
				}else{
					$argValue .= '???';
				}
				$message[] = $argValue;
			}
		}
		return implode(', ',$message);
	}
452381
public function makeBucket(array $args = array()) {
        $bucket = isset($args[0]) ? $args[0] : null;
        if (is_null($bucket)) {
            $config = Zend_Registry::get('config');
            $bucket = isset($config->cdn->s3->bucket) ? $config->cdn->s3->bucket : null;
        }
        if (is_null($bucket)) {
            Garp_Cli::errorOut('No bucket configured');
            return false;
        }
        return $this->s3(
            'mb', array(
            's3://' . $bucket
            )
        );
    }
293361
private function _format(array $args){
        $data = [];
        foreach($args as $item){
            $id = $item[$this->config['primary_key']];
            $parent_id = $item[$this->config['parent_key']];
            $data[$parent_id][$id] = (array)$item;
        }
        return $data;
    }
250474
protected function generate($content, array $arguments)
    {
        foreach ($arguments as $name => $value) {
            if (is_array($value)) {
                $value = implode(', ', $value);
            }
            $content = preg_replace('/\{\s*\$'.$name.'\s*\}/', $value, $content);
        }

        return $content;
    }
863877
public static function buildArgs($args)
    {
        if (!is_array($args)) {
            return '';
        }
        $ret = '';
        foreach ($args as $k => $v) {
            if (!is_int($v) && ($v !== null)) {
                $v = escapeshellarg($v);
            }
            if (is_int($k)) {
                $ret .= ' ' . $v;
            } else {
                if ($k{0} !== '-') {
                    $ret .= ' --' . $k . ($v !== null ? '=' . $v : '');
                } else {
                    $ret .= ' ' . $k . ($v !== null ? '=' . $v : '');
                }
            }
        }
        return $ret;
    }
28492
public function encode(array $args)
    {
        if (!$args) {
            return $args;
        }

        $serializable = [];

        foreach ($args as $arg) {
            $serializable[] = $this->serialize($arg);
        }

        return $serializable;
    }
1003222
public function group(array $args) {
        $groupedArgs = [
            'arguments' => [],
            'options' => [],
        ];

        $option = 'arguments';

        foreach ($args as $arg) {
            if ($this->isOptionNameOrAlias($arg)) {
                $option = $arg;

                if ( ! array_has($groupedArgs, $option)) {
                    $groupedArgs[$option] = [];
                    $groupedArgs['options'][$option] = 1;
                } else {
                    $groupedArgs['options'][$option] += 1;
                }
            } else {
                $groupedArgs[$option][] = $arg;
            }
        }

        return $groupedArgs;
    }
799944
protected function file($args) {
		$target   = $args['target'];
		$download = !empty($args['download']);
		$h403     = 'HTTP/1.x 403 Access Denied';
		$h404     = 'HTTP/1.x 404 Not Found';

		if (($volume = $this->volume($target)) == false) { 
			return array('error' => 'File not found', 'header' => $h404, 'raw' => true);
		}
		
		if (($file = $volume->file($target)) == false) {
			return array('error' => 'File not found', 'header' => $h404, 'raw' => true);
		}
		
		if (!$file['read']) {
			return array('error' => 'Access denied', 'header' => $h403, 'raw' => true);
		}
		
		if (($fp = $volume->open($target)) == false) {
			return array('error' => 'File not found', 'header' => $h404, 'raw' => true);
		}

		if ($download) {
			$disp = 'attachment';
			$mime = 'application/force-download';
		} else {
			$disp  = preg_match('/^(image|text)/i', $file['mime']) || $file['mime'] == 'application/x-shockwave-flash' 
					? 'inline' 
					: 'attachment';
			$mime = $file['mime'];
		}
		
		$filenameEncoded = rawurlencode($file['name']);
		if (strpos($filenameEncoded, '%') === false) { // ASCII only
			$filename = 'filename="'.$file['name'].'"';
		} else {
			$ua = $_SERVER["HTTP_USER_AGENT"];
			if (preg_match('/MSIE [4-8]/', $ua)) { // IE < 9 do not support RFC 6266 (RFC 2231/RFC 5987)
				$filename = 'filename="'.$filenameEncoded.'"';
			} elseif (strpos($ua, 'Chrome') === false && strpos($ua, 'Safari') !== false) { // Safari
				$filename = 'filename="'.str_replace('"', '', $file['name']).'"';
			} else { // RFC 6266 (RFC 2231/RFC 5987)
				$filename = 'filename*=UTF-8\'\''.$filenameEncoded;
			}
		}
		
		$result = array(
			'volume'  => $volume,
			'pointer' => $fp,
			'info'    => $file,
			'header'  => array(
				'Content-Type: '.$mime, 
				'Content-Disposition: '.$disp.'; '.$filename,
				'Content-Location: '.$file['name'],
				'Content-Transfer-Encoding: binary',
				'Content-Length: '.$file['size'],
				'Connection: close'
			)
		);
		return $result;
	}
41852
public function url( array $args = []) {
        $url = get_comments_link( $this->post_ID );
        if ( $args ) {
            $url = add_query_arg( $args, $url );
        }

        return $url;
    }
1199219
public static function prepareCommand(array $args)
    {
        $return = '*' . \count($args) . "\r\n";
        foreach ($args as $arg) {
            $return .= '$' . \strlen($arg) . "\r\n" . $arg . "\r\n";
        }

        return $return;
    }
1349
public function brandParentApiArg(string $arg = ''): string
    {
        return $this->App->Parent ? $this->App->Parent->Utils->§BrandUrl->brandApiArg($arg) : $this->brandApiArg($arg);
    }