Get a copy of the provided array excluding the specified keys.

@param array $input
@param array $excluded

@throws InvalidArgumentException
@return array
969138
public static function except(array $input, $excluded = [])
    {
        Arguments::define(Boa::arrOf(Boa::either(
            Boa::string(),
            Boa::integer()
        )))->check($excluded);

        return Std::filter(function ($_, $key) use ($excluded) {
            return !in_array($key, $excluded);
        },
            $input);
    }
764526
public static function createFromArray(array $input)
    {
        if (2 != count($input)) {
            throw new InvalidArgumentException(
                sprintf("%s() expects an array with exactly two elements", __METHOD__)
            );
        }
        if (array_key_exists('start', $input) && array_key_exists('end', $input)) {
            $start = $input['start'];
            $end   = $input['end'];
        } else {
            $start = array_shift($input);
            $end   = array_shift($input);
        }
        if (is_array($start)) {
            $start = Point::createFromArray($start);
        }
        if (is_array($end)) {
            $end = Point::createFromArray($end);
        }
        return new static($start, $end);
    }
363910
public static function stripslashes(array $input): array
    {
        $result = [];
        
        foreach ($input as $k => $v) {
            $result[$k] = \is_array($v) ? self::stripslashes($v) : \stripslashes($v);
        }
        
        return $result;
    }
68586
public function keyToValue(array $input)
    {
        $output = array();

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

        return $output;
    }
1071872
public function removeAll(array $exclusions = [])
    {
        $this->parseClassAttribute();

        $preservedClasses = [];

        foreach ($exclusions as $className) {
            if (!is_string($className)) {
                throw new InvalidArgumentException(sprintf('Class name must be a string, %s given', (is_object($className) ? get_class($className) : gettype($className))));
            }

            if (!in_array($className, $this->classes, true)) {
                continue;
            }

            $preservedClasses[] = $className;
        }

        $this->classes = $preservedClasses;

        $this->updateClassAttribute();

        return $this;
    }
170742
public function filter($keys, $exclude = false): SplArray
    {
        if (is_string($keys)) {
            $keys = explode(',', $keys);
        }
        $new = array();
        foreach ($this->getArrayCopy() as $name => $value) {
            if (!$exclude) {
                in_array($name, $keys) ? $new[$name] = $value : null;
            } else {
                in_array($name, $keys) ? null : $new[$name] = $value;
            }
        }
        return new SplArray($new);
    }
651212
protected function cleanArray($input)
	{
		// add to the cleaned list when object
		if (is_object($input))
		{
			$this->parent->isClean($input);
		}

		foreach ($input as $k => $v)
		{
			$input[$k] = $this->clean($v);
		}

		return $input;
	}
436935
public function insert(array $input) : array {
		if (\Application::get('flag.numbers.framework.api.enforce_rest')) {
			$temp2 = $this->get($input);
			if (!$temp2['values_loaded']) {
				return $this->save($input);
			} else {
				return [
					'success' => false,
					'error' => ['Can not create, record exists!'],
					'values' => []
				];
			}
		} else {
			return $this->save($input);
		}
	}
254085
public static function findArray($input)
    {
        if (is_iterable($input) && self::test(current($input))) {
            return self::findArray(current($input));
        }

        if (self::test($input)) {
            return self::findArray(self::parse($input));
        }

        if (! is_iterable($input)) {
            throw new \Exception("Can't find an array in provided input");
        }

        return $input;
    }
771457
protected function excludeNext($key, array $exclude)
  {
    if (array_key_exists($key, $exclude) && is_array($exclude[$key]))
    {
      return $exclude[$key];
    }

    return array();
  }
1063396
protected function filter($keys, string $value, bool $exclude = false)
    {
        if (!is_array($keys)) {
            $keys = [$keys];
        }

        $this->content['items'] = collect($this->content['items'])
            ->filter(function ($item) use ($keys, $value, $exclude) {
                return (bool)collect($keys)->filter(function ($key) use ($item, $value, $exclude) {
                    if (array_key_exists($key, $item)) {
                        $itemContainsValue = collect($item[$key])->contains($value);

                        if ($exclude) {
                            return !$itemContainsValue;
                        }

                        return $itemContainsValue;
                    }
                })->count();
            });

        return $this;
    }
118627
public function payload(array $input): PayloadInterface
    {
        $domain = $this->container->get($this->id);

        if ($domain instanceof DomainInterface) {

            return $domain->payload($input);

        }

        throw new ContainedDomainTypeException($this->id, $domain);
    }
735908
public static function without(array $array, $remove, $preserveKeys = false): array
    {
        $remove = !is_array($remove) ? [$remove] : $remove;
        $result = [];
        foreach ($array as $key => $value) {
            if (in_array($value, $remove)) {
                continue;
            }

            if ($preserveKeys) {
                $result[$key] = $value;
            } else {
                $result[] = $value;
            }
        }

        return $result;
    }
282239
private function arrayAnalyzer($input)
    {
        $result = [];
        foreach ($input as $key => $value) {
            if ($key == 'Field') {
                $result[] = $value;
            } elseif ($key == 'Type') {
                if (str_contains($value, 'int')) {
                    $result[] = 'text';
                } elseif (str_contains($value, 'char')) {
                    $result[] = 'text';
                } elseif ($value = 'date') {
                    $result[] = 'date';
                }
            }
        }

        return $result;
    }
405878
protected function clean_input( array $input ) {
		foreach ( $input as $key => $value ) {
			if ( is_array( $value ) ) {
				$input[ $key ] = $this->clean_input( $value );
			}

			if ( $value instanceof UploadedFile ) {
				unset( $input[ $key ] );
			}
		}

		return $input;
	}
452382
protected function flatten($input)
    {
        $list = [];

        foreach ($input as $item) {
            $list = array_merge($list, (array)$item);
        }

        return array_unique($list);
    }
1096960
public function removeEmptyInput($input)
    {
        $filterableInput = [];

        foreach ($input as $key => $val) {
            if ($val !== '' && $val !== null) {
                $filterableInput[$key] = $val;
            }
        }

        return $filterableInput;
    }