加密函数
@param string $input 需要加密的字符串
@param string $key 密钥
@return string 返回加密结果
171341
public function encrypt($input, $key = '')
    {
        if (empty($input)) return $input;
        if (empty($key)) $key = md5($this->key);
        $chars = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_.";
        $ikey ="-x6g6ZWm2G9g_vr0Bo.pOq3kRIxsZ6rm";
        $nh1 = rand(0,64);
        $nh2 = rand(0,64);
        $nh3 = rand(0,64);
        $ch1 = $chars{$nh1};
        $ch2 = $chars{$nh2};
        $ch3 = $chars{$nh3};
        $nhnum = $nh1 + $nh2 + $nh3;
        $knum = 0;$i = 0;
        while(isset($key{$i})) $knum +=ord($key{$i++});
        $mdKey = substr(md5(md5(md5($key.$ch1).$ch2.$ikey).$ch3),$nhnum%8,$knum%8 + 16);
        $input = base64_encode(time().'_'.$input);
        $input = str_replace(array('+','/','='),array('-','_','.'),$input);
        $tmp = '';
        $j=0;$k = 0;
        $tlen = strlen($input);
        $klen = strlen($mdKey);
        for ($i=0; $i<$tlen; $i++) {
            $k = $k == $klen ? 0 : $k;
            $j = ($nhnum+strpos($chars,$input{$i})+ord($mdKey{$k++}))%64;
            $tmp .= $chars{$j};
        }
        $tmplen = strlen($tmp);
        $tmp = substr_replace($tmp,$ch3,$nh2 % ++$tmplen,0);
        $tmp = substr_replace($tmp,$ch2,$nh1 % ++$tmplen,0);
        $tmp = substr_replace($tmp,$ch1,$knum % ++$tmplen,0);
        return $tmp;
    }
32506
public function addInput($input)
    {
        $inputs = $this->getInputs();
        array_push($inputs, $input);
        $this->setInputs($inputs);
    }
1292171
public function prepare($input)
    {
        $form = $this->buildNestedForm($this->column, $this->builder);

        return $form->setOriginal($this->original, $this->getKeyName())->prepare($input);
    }
127627
protected function modifyKey(string $key)
    {
        $newKey = $key;
        if (($this->getOptions() & self::KEY_LOWER) > 0) {
            $newKey = strtolower($key);
        } elseif (($this->getOptions() & self::KEY_UPPER) > 0) {
            $newKey = strtoupper($key);
        }

        return $newKey;
    }
1011987
public function addInput($input)
    {
        if (!$this->getInputs()) {
            return $this->setInputs(array($input));
        } else {
            return $this->setInputs(
                array_merge($this->getInputs(), array($input))
            );
        }
    }
418790
public function parse(Input $input)
    {
        // fill config
        $this->config = $this->default;

        if ($input instanceof RequestInput) {
            $this->config['optional_item_id'] = true;
        }

        $object = $input->getAsObject();

        $document = $this->getFactory()->make(
            'Document',
            [$object, $this, new RootAccessable]
        );

        // Clear config
        $this->config = [];

        return $document;
    }
165024
protected function detectSpecialKey($input)
    {
        $specialKey = false;
        if (in_array(ord($input), [27, 127, 10])) {
            $specialKey = array_search(urlencode($input), $this->specialKeys);
        }

        return $specialKey ? $specialKey : null;
    }
192003
public static function exists(string $input, string $key) : bool
    {
        return isset(self::getVariable($input, null)[$key]);
    }
764575
public function input($key = null, $default = null)
    {
        if ($key === null) {
            return $this->input;
        }

        return array_key_exists($key, $this->input) ? $this->input[$key] : $default;
    }
120006
protected function createMigration($input)
    {
        if ($input->withMigration) {
            $this->call(
                'create:migration',
                [
                    'model-name' => $input->modelName,
                    '--table-name' => $input->table,
                    '--migration-class-name' => $input->migrationClass,
                    '--connection-name' => $input->connectionName,
                    '--engine-name' => $input->engineName,
                    '--resource-file' => $input->resourceFile,
                    '--template-name' => $input->template,
                    '--without-timestamps' => $input->withoutTimeStamps,
                    '--with-soft-delete' => $input->withSoftDelete,
                    '--force' => $input->force,
                ]
            );
        }

        return $this;
    }
469944
public function encrypt($input)
    {
        if (! $input) {
            return $input;
        }

        $methods = $this->getEncryptionMethods();
        $method  = reset($methods);
        $mkey    = key($methods);

        if ('mcrypt' == $method) {
            $result = $this->encryptMcrypt($input);
        } elseif ('null' == $method) {
            $result = $input;
        } else {
            $result = $this->encryptOpenSsl($input, $method);
        }

        return ":$mkey:" . base64_encode($result);
    }
741836
private function withParam( string$input )
	{
		return str_replace('$_FLAG_$',"__HTSL_CTRL_FLAG_{$this->id}__",preg_replace_callback('/(?<!%)%s((?:\\/.+?(?<!\\\\)\\/.+?(?<!\\\\)\\/)+)?/',function( array$matches ){
			$param= $this->param;

			if( isset($matches[1]) ){
				array_map(...[
					function($replacer)use(&$param){
						list($pattern,$replacement,)= preg_split('/(?<!\\\\)\\//',$replacer);
						$param= preg_replace(...[
							"/$pattern/",
							preg_replace('/^\\\\_$/','',$replacement),
							$param,
						]);
					},
					preg_split(
						'/(?<!\\\\)\\/\\//'
						,
						trim($matches[1],'/')
					),
				]);
			}
			return $param;
		},$input));
	}
130668
public function url($input, $key, $lang)
    {
        $lang = $this->custom('url', $lang);
        if (filter_var($input[$key], FILTER_VALIDATE_URL) === false) {
            return str_replace(':field', $key, $lang);
        }
    }
784894
public static String encrypt(String input) {
        byte[] result = encrypt(input.getBytes());
        return new String(result);
    }
1285989
protected function getCommand($input)
    {
        $input = new StringInput($input);
        if ($name = $input->getFirstArgument()) {
            return $this->get($name);
        }
    }
215072
public function setInput($input)
    {
        $this->input = ProcessUtils::validateInput(sprintf('%s::%s', __CLASS__, __FUNCTION__), $input);

        return $this;
    }
154501
public function input($key = null, $default = null)
    {
        return data_get(
            $this->getInputSource()->all() + $this->query->all(), $key, $default
        );
    }