@param array $args

@return \IntlDateFormatter
326470
protected static function createInstance(array $args = [])
    {
        if (!self::$reflection) {
            self::$reflection = new \ReflectionClass('IntlDateFormatter');
        }

        $instance = self::$reflection->newInstanceArgs($args);

        self::checkInternalClass($instance, '\IntlDateFormatter', $args);

        return $instance;
    }
809622
public function withArgs($args = [])
    {
        if (!is_array($args)) {
            $args = func_get_args();
        }

        $this->args = $args;
        return $this;
    }
550067
protected function fill(array $args): AbstractEdge
    {
        if( count($this->fields)<=0 ) {
            return $this;
        }
        $methods = array_keys($this->fields);
        $args_count = count($args);
        $fields_count = count($this->fields);
        $n = 0;
        while($n<$args_count) {
            $key = sprintf("set%s", $methods[$n]);
            $this->$key($args[$n++]);
        }
        for($n=$args_count; $n<$fields_count; $n++) {
            $method = $methods[$n];
            if(
                isset($this->fields[$method]["directives"]["now"])
                &&
                $this->fields[$method]["directives"]["now"]==true
            ) {
                    $key = sprintf("set%s", $method);
                    $this->$key(time());
            }
            elseif(
                isset($this->fields[$method]["directives"]["default"])
                &&
                $this->fields[$method]["directives"]["default"]!="|_~_~NO!-!VALUE!-!SET~_~_|" 
            ) {
                $key = sprintf("set%s", $method);
                $this->$key($this->fields[$method]["directives"]["default"]);
            }
        }
        return $this;
    }
99514
protected function format($name, array $args = null)
    {
        $result = ['name' => $name];
        if ($args !== null) {
            $result['args'] = $args;
        }

        return $result;
    }
1095749
public static function t($msg, $args = array())
    {
        assert('is_string($msg)');
        if (extension_loaded('gettext')) {
            bindtextdomain("phptoolkit", dirname(dirname(__DIR__)).'/locale');
            textdomain('phptoolkit');

            $translatedMsg = gettext($msg);
        } else {
            $translatedMsg = $msg;
        }
        if (!empty($args)) {
            $params = array_merge(array($translatedMsg), $args);
            $translatedMsg = call_user_func_array('sprintf', $params);
        }
        return $translatedMsg;
    }
470483
public function url( array $args = [] ) {
		$url = get_permalink( $this->ID );
		if ( $args ) {
			$url = add_query_arg( $args, $url );
		}

		return $url;

	}
334678
protected function colorArgs($args)
    {
        if ($args[0] != 'list' || count($args[2]) < 2) {
            return array(array('color', 0, 0, 0), 0);
        }
        list($color, $delta) = $args[2];
        $color = $this->assertColor($color);
        $delta = floatval($delta[1]);

        return array($color, $delta);
    }
1262566
public function formatArgs($args)
    {
        // The first argument is always the file
        unset($args[0]);

        if (isset($args[1])) {
            $command = explode(':', $args[1]);
            unset($args[1]);
        } else {
            // No Command Specified.
            return array();
        }

        try {

            $action = (isset($command[1]) ? $command[1] : 'main');
            $cmd = $this->library->find($command[0].':'.$action);
            $task = get_class($cmd);

            return array(
                'task'      => $task,
                'action'    => $action,
                'params'    => $args
            );

        } catch (\Exception $e) {

            // No Command FOUND
            return array();
        }
    }
64937
public function messagePrintf(array $args = array())
    {
        $this->raw_msg = vsprintf($this->raw_msg, $args);
        $this->message = vsprintf($this->message, $args);
    }
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;
    }
1016718
public function setArgs(array $args)
    {
        foreach ($args as $k => $v) {
            if (is_numeric($k)) {
                $this->args[$k] = $v;
            } else {
                $this->kwargs[$k] = $v;
            }
            ksort($this->args);
        }
        return $this;
    }
1255011
protected static function formatResultOptions (array $arg) : array
    {
        // About tag filter
        if (isset($arg['tags'])):
            $arg['%tagFilter'] = true;

            if ( !isset($arg['withTag']) || !is_bool($arg['withTag']) ) :
                $arg['withTag'] = true;
            endif;
        else:
            $arg['%tagFilter'] = false;
        endif;

        return $arg;
    }
147322
public static function merge(array ...$args): array
    {
        \assert('count($args) > 0');
        $res = array_shift($args);
        foreach ($args as $next) {
            foreach ($next as $k => $v) {
                if (\is_int($k)) {
                    $res[] = $v;
                } else {
                    $res[$k] = \is_array($v) && isset($res[$k]) && \is_array($res[$k]) ? static::merge($res[$k], $v) : $v;
                }
            }
        }
        return $res;
    }
1263715
public function qrPay(array $args = array()) {
        $url = $this->getPayQr()->parameters($this->merge($args))->getUrl();
        return (new QrCode())->create((string)$url);
    }
967031
private function formatArguments($arguments)
    {
        return collect($arguments)->map(function ($argument) {
            return $argument instanceof Model ? FormatModel::given($argument) : $argument;
        })->toArray();
    }
416196
public function normalize( array $args = [] )
	{
		$defaults = [
			'after'       => '',
			'attributes'  => '',
			'before'      => '',
			'class'       => '',
			'default'     => null,
			'depends'     => null,
			'desc'        => '',
			'errors'      => [],
			'inline'      => false,
			'label'       => '',
			'name'        => '',
			'options'     => [],
			'path'        => '',
			'placeholder' => '',
			'prefix'      => '',
			'render'      => true,
			'suffix'      => null,
			'type'        => 'text',
			'value'       => '',
		];

		$args = $atts = wp_parse_args( $args, $defaults );

		$args['attributes'] = $this->parseAttributes( $atts );
		$args['id']         = $this->parseId( $atts );
		$args['inline']     = $this->parseInline( $atts );
		$args['type']       = $this->parseType( $atts );
		$args['name']       = $this->parseName( $atts );
		$args['options']    = (array) $atts['options']; // make sure this is always an array
		$args['path']       = $atts['name'];
		$args['prefix']     = $this->parsePrefix( $atts );
		$args['value']      = $this->parseValue( $atts );

		$this->args = $args;
		$this->dependencies = $this->getField( $args )->dependencies;

		$this->setDataDepends();
		$this->checkForErrors( $atts );

		return $this;
	}
153603
public static function Format ($str = '', array $args = []) {
		foreach ($args as $key => $value) {
			$pos = strpos($str, '{'.$key.'}');
			if ($pos !== FALSE)
				$str = substr($str, 0, $pos) . $value . substr($str, $pos + strlen($key) + 2);
		}
		return $str;
	}