获取单例对象
@param array ...$args
@return static
357057
public static function getInstance(...$args)
    {
        if(static::isChildClassSingleton())
        {
            $className = static::class;
            if(!isset(static::$instances[$className]))
            {
                static::$instances[$className] = new static(...$args);
            }
            return static::$instances[$className];
        }
        else
        {
            if(null === static::$instance)
            {
                static::$instance = new static(...$args);
            }
            return static::$instance;
        }
    }
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;
    }
1000022
public function orderBy($args) {
        if (!is_array($args)) {
            $args = func_get_args();
        }
        // 把关联数组变成 1，asc
        foreach ($args as $key => $item) {
            if (!is_integer($key)) {
                if (is_array($item)) {
                    //'asc' => ['a', 'b']
                    foreach ($item as $value) {
                        $this->orders[] = $value;
                        $this->orders[] = $key;
                    }
                    continue;
                }
                // 'a' => 'b'
                $this->orders[] = $key;
                $this->orders[] = $item;
                continue;
            }
            if (is_array($item)) {
                // ['a', 'asc']
                $this->orders[] = $item[0];
                $this->orders[] = $item[1];
                continue;
            }
            $this->orders[] = $item;
        }
        return $this;
    }
507049
public function init(array $args = [])
    {
        $args += ['total' => 100, 'width' => 80];
        $this->_progress = 0;
        $this->_width = $args['width'];
        $this->_total = $args['total'];

        return $this;
    }
921797
public function merge(...$args): self
    {
        $args = array_map([Arr::class, 'toArray'], $args);

        return new static(array_merge($this->storage, ...$args));
    }
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;
    }
424487
public static function getInstance(...$args)
    {
        $class = static::class;

        if (empty(static::$instances[$class])) {
            static::$instances[$class] = Ioc::getContainer()->newInstance($class, ...$args);
        }

        return static::$instances[$class];
    }
1108498
public function setArguments(array $args): PostTypeInterface
    {
        $this->args = array_merge($this->args, $args);

        return $this;
    }
265906
public function setArguments(array $arguments)
    {
    	foreach ($arguments as $k => $v) {
    		$this->arguments[$k] = $v;
    	}
        
        return $this;
    }
1045751
public function setArguments(array $args)
    {
        $className = $this->className;
        $method = $this->method;

        $arguments = [];

        if (isset(self::$params[$className][$method])) {
            foreach (self::$params[$className][$method] as ['index' => $index, 'default' => $default]) {
                $arguments[$index] = \array_key_exists($index, $args) ? $args[$index] : $default;
            }
        } else {
            $reflectionMethod = new \ReflectionMethod($this->object, $method);

            $parameters = $reflectionMethod->getParameters();
            foreach ($parameters as $index => $parameter) {
                $name = $parameter->getName();
                $default = $parameter->isDefaultValueAvailable() ? $parameter->getDefaultValue() : null;

                self::$params[$className][$method][$name] = [
                    'index' => $index,
                    'default' => $default,
                ];

                $arguments[$index] = \array_key_exists($index, $args) ? $args[$index] : $default;
            }
        }

        $this->arguments = $arguments;

        return $this;
    }
511694
public function orWhere(...$args): self
    {
        $this->createToken('OR', $args, $this->whereTokens, $this->whereWrapper());

        return $this;
    }
474156
public function scope($scope, ...$args)
    {
        // 查询范围的第一个参数始终是当前查询对象
        array_unshift($args, $this);

        if ($scope instanceof \Closure) {
            call_user_func_array($scope, $args);
            return $this;
        }

        if (is_string($scope)) {
            $scope = explode(',', $scope);
        }

        if ($this->model) {
            // 检查模型类的查询范围方法
            foreach ($scope as $name) {
                $method = 'scope' . trim($name);

                if (method_exists($this->model, $method)) {
                    call_user_func_array([$this->model, $method], $args);
                }
            }
        }

        return $this;
    }
969931
public static function evaluateArgs(array $args)
    {

        $parsedArgs = [];

        foreach ($args as $key=>$value) {

            if ($value instanceof self) {
                $parsedArgs[$key] = static::callFast($value);
                continue;
            }
            $parsedArgs[$key] = $args[$key];
        }

        return $parsedArgs;

    }
1339915
public function bootstrapGridStackedFunction(array $args = []) {
        return $this->bootstrapGrid(ArrayHelper::get($args, "lg"), ArrayHelper::get($args, "md"), ArrayHelper::get($args, "sm"), ArrayHelper::get($args, "xs"), ArrayHelper::get($args, "recopy", false), "");
    }
1010563
public function setConfigs(array $args) {
        if (!is_array(current($args))) {
            $args = [
                $this->currentName => $args
            ];
        }
        foreach ($args as $key => $item) {
            if (array_key_exists($key, $this->configs)) {
                $this->configs[$key] = array_merge($this->configs[$key], $item);
            } else {
                $this->configs[$key] = $item;
            }
        }
        return $this;
    }
1170700
public static function getOneWhere($args = array())
    {
        $args['number'] = 1;
        $result = static::getWhere($args);
        return (count($result)) ? current($result) : null;
    }
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;
    }