protected function purifyInputs(array $inputs)
    {
        $newInputs = [];

        foreach ($inputs as $key => $value) {
            if (is_array($value)) {
                throw new InvalidArgumentException('Input array can NOT contain nested arrays.');
            }

            if (strlen((string)$key) > $this->maxTextLength) {
                throw new TextTooLongException("Input array has at least one key whose name exceeds the max length allowed.");
            }

            if (strlen((string)$value) > $this->maxTextLength) {
                throw new TextTooLongException("Input array has at least one language value whose value exceeds the max length allowed.");
            }

            $newInputs[e($key)] = e($value);
        }

        return $newInputs;
    }
protected function purifyInputs(array $inputs)
    {
        $newInputs = [];

        foreach ($inputs as $key => $value) {
            if (is_array($value)) {
                throw new InvalidArgumentException('Input array can NOT contain nested arrays.');
            }

            if (strlen((string)$key) > $this->maxTextLength) {
                throw new TextTooLongException("Input array has at least one key whose name exceeds the max length allowed.");
            }

            if (strlen((string)$value) > $this->maxTextLength) {
                throw new TextTooLongException("Input array has at least one language value whose value exceeds the max length allowed.");
            }

            $newInputs[e($key)] = e($value);
        }

        return $newInputs;
    }
protected function purifyInputs ( array $ inputs ) { $ newInputs = [ ] ; foreach ( $ inputs as $ key => $ value ) { if ( is_array ( $ value ) ) { throw new InvalidArgumentException ( 'Input array can NOT contain nested arrays.' ) ; } if ( strlen ( ( string ) $ key ) > $ this -> maxTextLength ) { throw new TextTooLongException ( "Input array has at least one key whose name exceeds the max length allowed." ) ; } if ( strlen ( ( string ) $ value ) > $ this -> maxTextLength ) { throw new TextTooLongException ( "Input array has at least one language value whose value exceeds the max length allowed." ) ; } $ newInputs [ e ( $ key ) ] = e ( $ value ) ; } return $ newInputs ; }
Escape input array. Keys beginning with _ are discarded. If the file already exists, it gets overwritten.

@param  array $inputs

@throws InvalidArgumentException
@throws TextTooLongException

@return array
Escape input array . Keys beginning with _ are discarded . If the file already exists it gets overwritten .