Detect whether the key defined in $input is considered a special key.

@param string $input

@return string|null
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;
    }
560045
protected function isUpdate($input)
    {
        return (isset($input[$this->id_name]) && ! empty($input[$this->id_name]) );
    }
97107
public static function toKey($input)
    {
        // Remove spaces and dashes, then convert to lower case.
        $input = self::toUnderscoreSeparated($input);
        $input = strtolower($input);

        return $input;
    }
1305240
public function canonicalize($input)
    {
        $strippedInput = str_replace(' ', '', $input);
        if (!preg_match('/^\d{4}[A-Za-z]{2}$/', $strippedInput)) {
            return $input;
        }

        return implode(' ', [substr($strippedInput, 0, 4), mb_strtoupper(substr($strippedInput, -2, 2))]);
    }
855846
public function input($input = null, $default = null)
    {
        // Get all inputs
        $inputs = array_merge($this->getInputs(), $this->additionalInputs);

        // Exclude reserved inputs
        foreach ($inputs as $key => $value) {
            if (in_array($key, $this->reserved)) {
                unset($inputs[$key]);
            }
        }

        // Return one input
        if ($input) {
            return isset($inputs[$input])? $inputs[$input] : $default;
        }

        // Or the complete array of inputs
        return $inputs;
    }
68586
public function keyToValue(array $input)
    {
        $output = array();

        foreach ($input as $key => $value) {
            $output[] = array($key, $value);
        }

        return $output;
    }
1185663
public function canonicalize($input)
    {
        $filtered = preg_replace('/\D+/', '', $input) ?? '';
        if (strlen($filtered) !== $this->digitLength) {
            return $input;
        }

        return $filtered;
    }
643054
public function validate($input): bool
    {
        // for array
        if (\is_array($input)) {
            return \in_array($this->containsValue, $input, true);
        }
        // for string
        if (\is_string($input)) {
            return false !== mb_strpos($input, $this->containsValue, 0, mb_detect_encoding($input));
        }
        return false;
    }
106695
private function findMatchingToken($input)
    {
        // Check with all tokenDefinitions
        foreach ($this->tokenDefinitions as $tokenDefinition) {
            $token = $tokenDefinition->match($input);

            // Return the first token that was matched.
            if ($token) {
                return $token;
            }
        }

        // Return null if no tokens were matched.

        return null;
    }
748903
public function
	IsValueBinding($Input=null) {

		if(!$Input) $Input = $this->Value;

		// is string like :this then yes
		if(is_string($Input) && strpos($Input,':') === 0)
		return true;

		// if entire list of :this then yes.
		if(is_array($Input)) {
			$All = true;
			foreach($Input as $Value) {
				if(!$this->IsValueBinding($Value))
				$All = false;
			}
			return $All;
		}

		return false;
	}
1235278
public function getType($input)
    {
        // Make an array to loop through
        $inputs = explode('|', $input);

        foreach ($inputs as $index => $input) {
            $list = (bool) preg_match('/\[\]$/', $input);
            if ($list === true) {
                $input = substr($input, 0, -2);
            }

            // make the type case insensitive
            $type = strtolower(trim($input));

            // Check if we can convert the type to a known type
            if (array_key_exists($type, $this->phpTypeMapping) === true) {
                $type = $this->phpTypeMapping[$type];
            }

            // Check if it is a predefined type
            if (in_array($type, $this->phpTypes) === true) {
                $inputs[$index] = $type . ($list ? '[]' : '');
                continue;
            }

            // Reset the type. Maybe it is a class definition
            $type = $input;

            if (
                $this->isClassDefined($type) === true ||
                $this->isInterfaceDefined($type) === true ||
                $this->isTraitDefined($type) === true
            ) {
                $inputs[$index] = $type . ($list ? '[]' : '');
                continue;
            }

            throw Exception\Type::isNotDefined($type);
        }

        return implode('|', $inputs);
    }
341962
protected function hasCommand($input)
    {
        if (\preg_match('/([^\s]+?)(?:\s|$)/A', \ltrim($input), $match)) {
            return $this->has($match[1]);
        }

        return false;
    }
549130
public function validate($input): bool
    {
        if (\is_string($input)) {
            $input = trim($input);
        }

        return !empty($input);
    }
1209775
public function isValidLocalParameterArray($input)
    {
        //====================================================================//
        // Verify Array Given
        if (!is_array($input)) {
            return Splash::log()->err(Splash::trans('ErrorCfgNotAnArray', get_class($input)));
        }

        //====================================================================//
        // Required Parameters are Available
        //====================================================================//
        if (!array_key_exists('WsIdentifier', $input)) {
            return Splash::log()->err(Splash::trans('ErrWsNoId'));
        }

        if (!array_key_exists('WsEncryptionKey', $input)) {
            return Splash::log()->err(Splash::trans('ErrWsNoKey'));
        }

        return true;
    }
38074
public function verifySalt($input)
    {
        $appearsValid = (1 === preg_match('/^\$2[axy]{1}\$\d{2}\$[\.\/0-9A-Za-z]{22}$/', $input));
        if ($appearsValid) {
            $costFactor = (int) substr($input, 4, 2);
            if ($costFactor < 4 || $costFactor > 31) {
                $appearsValid = false;
            }
        }

        return $appearsValid;
    }
1109229
public function verifySalt($input)
    {
        $appearsValid = (1 === preg_match('/^_[\.\/0-9A-Za-z]{8}$/', $input));
        if ($appearsValid) {
            $costFactor = $this->_decodeInt24(substr($input, 1, 4));
            if ($costFactor < 1 || $costFactor > (1 << 24) - 1) {
                $appearsValid = false;
            }
        }

        return $appearsValid;
    }
400772
protected function getInputType($input)
    {
        // Get the formal type
        $type = gettype($input);

        // Check if it's numeric
        if ($type == 'integer' || $type == 'float' || $type == 'double')
            $type = 'numeric';

        // If it's something we don't check, null it
        if ($type == 'NULL' || $type == 'object' || $type == 'resource' || $type == 'undefined type')
            $type = null;

        // Check if it's an file array
        if ($type == 'array' && isset($input['type']) && $input['tmp_name'])
            $type = 'file';

        return $type;
    }